0

I'm trying to use webkits mediagroup (link to apple developer guide pdf, see page 42) to sync two html videos but it keeps giving me a headache. The MediaController doesnt seem to be working properly. In chrome the video seeks to the end of the video every time I call .pause(). Here is what the setup looks like.

(I only used one video here, but the result is the same if you use two videos and set the same controller on both of them)

HTML

<video id="video" src="http://videos.mozilla.org/serv/webmademovies/popcorntest.mp4"></video>

JS

videoController = new MediaController(),
video = document.getElementById('video');

video.controller = videoController;
$('#somebutton').on('click', function() {
    videoController.pause();
});

Here is a fiddle. (In safari this fiddle works if you set the "autoplay" attribute on the video, otherwise the video wont play.)

According to Apples guide (referenced above) this is one of the two ways to set it up. The other way is to set a mediagroup="videoController" directly on the video tag and then access the controller with document.getElementById('video').controller. I tried both with the same result.

Is this a bug in Chrome or is it not just implemented the same way as in Safari? Seems too odd to be intended.

datacarl
  • 2,591
  • 25
  • 21

1 Answers1

0

It's a bug in chrome. Here is the issue.

datacarl
  • 2,591
  • 25
  • 21