Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Swap webvr to webxr polyfill packages #273

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
d742fd1
Updating node-sass version (to remove python2 dependency)
Dec 2, 2022
d3fba93
Husky update
Dec 2, 2022
139f797
[KJSL] Swap webvr ro webxr polyfill packages
Dec 5, 2022
a46b98d
Example of having both polyfills - rewritting plugin.js to use the ne…
kevleyski Dec 5, 2022
dc28b05
[KJSL] Swap webvr ro webxr polyfill packages
Dec 6, 2022
f41dc2a
Merge pull request #1 from kevleyski/main
kevleyski Dec 6, 2022
dbc1073
[KJSL] Swap webvr ro webxr polyfill packages
Dec 6, 2022
cd30806
[KJSL] Swap webvr ro webxr polyfill packages
Dec 6, 2022
eecdbba
Merge pull request #2 from kevleyski/main
kevleyski Dec 6, 2022
d6821ab
[KJSL] Swap webvr ro webxr polyfill packages
Dec 7, 2022
842abed
Merge pull request #3 from kevleyski/main
kevleyski Dec 7, 2022
6de443d
[KJSL] Swap webvr ro webxr polyfill packages
Dec 7, 2022
b318d28
[KJSL] Swap webvr ro webxr polyfill packages
Dec 7, 2022
6d4ff0a
[KJSL] Swap webvr ro webxr polyfill packages
Dec 11, 2022
e02ce1d
Merge pull request #4 from kevleyski/main
kevleyski Dec 11, 2022
70a1611
chore: Swap webvr ro webxr polyfill packages
Dec 11, 2022
e0d1c48
Merge pull request #5 from kevleyski/main
kevleyski Dec 11, 2022
36e7cdc
chore: Swap webvr ro webxr polyfill packages (continue to use webvr p…
Dec 12, 2022
c8330f7
Merge pull request #6 from kevleyski/main
kevleyski Dec 12, 2022
56ad5f3
chore: Swap webvr ro webxr polyfill packages (adding basic controller…
Dec 14, 2022
a8d1459
Merge pull request #7 from kevleyski/main
kevleyski Dec 14, 2022
856a183
chore: Swap webvr ro webxr polyfill packages (add iOS permission chec…
Dec 20, 2022
8d88ec5
Merge pull request #8 from kevleyski/main
kevleyski Dec 20, 2022
7c0c62b
chore: Swap webvr ro webxr polyfill packages (add iOS permission chec…
Dec 20, 2022
46c7207
Merge pull request #9 from kevleyski/main
kevleyski Dec 20, 2022
7bf68a5
Update src/big-vr-play-button.js
kevleyski Dec 20, 2022
1cc47ef
Update src/plugin.js
kevleyski Dec 20, 2022
13d2b02
Merge pull request #1 from MetaCDN/main
kevleyski Dec 20, 2022
2603836
chore: Swap webvr for webxr polyfill packages (PR fix ups)
Dec 20, 2022
ff858af
chore: Swap webvr for webxr polyfill packages (PR fix ups)
Dec 20, 2022
de6db15
Merge pull request #10 from kevleyski/main
kevleyski Dec 20, 2022
80f9e0c
chore: Swap webvr for webxr polyfill packages (PR fix ups - part reve…
Dec 20, 2022
448eb88
chore: Swap webvr for webxr polyfill packages (PR fix ups - only show…
Dec 21, 2022
8fb0579
Merge pull request #11 from kevleyski/main
kevleyski Dec 21, 2022
538dca1
(revert accidental file delete)
Dec 21, 2022
cf6277d
chore: Swap webvr for webxr polyfill packages (PR fix ups - clicking …
Dec 21, 2022
07c7f54
chore: Swap webvr for webxr polyfill packages (PR fix ups - clicking …
Dec 21, 2022
c5c6a58
Merge pull request #12 from kevleyski/main
kevleyski Dec 21, 2022
35ed850
chore: Swap webvr for webxr polyfill packages (PR fix ups - testing o…
Dec 23, 2022
8441f77
Merge pull request #13 from kevleyski/main
kevleyski Dec 23, 2022
9ce1f15
chore: Swap webvr for webxr polyfill packages (PR fix ups - testing o…
Jan 24, 2023
a6528ac
chore: Swap webvr for webxr polyfill packages (PR fix ups - adding 18…
Jan 25, 2023
33d206b
Merge pull request #14 from kevleyski/main
kevleyski Jan 25, 2023
91cfea0
chore: Swap webvr for webxr polyfill packages (PR fix ups - adding 18…
Jan 25, 2023
b0ebafd
Merge pull request #15 from kevleyski/main
kevleyski Jan 25, 2023
dc23443
chore: Swap webvr for webxr polyfill packages (PR fix ups - deprecate…
Jan 25, 2023
72ae5d3
Merge pull request #16 from kevleyski/main
kevleyski Jan 25, 2023
62c45b4
three version up
kevleyski Jan 27, 2023
0e1c4a1
three version up
kevleyski Jan 27, 2023
3261832
(three.js version)
kevleyski Jan 27, 2023
9ed1171
Merge pull request #17 from kevleyski/main
kevleyski Jan 27, 2023
b180074
three.js version API differences
kevleyski Jan 27, 2023
55d53dc
Merge pull request #18 from kevleyski/main
kevleyski Jan 27, 2023
8adb558
three.js version API differences (part revert to allow webvr to still…
kevleyski Jan 27, 2023
3264b5e
Merge pull request #19 from kevleyski/main
kevleyski Jan 27, 2023
f8ea3cb
three.js version revert back to v129 as 130 breaks renderer.getSize
kevleyski Jan 27, 2023
c9f5903
Merge pull request #20 from kevleyski/main
kevleyski Jan 27, 2023
466267b
cubemap verticies
kevleyski Jan 27, 2023
da9c89c
fix up 180 mono
kevleyski Jan 27, 2023
c3b9b4f
Merge pull request #21 from kevleyski/main
kevleyski Jan 27, 2023
c4bd610
Move to latest THREE.js (0.149.0)
kevleyski Jan 27, 2023
a4c12ac
Use latest THREE.js
kevleyski Jan 27, 2023
3786a9d
Merge pull request #22 from kevleyski/main
kevleyski Jan 27, 2023
5943617
chore: Swap webvr for webxr polyfill packages (PR fix ups - fix up VR…
Jan 29, 2023
70c5f29
Merge pull request #23 from kevleyski/main
kevleyski Jan 29, 2023
37fe825
chore: Swap webvr for webxr polyfill packages (PR fix ups - fix up 18…
Jan 30, 2023
e444322
Merge pull request #24 from kevleyski/main
kevleyski Jan 30, 2023
d890f20
chore: Swap webvr for webxr polyfill packages (PR fix ups - cubemap)
Jan 31, 2023
89ab083
chore: Swap webvr for webxr polyfill packages (PR fix ups - cubemap)
Jan 31, 2023
dc27ea8
chore: Swap webvr for webxr polyfill packages (PR fix ups - cubemap)
Jan 31, 2023
cd05e47
Merge pull request #25 from kevleyski/main
kevleyski Jan 31, 2023
a2b1aa0
chore: Swap webvr for webxr polyfill packages (PR fix ups - cubemap b…
Jan 31, 2023
ad1b413
Merge pull request #26 from kevleyski/main
kevleyski Jan 31, 2023
c58338c
chore: Swap webvr for webxr polyfill packages (PR fix ups - UI) (#27)
kevleyski Mar 31, 2023
4a58148
(more tests/examples)
kevleyski Jul 6, 2023
48fd17b
(more tests/examples)
kevleyski Jul 6, 2023
46fd3b1
(fix up PR #273 merge)
kevleyski Jul 6, 2023
4d2165d
videojs-vr v2.1.0 (baseline pre merge from videojs github)
Jul 22, 2024
0386ec1
Test husky
Jul 23, 2024
842651e
Updated README
jbroberg Jul 23, 2024
855e04c
Husky test
Jul 23, 2024
01d12fd
Updated README
jbroberg Jul 23, 2024
4e19fa3
Merge branch 'main' of https://github.com/MetaCDN/videojs-vr
jbroberg Jul 23, 2024
1e971cd
Fixup Ellipsoidal Cube Maps
Jul 23, 2024
ad6dd0f
Fixing Equi-Angular Cubemap
Jul 23, 2024
48e84fa
Fixing Equi-Angular Cubemap
Jul 23, 2024
0581199
fix readme typos
jbroberg Jul 24, 2024
3650987
Fixing Equi-Angular Cubemap orientation
Jul 24, 2024
8a41917
Merge remote-tracking branch 'origin/main'
Jul 24, 2024
cc00e6f
THREE.js buffer geometry refactor
Jul 24, 2024
ab66880
Cleanup, bump three and external imports
jbroberg Jul 29, 2024
58ab5ba
Disable Cardboard by default
jbroberg Jul 29, 2024
36345dd
(remove cardboard)
Jul 29, 2024
e00f3a9
KJSL: reviving DeviceOrientationControls for where we've removed Card…
Jul 30, 2024
26c4ef1
KJSL: Reviving DeviceOrientationControls for iPhone
Jul 30, 2024
1293cbd
KJSL: Reviving DeviceOrientationControls for iPhone
Jul 30, 2024
2297edd
KJSL: Reviving DeviceOrientationControls for iPhone
Jul 30, 2024
8685bb5
KJSL: Reviving DeviceOrientationControls for iPhone
Jul 30, 2024
5de1366
KJSL: Reviving DeviceOrientationControls for iPhone
Jul 30, 2024
888a390
KJSL: devices fill the screen more
Jul 30, 2024
ebbf917
KJSL: devices fill the screen more
Jul 30, 2024
8b44f0c
KJSL: moving example UI image to dist, this will later be separated
Aug 9, 2024
f7a1c4e
KJSL: latest rollup image plugin didn't seem to work with other maybe…
Aug 9, 2024
d131def
KJSL: update to latest THREE.js
Aug 9, 2024
92f9182
Allow passing in M3U8 or MPD as the QUERY_STRING
Aug 12, 2024
a3145b5
Fix up exception and green button
Aug 13, 2024
3c9efb8
Resize timing bug around webxr-polyfill (getEyeParameters)
Aug 13, 2024
6f845f5
Resize timing bug around webxr-polyfill (getEyeParameters)
Aug 13, 2024
ec34d00
Resize timing bug around webxr-polyfill (getEyeParameters)
Aug 13, 2024
0c90edc
Rollback THREE.js to earlier version which didnt have brightness/gamm…
Aug 15, 2024
e89683f
KJSL: v2.1.1
Aug 19, 2024
3be5577
KJSL: v2.1.1
Aug 19, 2024
cea8a83
KJSL: v2.1.2 Android can use native cardboaard support instead
Aug 19, 2024
b5ddaa5
Merge remote-tracking branch 'origin/jimdevel'
Aug 19, 2024
5f5ce22
KJSL: v2.1.2 Android can use native cardboard support instead
Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

node_modules/.bin/lint-staged
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>videojs-vr</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
<a name="2.1.2"></a>
# [2.1.2](https://github.com/videojs/videojs-vr/compare/v1.10.1...v2.1.2) (2024-08-18)

### Chores

* Android can use built in cardaboard faetaure, else use the gyro if avaiable and permmision allow it

<a name="2.1.1"></a>
# [2.1.1](https://github.com/videojs/videojs-vr/compare/v1.10.1...v2.1.1) (2024-08-17)

### Chores

* rollback THREE.js as this introduced a noticable gamma/brightness increase, adding gyro support, moved
* immersive controller images into base64

<a name="2.1.0"></a>
# [2.1.0](https://github.com/videojs/videojs-vr/compare/v1.10.1...v2.1.0) (2024-07-22)

### Chores

* revisting clean exit immersive and 180 projection

<a name="2.0.0"></a>
# [2.0.0](https://github.com/videojs/videojs-vr/compare/v1.10.1...v2.0.0) (2023-02-15)

### Chores

* update build tooling to drop older browser support ([#276](https://github.com/videojs/videojs-vr/issues/276)) ([0947a0f](https://github.com/videojs/videojs-vr/commit/0947a0f))


### BREAKING CHANGES

* This drops support for older browsers such as IE

<a name="1.10.1"></a>
## [1.10.1](https://github.com/videojs/videojs-vr/compare/v1.10.0...v1.10.1) (2022-08-16)

Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ When you've made your changes, push your commit(s) to your fork and issue a pull
Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma].

- In all available and supported browsers: `npm test`
- In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
- While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local]


Expand Down
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://videojs-vr.netlify.com

[![NPM](https://nodei.co/npm/videojs-vr.png?downloads=true&downloadRank=true)](https://nodei.co/npm/videojs-vr/)

A video.js plugin that turns a video element into a HTML5 Panoramic 360 video player. Project video onto different shapes. Optionally supports Oculus Rift, HTC Vive and the GearVR.
A video.js plugin that turns a video element into a HTML5 Panoramic VR/XR immersive capable video player. Project video onto different shapes depending on the underlying format. Optionally supports Meta Quest and other VR/XR capable HMDs.

Lead Maintainer: Brandon Casey [@brandonocasey](https://github.com/brandonocasey)

Expand All @@ -29,7 +29,7 @@ Maintenance Status: Stable
- [Optional integration with videojs-errors](#optional-integration-with-videojs-errors)
- [Setting a global projection](#setting-a-global-projection)
- [Passing a projection on a source by source basis](#passing-a-projection-on-a-source-by-source-basis)
- [Oculus Rift and HTC Vive Support](#oculus-rift-and-htc-vive-support)
- [Meta Quest and other HMD support](#meta-quest-and-other-hmd-support)
- [Accessing the Camera Position](#accessing-the-camera-position)
- [Accessing THREE.js objects](#accessing-threejs-objects)
- [Options](#options)
Expand All @@ -38,6 +38,7 @@ Maintenance Status: Stable
- [`projection`](#projection)
- [`'180'`](#180)
- [`'180_LR'`](#180_lr)
- [`'180_TB'`](#180_tb)
- [`'180_MONO'`](#180_mono)
- [`'360'`, `'Sphere'`, or `'equirectangular'`](#360-sphere-or-equirectangular)
- [`'Cube'` or `'360_CUBE'`](#cube-or-360_cube)
Expand Down Expand Up @@ -67,20 +68,24 @@ npm i videojs-vr
## Browser Support
The most recent versions of:
* Desktop
* Chrome
* Chrome (recommended for HMD support)
* Firefox
* Safari
* Mobile
* Chrome on Android
* Safari on iOS

* Headsets
* Meta Quest Browser
* Rift (via Chrome browser)
* WebXR plug-in (Chrome/Firefox)

## Caveats
* HLS captions on safari will not be visible as they are located inside of the shadowRoot in the video element and we cannot get access to them.

## Projection support
Currently we only support:
* Projections
* Spherical Videos, via the 360/equirectangular projection
* Spherical Videos, via the 180/360/equirectangular projection
* 360 cube videos
* Mappings
* Monoscopic (single video pane)
Expand Down Expand Up @@ -168,12 +173,12 @@ player.vr({projection: 'AUTO'});
// or player.vr(); since 'AUTO' is the default
```

## Oculus Rift and HTC Vive Support
This project leverages the [webvr-polyfill](https://github.com/borismus/webvr-polyfill) and [three.js](https://github.com/mrdoob/three.js) libraries to create a 'responsive VR' experience across multiple devices.
## Meta Quest and other HMD support
This project leverages the [webxr-polyfill](https://github.com/immersive-web/webxr-polyfill), [webvr-polyfill](https://github.com/borismus/webvr-polyfill) and [three.js](https://github.com/mrdoob/three.js) libraries to create a 'responsive XR/VR' experience across multiple devices.

Oculus Rift and HTC Vive playback requires Firefox >= 55, experimental WebVR-enabled builds of Chromium, or via Chrome by enabling webvr in `chrome://flags`. Go to [WebVR.info](http://www.webvr.info) for more info.
Rift, Meta Quest (with Quest Link cable) and other compatible HMDs on desktop require a Chrome build of 79 or higher. We recommend the latest stable Chrome. Go to [immersiveweb.dev](https://immersiveweb.dev/) for more info.

GearVR playback requires the latest Samsung Internet for Gear VR with WebVR support enabled. Go [here](https://webvr.rocks/samsung_internet) for more info.
Meta Quest/Pro users running in standalone mode should use the Meta Quest browser to access the immersive modes. It is downloadable from the Meta Quest Store. We recommend using the latest available version.

## Accessing the Camera Position
The Three.js rotation values are exposed under the property `cameraVector` on the `vr` plugin namespace.
Expand Down Expand Up @@ -218,6 +223,10 @@ The video is half sphere and the user should not be able to look behind themselv
Used for side-by-side 180 videos
The video is half sphere and the user should not be able to look behind themselves

#### `'180_TB'`
Used for top/bottom 180 videos
The video is half sphere and the user should not be able to look behind themselves

#### `'180_MONO'`
Used for monoscopic 180 videos
The video is half sphere and the user should not be able to look behind themselves
Expand Down Expand Up @@ -294,7 +303,7 @@ This project is a conglomeration of a few amazing open source libraries.

* [VideoJS](http://www.videojs.com)
* [Three.js](http://threejs.org)
* [webvr-polyfill](https://github.com/borismus/webvr-polyfill)
* [webxr-polyfill](https://github.com/immersive-web/webxr-polyfill)
* [Omnitone](https://googlechrome.github.io/omnitone)

## Support ##
Expand Down
31 changes: 31 additions & 0 deletions examples/180-hls.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-vr Demo</title>
<link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet">
<link href="../dist/videojs-vr.css" rel="stylesheet">
</head>
<body>
<video width="640" height="300" id="videojs-vr-player" class="video-js vjs-default-skin" controls playsinline>
<source src="https://kevleyski.github.io/reckless_in_pyrmont/hls_fmp4_byterange/reckless_in_pyrmont.m3u8" type="application/vnd.apple.mpegurl">
</video>
<ul>
<li><a href="../">return to main example</a></li>
</ul>
<script src="../node_modules/video.js/dist/video.js"></script>
<script src="../dist/videojs-vr.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-vr-player');
player.mediainfo = player.mediainfo || {};
player.mediainfo.projection = '180_MONO';

var vr = window.vr = player.vr({projection: '180_MONO', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions examples/180-mono.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
var vr = window.vr = player.vr({projection: '180_MONO', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
31 changes: 31 additions & 0 deletions examples/180-tb.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-vr Demo</title>
<link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet">
<link href="../dist/videojs-vr.css" rel="stylesheet">
</head>
<body>
<video width="640" height="300" id="videojs-vr-player" class="video-js vjs-default-skin" controls playsinline>
<source src="../samples/video_180_TB.mp4" type="video/mp4">
</video>
<ul>
<li><a href="../">return to main example</a></li>
</ul>
<script src="../node_modules/video.js/dist/video.js"></script>
<script src="../dist/videojs-vr.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-vr-player');
player.mediainfo = player.mediainfo || {};
player.mediainfo.projection = '180_TB';

var vr = window.vr = player.vr({projection: '180_TB', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions examples/180.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
var vr = window.vr = player.vr({projection: '180', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions examples/360-cube.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
var vr = window.vr = player.vr({projection: 'AUTO', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions examples/360-sphere-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
30 changes: 30 additions & 0 deletions examples/360-tb-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-vr Demo</title>
<link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet">
<link href="../dist/videojs-vr.css" rel="stylesheet">
</head>
<body>
<video width="640" height="300" id="videojs-vr-player" class="video-js vjs-default-skin" controls playsinline>
<source src="../samples/cc_oceanside_beach.mp4" type="video/mp4">
</video>
<ul>
<li><a href="../">return to main example</a></li>
</ul>
<script src="../node_modules/video.js/dist/video.js"></script>
<script src="../dist/videojs-vr.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-vr-player');
player.mediainfo = player.mediainfo || {};
player.mediainfo.projection = '360';

// AUTO is the default and looks at mediainfo
var vr = window.vr = player.vr({projection: '360_TB', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions examples/360-two.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
var vr = window.vr = player.vr({projection: 'AUTO', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions examples/360.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
var vr = window.vr = player.vr({projection: 'AUTO', debug: true, forceCardboard: false});
}(window, window.videojs));
</script>

<script src="examples.js"></script>

</body>
</html>
5 changes: 2 additions & 3 deletions examples/eac.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
<html>
<head>
<meta charset="utf-8">
<title>videojs-vr Demo</title>
<title>videojs-vr Demo - Equi-Angular Cubemap</title>
<link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet">
<link href="../dist/videojs-vr.css" rel="stylesheet">
</head>
<body>
<p>EAC video</p>
<video width="640" height="300" id="videojs-vr-player-eac" class="video-js vjs-default-skin" controls playsinline>
<video width="960" height="960" id="videojs-vr-player-eac" class="video-js vjs-default-skin" controls playsinline>
<source src="../samples/lcs15_eac.webm" type="video/webm">
</video>
<p>Credits: Animations for Physics and Astronomy, CC-BY-3.0</p>
Expand Down
20 changes: 20 additions & 0 deletions examples/examples.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-disable */
const videoSourceParam = window.location.search.substring(1);
if (videoSourceParam) {
if (videoSourceParam.indexOf(".mpd") !== -1) {
player.src({
type: 'application/dash+xml',
src: videoSourceParam
});
} else if (videoSourceParam.indexOf(".m3u8") !== -1) {
player.src({
type: 'application/vnd.apple.mpegurl',
src: videoSourceParam
});
} else {
player.src({
type: 'video/mp4',
src: videoSourceParam
});
}
}
10 changes: 6 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@
<title>videojs-vr Demo</title>
</head>
<body>
<iframe width="700" height="400" src="examples/360.html" allowfullscreen="" webkitallowfullscreen="" mozallowfullscreen="" allow="gyroscope; accelerometer; xr"></iframe>
<iframe height="658" src="examples/360.html" style="width: 97vw; min-height: 658px;" allowfullscreen="" webkitallowfullscreen="" mozallowfullscreen="" allow="gyroscope; accelerometer; xr"></iframe>
<ul>
<li><a href="test/debug.html">Run unit tests in browser.</a></li>
<li><a href="examples/180.html">180 video example</a></li>
<li><a href="examples/180.html">180 video example (left/right)</a></li>
<li><a href="examples/180-tb.html">180 video example (top/bottom)</a></li>
<li><a href="examples/180-mono.html">180 video example (monoscopic input)</a></li>
<li><a href="examples/360-cube.html">360 Cube Video example</a></li>
<li><a href="examples/360.html">360 Video example</a></li>
<li><a href="examples/360-two.html">Another 360 Video example</a></li>
<li><a href="examples/360-tb.html">360 TB Video example</a></li>
<li><a href="examples/360-tb.html">360 TB (top/bottom) Video example</a></li>
<li><a href="examples/360-tb-2.html">Another 360 TB (top/bottom) Video example</a></li>
<li><a href="examples/eac.html">EAC video example</a></li>
<li><a href="examples/eac-lr.html">EAC LR video example</a></li>
<li><a href="examples/fluid.html">"Fluid" video size example</a></li>
<li><a href="examples/spatial.html">Spatial audio example</a></li>
<li><a href="examples/sphere-detail.html">360 with increased sphere detail example</a></li>
<li><a href="examples/360-sphere-detail.html">360 with increased sphere detail example</a></li>
</ul>
</body>
</html>
Loading