RESOLVED FIXED 145829
Explicitly keep track of active HTMLMediaElements in MediaSessions
https://bugs.webkit.org/show_bug.cgi?id=145829
Summary Explicitly keep track of active HTMLMediaElements in MediaSessions
Matt Rajca
Reported 2015-06-09 17:28:31 PDT
In preparation for implementing the media session invocation algorithm as described in the Media Session spec, we should be explicitly keeping track of active media elements.
Attachments
Patch (3.92 KB, patch)
2015-06-09 17:35 PDT, Matt Rajca
no flags
Patch (re-based) (3.86 KB, patch)
2015-06-09 18:10 PDT, Matt Rajca
no flags
Patch (4.32 KB, patch)
2015-06-10 09:23 PDT, Matt Rajca
no flags
Patch (commented and fixed build error) (4.35 KB, patch)
2015-06-10 09:27 PDT, Matt Rajca
no flags
Patch (4.35 KB, patch)
2015-06-10 09:29 PDT, Matt Rajca
no flags
Radar WebKit Bug Importer
Comment 1 2015-06-09 17:30:08 PDT
Matt Rajca
Comment 2 2015-06-09 17:35:44 PDT
Matt Rajca
Comment 3 2015-06-09 18:10:18 PDT
Created attachment 254619 [details] Patch (re-based)
Eric Carlson
Comment 4 2015-06-09 20:06:01 PDT
Comment on attachment 254619 [details] Patch (re-based) View in context: https://bugs.webkit.org/attachment.cgi?id=254619&action=review > Source/WebCore/html/HTMLMediaElement.cpp:2836 > + if (m_readyState == HAVE_CURRENT_DATA || m_readyState == HAVE_FUTURE_DATA) { > + if (m_session) > + m_session->addActiveMediaElement(*this); > + } As we do elsewhere in this file, please include a comment with the text from the media session spec to explain why this is happening: // https://mediasession.spec.whatwg.org/#activating-a-media-session // 6.3. Activating a media session from a media element // When the play() method on a media element is invoked and ... // 1. Let media session be the value of media element’s current media session. // 2. ... etc.
Matt Rajca
Comment 5 2015-06-10 09:23:44 PDT
Matt Rajca
Comment 6 2015-06-10 09:24:20 PDT
(In reply to comment #4) > Comment on attachment 254619 [details] > Patch (re-based) > > View in context: > https://bugs.webkit.org/attachment.cgi?id=254619&action=review > > > Source/WebCore/html/HTMLMediaElement.cpp:2836 > > + if (m_readyState == HAVE_CURRENT_DATA || m_readyState == HAVE_FUTURE_DATA) { > > + if (m_session) > > + m_session->addActiveMediaElement(*this); > > + } > > As we do elsewhere in this file, please include a comment with the text from > the media session spec to explain why this is happening: > > // https://mediasession.spec.whatwg.org/#activating-a-media-session > // 6.3. Activating a media session from a media element > // When the play() method on a media element is invoked and ... > // 1. Let media session be the value of media element’s current media > session. > // 2. ... > > etc. Done.
WebKit Commit Bot
Comment 7 2015-06-10 09:25:53 PDT
Attachment 254656 [details] did not pass style-queue: ERROR: Source/WebCore/html/HTMLMediaElement.cpp:2842: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Matt Rajca
Comment 8 2015-06-10 09:27:22 PDT
Created attachment 254657 [details] Patch (commented and fixed build error)
WebKit Commit Bot
Comment 9 2015-06-10 09:28:51 PDT
Attachment 254657 [details] did not pass style-queue: ERROR: Source/WebCore/html/HTMLMediaElement.cpp:2843: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Matt Rajca
Comment 10 2015-06-10 09:29:21 PDT
WebKit Commit Bot
Comment 11 2015-06-10 11:44:25 PDT
Comment on attachment 254658 [details] Patch Clearing flags on attachment: 254658 Committed r185424: <http://trac.webkit.org/changeset/185424>
WebKit Commit Bot
Comment 12 2015-06-10 11:44:29 PDT
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.