-
15 Aug 2012 2:10 AM #1
Looping video
Looping video
Hi
Is it possible to loop a video in a scene??
I placed an action at the end of the scene to 'restart' but the video doesn't loop.
I tried adding '50' to the iterations on the video element but still nothing.
Can anybody help me??
E
-
20 Aug 2012 7:35 AM #2
If you want to a loop a video when it ends, you could do something like this for the custom JS start action of the scene. Make sure you video id is "my-video-id" or matches that in the code.
Code:if (!this.videoListener) { //so we only call this once this.videoListener = true; var videoContainer = controller.getElementById('my-video-id'); var videoElement = videoContainer.querySelector('video'); videoElement.addEventListener('ended',function(){ videoElement.play(); },false); }
-
5 Oct 2012 2:34 PM #3


Reply With Quote