-
Notifications
You must be signed in to change notification settings - Fork 3
/
video.html
42 lines (37 loc) · 1.32 KB
/
video.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
<html>
<head>
<script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script>
<script src="https://aframe-360-video-example.glitch.me/play-on-window-click.js"></script>
<script src="https://aframe-360-video-example.glitch.me/play-on-vrdisplayactivate-or-enter-vr.js"><script>
<script src="https://aframe-360-video-example.glitch.me/hide-once-playing.js"></script>
</head>
<body>
<script>
AFRAME.registerComponent('videosphere-via-url', {
init: function () {
this.el.setAttribute("src", AFRAME.utils.getUrlParameter('videosphere') );
}
});
</script>
<a-scene>
<a-assets>
<video id="video" style="display:none"
autoplay loop crossorigin="anonymous" playsinline webkit-playsinline
videosphere-via-url
>
</video>
</a-assets>
<a-camera user-height="0">
<!-- Text element for display messaging. Hide once video is playing. -->
<a-entity id="msg" position="0 -0.3 -1.5" text="align:center;
width:3;
wrapCount:100;
color:red;
value:Click window to make the video play, if needed."
hide-once-playing="#video">
</a-entity>
</a-camera>
<a-videosphere play-on-window-click play-on-vrdisplayactivate-or-enter-vr></a-videosphere>
</a-scene>
</body>
</html>