WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129903
Add remote control command support to MediaSession.
https://bugs.webkit.org/show_bug.cgi?id=129903
Summary
Add remote control command support to MediaSession.
Jer Noble
Reported
2014-03-07 13:04:30 PST
Add remote control command support to MediaSession.
Attachments
Patch
(31.33 KB, patch)
2014-03-07 13:26 PST
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(31.39 KB, patch)
2014-03-13 11:25 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(34.16 KB, patch)
2014-03-13 14:05 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(34.16 KB, patch)
2014-03-13 14:20 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(34.16 KB, patch)
2014-03-13 14:31 PDT
,
Jer Noble
eric.carlson
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2014-03-07 13:26:25 PST
Created
attachment 226157
[details]
Patch
Eric Carlson
Comment 2
2014-03-07 15:08:48 PST
Comment on
attachment 226157
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226157&action=review
> Source/WebCore/html/HTMLMediaElement.cpp:5858 > +void HTMLMediaElement::didReceiveRemoteControlCommand(MediaSession::RemoteControlCommandType command) > +{ > + UNUSED_PARAM(command); > +}
A FIXME would be helpful here.
> Source/WebCore/platform/audio/MediaSessionManager.cpp:43 > + : m_mostRecentlyActive(nullptr)
How about m_currentSession? I think "current session" makes more sense than "most recently active session"
> Source/WebCore/platform/audio/MediaSessionManager.cpp:106 > + if (!m_clients.isEmpty() && (session.mediaType() == MediaSession::Video || session.mediaType() == MediaSession::Audio)) {
Nit: this could be an early return.
> Source/WebCore/platform/audio/MediaSessionManager.cpp:124 > + if (!m_clients.isEmpty() && (session.mediaType() == MediaSession::Video || session.mediaType() == MediaSession::Audio)) {
Ditto.
> Source/WebCore/platform/audio/MediaSessionManager.cpp:166 > + if (!m_clients.isEmpty() && (session.mediaType() == MediaSession::Video || session.mediaType() == MediaSession::Audio)) {
Ditto.
Jer Noble
Comment 3
2014-03-13 11:25:31 PDT
Created
attachment 226602
[details]
Patch
Eric Carlson
Comment 4
2014-03-13 11:37:50 PDT
Comment on
attachment 226602
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226602&action=review
> Source/WebCore/platform/audio/MediaSessionManager.cpp:172 > + for (auto& client : m_clients) > + client->didBeginPlayback();
Shouldn't this be above the "if (!restrictions & ConcurrentPlaybackNotPermitted)" above?
> Source/WebCore/platform/audio/MediaSessionManager.cpp:211 > + if (!m_currentSession) > + return;
if (!m_currentSession || !m_currentSession->canReceiveRemoteControlCommands())
Jer Noble
Comment 5
2014-03-13 14:05:15 PDT
Created
attachment 226620
[details]
Patch
Eric Carlson
Comment 6
2014-03-13 14:16:28 PDT
Comment on
attachment 226620
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=226620&action=review
> Source/WebCore/platform/audio/MediaSessionManager.cpp:171 > + m_activeSession = &session;
This is unnecessary, we already called setCurrentSession() above.
> Source/WebCore/platform/audio/MediaSessionManager.cpp:177 > + for (auto& client : m_clients) > + client->didBeginPlayback();
Move up?
> Source/WebCore/platform/audio/MediaSessionManager.cpp:217 > + if (!m_activeSession) > + return; > + m_activeSession->didReceiveRemoteControlCommand(command);
canReceiveRemoteControlCommands()?
Jer Noble
Comment 7
2014-03-13 14:20:19 PDT
Created
attachment 226622
[details]
Patch
Jer Noble
Comment 8
2014-03-13 14:31:34 PDT
Created
attachment 226624
[details]
Patch
Jer Noble
Comment 9
2014-03-13 15:04:41 PDT
Committed
r165570
: <
http://trac.webkit.org/changeset/165570
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug