i have this weird behavior on html5 video tag. I have 4 videos, that i want to play at the same time. So i create my own control bar to play/pause, so when play button is clicked, all 4 videos is played, same as pause button.
On safari, it has weird problem, the video didn't play at the same time, 1 or 2 videos have delay when i click play, so not all videos playing at the same time.
On Chrome and Firefox it's working allright, what's wrong with safari?
I'm using javascript .play()
function to play all videos.
I also make sure the video is loaded before playing it. Something like,
<video id="example_video_1" class="video-js vjs-default-skin" preload="auto">
<source src="asset/video/al_vertrag_kranken_v1_part1.ogv" type='video/ogg' />
<source src="asset/video/al_vertrag_kranken_v1_part1.mp4" type='video/mp4' />
<source src="asset/video/al_vertrag_kranken_v1_part1.webm" type='video/webm' />
</video>
video_1 = document.getElementById('example_video_1');
if (video_1.readyState == 4 && video_2.readyState == 4 && video_3.readyState == 4 && video_4.readyState == 4) {
video_1.play();
video_2.play();
video_3.play();
}
there's 3 more video tag like that, that 1 is only example.
.readyState
function before playing the video. But still not working. i will edit my question – morgan9999