Вопрос

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?

Это было полезно?

Решение

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.

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top