Bug 222405

Summary: Now Playing is not working when GPUP Media is enabled
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: MediaAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Jean-Yves Avenard [:jya]
Reported 2021-02-24 22:27:53 PST
Now Playing is not working when GPUP Media is enabled
Attachments
Patch (2.01 KB, patch)
2021-02-24 23:58 PST, Jean-Yves Avenard [:jya]
no flags
Patch (2.00 KB, patch)
2021-02-25 16:18 PST, Jean-Yves Avenard [:jya]
no flags
Patch (1.99 KB, patch)
2021-02-25 16:21 PST, Jean-Yves Avenard [:jya]
no flags
Patch for landing (1.33 KB, patch)
2021-03-01 14:21 PST, Michael Catanzaro
no flags
Jean-Yves Avenard [:jya]
Comment 1 2021-02-24 23:58:46 PST
Eric Carlson
Comment 2 2021-02-25 09:06:56 PST
Comment on attachment 421506 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421506&action=review > Source/WebCore/ChangeLog:16 > + MediaSessionManagerCocoa::setNowPlayingInfo would have always been called > + with false (setAsNowPlayingApplication) when the GPU process was in use. > + It needed to be called at least once. > + MRMediaRemoteSetCanBeNowPlayingApplication is fairly CPU intensive, so we > + ensure we only call it if no content had been played before and never again. This comment isn't quite accurate because we will need to call `MRMediaRemoteSetCanBeNowPlayingApplication(true)` again if we want to become the NowPlaying application after having called `MRMediaRemoteSetCanBeNowPlayingApplication(false)`. Your code change works because we clear `m_nowPlayingInfo` if we call `MRMediaRemoteSetCanBeNowPlayingApplication(false)`, so I think only the comment needs too be updated.
Jean-Yves Avenard [:jya]
Comment 3 2021-02-25 16:18:43 PST
Jean-Yves Avenard [:jya]
Comment 4 2021-02-25 16:21:10 PST
EWS
Comment 5 2021-02-25 17:53:41 PST
Committed r273523: <https://commits.webkit.org/r273523> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421583 [details].
Radar WebKit Bug Importer
Comment 6 2021-02-25 17:54:15 PST
Michael Catanzaro
Comment 7 2021-03-01 14:21:15 PST
Reopening to attach new patch.
Michael Catanzaro
Comment 8 2021-03-01 14:21:17 PST
Created attachment 421867 [details] Patch for landing
EWS
Comment 9 2021-03-01 15:15:31 PST
Committed r273697: <https://commits.webkit.org/r273697> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421867 [details].
Note You need to log in before you can comment on or make changes to this bug.