HTML5 Video - Chrome - CurrentTime Error Settings

When I try to set the currentTime of an HTML5 Video element in Chrome 5.0.375.86, for example:

video.currentTime = 1.0; 

I get the following javascript exception:

 Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1 

It works great in Safari. Has anyone experienced this?

+5
javascript html5 google-chrome html5-video
Jul 02 '10 at 12:00
source share
5 answers

Try something like this (JS):

 function loadStart(event) { video.currentTime = 1.0; } function init() { video.addEventListener('loadedmetadata', loadStart, false); } document.addEventListener("DOMContentLoaded", init, false); 
+5
Sep 13 '10 at 6:18
source share

As I understand it, an automatic solution is not possible on the iPad, because the user needs to click either a poster or a movie according to Apple documentation .

0
Aug 05 '11 at 7:27
source share

this is work for me

 video = document.getElementById('video'); begin_play = 50; play_video_frist = true; //if you want to run only frist time video.addEventListener("play", capture, false); function capture(event) { if (event.type == "play"){ if(play_video_frist){ play_video_frist = false; video.currentTime = begin_play; } } } 
0
Aug 26 '14 at 10:08
source share

The problem (at least with regards to Chrome) is probably server side. Put the Header set Accept-Ranges bytes in your .htaccess (this is this answer )

0
Aug 13 '15 at 14:00
source share
 $video.on 'loadedmetadata', -> $video[0].currentTime = parseInt(options.history) 

with coffeescript and jQuery

-2
Jan 15 '13 at 3:57
source share



All Articles