Question

Can anyone explain me how bowsers seek html5 videos? On flash it uses start pamaterer to seek videos. Example: video.mp4?start=115.50 but on html5 videos (youtube videos) this is not working. So what parameter used to seek videos on html5?

Était-ce utile?

La solution

You are looking for something that is called Media Fragments. Using this technique your URL could look something like this:

video.mp4#t=115.50

But this isn't fully supported. I think Chrome and Firefox have partial support this. As a workaround you can render a small JS inline script, which starts the video at your time.

Autres conseils

You can jump to a specific time in seconds using JavaScript:

var video = document.getElementById('video');
video.currentTime = 18;

See MDN "HTMLMediaElement"

Demo

Try before buy

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top