Files
2018-07-23 20:25:36 +02:00

43 lines
1.3 KiB
HTML

<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>