[Webkit-unassigned] [Bug 94786] MediaController play() doesn't work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 27 02:31:45 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=94786





--- Comment #5 from Changbin Shao <changbin.shao at intel.com>  2012-08-27 02:31:47 PST ---
Thanks a lot for your explanation! 

(In reply to comment #4)
> (In reply to comment #3)
> > Thanks, it make sense for me now. While I still have questions here.
> > For instance, there are two video tags, with id vid1 & vid2.
> > 
> > var con = new MediaController();
> > vid1.controller = con;
> > vid2.controller = con;
> > con.play();//won't work since MediaController is blocked.
> > vid1.play();//won't work since MediaController is blocked(because MediaElement 2 is still paused) 
> 
> Not quite.  The MediaController is only blocked if *all* of its slaved media elements are paused.  So at this point, the MediaController goes from a blocked media controller to a playing one.  Vid1 will begin playing.

Just for your information. Spec says: "A MediaController is a blocked media controller...if any of its slaved media elements whose autoplaying flag is true still have their paused attribute set to true" && "All media elements have an autoplaying flag, which must begin in the true state", so I think vid2 still blocks mediaController, thus vid1 is still not able to play. Checked my idea on Chrome. 

> > vid2.play(); //works, since MediaController is not blocked now.
> > con.pause();//MediaController is paused. How about its slaved elements, should be paused or not? 
> 
> They are blocked on their MediaController.  They are still "playing" technically, but their timelines are stopped.
> 
> > con.play();//what the result should be? As the spec says: "A MediaController is a blocked media controller if the MediaController is a paused media controller...",so no video should play?
> 
> Once the MediaController goes from a paused media controller to a playing media controller, the slaved media elements should begin playing.  (Assuming the MediaController does not become blocked for some other reason, like one of the slaved media elements stalling, etc.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list