forked from slawrence/videojs-vr
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathexample-camera.html
65 lines (56 loc) · 2.35 KB
/
example-camera.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>videojs-vr example</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<script src="./dist/player-skin.js"></script>
<script src="./dist/player.full.js"></script>
<style>
html{height:100%;width:100%;padding:0;margin:0}
body{height:100%;width:100%;padding:0;margin:0;overflow:hidden}
object{height:100%;width:100%}
#video-container {width:100%;height:100%}
</style>
</head>
<body>
<video id="video-container" class="video-js vjs-default-skin" preload="auto" autoplay="autoplay" crossOrigin="anonymous" width="100%" height="100%" data-setup="{}" controls playsinline webkit-playsinline>
<source src="https://cdn-au.metacdn.com/jumipqxo/1u2Jh28/20160823050905_file_id14719289501962016_08_08_08_22_16_er_MP4-HIGH-WEBM_VP9.webm" type="video/webm">
<source src="https://cdn-au.metacdn.com/jumipqxo/1lgi0Am/20160823050905_file_id14719289501962016_08_08_08_22_16_er_MP4-HIGH-MP4.mp4" type="video/mp4">
<!-- VP9 Dash Example
<source src="http://cdn-au.metacdn.com/jumipqxo/24CqTuS/20160823050905_file_id14719289501962016_08_08_08_22_16_er_MP4-PLAYLIST_1478220740600.mpd" type="application/dash+xml"
-->
<!--
video.js will automatically initialize the video element since it's loaded in
the head of the document but you still need to configure and initialize the
plugin.
-->
<script>
if ('SamsungChangeSky' in window) {
window.SamsungChangeSky({ sphere: 'samples/milford-sound.jpg' });
}
</script>
<script>
var player;
(function(){
player = videojs( '#video-container', {
techOrder: ['html5']
});
player.vr({projection: "360"});
})();
setInterval( function() {
console.log("cameraVector");
console.log(player.vr.cameraVector);
console.log("Three JS perspective camera");
console.log(player.vr.threeJs.camera);
console.log("Three JS Scene");
console.log(player.vr.threeJs.scene);
console.log("Three JS renderer");
console.log(player.vr.threeJs.renderer);
}, 1000);
</script>
</body>
</html>