S
S
spbcypher2011-10-10 17:46:07
Google Chrome
spbcypher, 2011-10-10 17:46:07

Sync HTML5 Video in Google Chrome

There was a task to show 2 or more videos on the site with the possibility of simultaneous synchronous playback. I use HTML5 (Flash for my task is the most extreme option).

                    var i = 0;
                    for (i=0; i<videos_count; i++) {
                        videos[i].pause();
                        videos[i].currentTime=seconds;
                        videos[i].play();
                    }


When setting the position to GH, there is some desynchronization - very noticeable on dynamic pictures.
GH 14.0.835 (in earlier versions, this was also observed)
Actually, the same situation is on the HTML5 video demo http://html5demos.com/two-videos .
In FF, the demo does not work at all, but everything is fine in my project. Raspberry spoils only out of sync in GH.

How can this problem be solved?
PS Are there any cross-platform (to hell with it, with cross-browser compatibility - 1-2 browsers will be enough) alternatives for playing video?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denai, 2011-10-11
@Denai

Do you have a problem for an hour not because of different upload speeds? Try to play around with preload /

S
spbcypher, 2011-10-11
@spbcypher

I did a little experiment: I did it according to Feng Shui - I added the processing of the seeked event - I start showing the video when everyone has a pointer. Opera, FF - good, GH - the problem remains.
It's not about loading - when setting the same currentType value, the player can show different frames, even if the entire video is buffered 10 times and is paused.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question