Question

I'm having the same issue as described in this post:

HTML5 video will not loop

So basically my videos won't loop (and cannot be seeked ) in chrome. The same markup works fine when i host my page on an apache server and even if i open it from the file system, and about a week ago it worked in a portlet over websphere appserver 7.0. All i have done on server side was adding video mime types for mp4, ogv, etc... other than that i have no idea what could have gone wrong.

Am i missing some settings on the server? Or if it is the issue with the ranged requests, how do you resolve that on websphere?

My code is like this:

<video preload="metadata" width="340">                      
<source src="video.webm" type="video/webm"  />  
<source src="video.mp4" type="video/mp4" />                     
<source src="video.ogv" type="video/ogg"  />
</video>

I start the video and set the loop attribute like this:

var $video = ...                            
if($video && $video.canPlayType) {
$video.play();
$video.loop = 1;
}

Thanks in advance for any answer!

Was it helpful?

Solution

Have you tried doing the HTML5 loop tag?

<video id="yourID" autoplay="autoplay" loop="loop">
<!--source code here-->
</video>

EDIT: To get this to work from JavaScript do the following.

var video = document.createElement('video'); //To create the video element.
video.loop = true;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top