RESOLVED FIXED 35327
supportsMuting() Should be internal interface between MediaPlayer and MediaPlayerPrivate
https://bugs.webkit.org/show_bug.cgi?id=35327
Summary supportsMuting() Should be internal interface between MediaPlayer and MediaPl...
Nick Young
Reported 2010-02-23 21:40:05 PST
At the moment there is a bug with supportsMuting() under the following scenario: 1. setMuted() is called on the HTMLMediaElement before the MediaPlayer is constructed in loadResource(). m_muted in HTMLMediaElement is set to true, but nothing else of interest happens. 2. The MediaPlayer is contructed during loadResource and updateVolume() is called. updateVolume() assumes that supportsMuting() == false, and sets the volume of the MediaPlayer to 0 (because m_muted is true). 3. MediaPlayer loads a media engine which supports muting. Subsequent calls to supportsMuting() will return true. 4. Attempting to unmute the media element at this point is unsuccessful. MediaPlayer::m_muted changes, but MediaPlayer::m_volume is still zero. This can be solved by making sure that HTMLMediaElement::updateVolume() checks for supportsMuting(), and moving the call to updateVolume() in loadResource() to after the call to load() (i.e. Media Engine Selection). HOWEVER, I don't believe this is the correct solution. Why are we exposing supportsMuting() to HTMLMediaElement at all? This should be interface which exists only between MediaPlayer and MediaPlayerPrivate. Patch forthcoming.
Attachments
Initial Patch (3.25 KB, patch)
2010-02-23 21:52 PST, Nick Young
no flags
Nick Young
Comment 1 2010-02-23 21:52:47 PST
Created attachment 49356 [details] Initial Patch Cleaner interface. Solves a bug. Win-Win :-)
Eric Carlson
Comment 2 2010-02-24 07:17:38 PST
Comment on attachment 49356 [details] Initial Patch Very nice, thank you! r=me
WebKit Commit Bot
Comment 3 2010-02-24 19:34:40 PST
Comment on attachment 49356 [details] Initial Patch Clearing flags on attachment: 49356 Committed r55213: <http://trac.webkit.org/changeset/55213>
WebKit Commit Bot
Comment 4 2010-02-24 19:34:43 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.