forked from slawrence/videojs-vr
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathexample-local-hls.html
46 lines (39 loc) · 1.63 KB
/
example-local-hls.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
<!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" crossOrigin="anonymous" width="100%" height="100%" data-setup="{}" controls playsinline webkit-playsinline>
<!-- Even with local/relative source, HLS will result in blank screen. This means no Live 360 on iOS - thanks Apple! https://bugs.webkit.org/show_bug.cgi?id=163866#c3 -->
<!-- There is a hack in src/jsi/videojs.vr.js - see comments -->
<source src="samples/milford-sound.m3u8" type="application/x-mpegURL">
</video>
<!--
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>
(function(){
var player = videojs( '#video-container', {
techOrder: ['html5']
});
player.vr({projection: "360"});
})();
</script>
</body>
</html>