[Webkit-unassigned] [Bug 147633] Media Session: push paused state to the media session focus manager instead of polling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 5 17:57:39 PDT 2015


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

--- Comment #9 from Matt Rajca <mrajca at apple.com> ---
(In reply to comment #8)
> Comment on attachment 258291 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=258291&action=review
> 
> >>> Source/WebCore/dom/Document.h:1263
> >>> +    WEBCORE_EXPORT void updateIsPlayingMedia(uint64_t);
> >> 
> >> How does this work if more than one media element is playing?
> > 
> > Every time any media element changes its 'playing' state, that information propagates to the UI process. The UI process keeps track of the currently focused media element belonging to a "Content" Media Session (there can only be one at a time). If the element IDs match, we can cache the 'playing' state as the focused media element's playing state.
> 
> Please make a typedef for this uint64_t (MediaElementID or whatever), and
> convert the current code to use it. You can do this in a separate patch.

Filed Bug 147709.

> 
> Give this a default argument, so you don't have to specify
> HTMLMediaElementInvalidID everywhere.

Done.

> 
> > Source/WebCore/html/HTMLMediaElement.cpp:3177
> > +#if ENABLE(MEDIA_SESSION)
> > +        document().updateIsPlayingMedia(m_elementID);
> > +#else
> > +        document().updateIsPlayingMedia(0);
> > +#endif
> 
> This #ifdef is confusing. Why can't you always pass m_elementID?

Element IDs are only assigned under the Media Session feature flag. With the default argument added, though, the confusing 0 argument is now gone.

> 
> > Source/WebCore/html/HTMLMediaElement.cpp:4545
> > +#if ENABLE(MEDIA_SESSION)
> > +    document().updateIsPlayingMedia(m_elementID);
> > +#else
> > +    document().updateIsPlayingMedia(0);
> > +#endif
> 
> Ditto.
> 
> > Source/WebCore/html/HTMLMediaElement.cpp:4810
> > +#if ENABLE(MEDIA_SESSION)
> > +    document().updateIsPlayingMedia(m_elementID);
> > +#else
> > +    document().updateIsPlayingMedia(0);
> > +#endif
> 
> Ditto.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150806/3bf5a2a9/attachment-0001.html>


More information about the webkit-unassigned mailing list