Bug 230738
Summary: | MediaSession API doesn't work in Picture in Picture. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mitsuo Matsunaga <mitsuo.matsunaga> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | eric.carlson, jer.noble, kevin_neal, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari Technology Preview | ||
Hardware: | All | ||
OS: | Unspecified |
Mitsuo Matsunaga
I created a simple page to try out the MediaSession API.
https://tsg02.p.uliza.jp/demo/webkit-report-/media-session-api.html
1.Open this page.
2.Press the Playback button.
3.Press the Picture in Picture button.
4.In Inspector - Sources tab, set a breakpoint in the setActionHandler('pause').
5.Press the pause button in Picture in Picture.
Do not break.
Note:
Break if I operate the control center.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Carlson
This is by design, it seems to me that the playback controls in the PiP window should be considered the same as the browser's default controls for inline or fullscreen playback.
The spec's definition of a "media session action source" does leave a lot of room for interpretation, but why would the "play" button in the PiP window invoke the MediaSession action handler when the "play" button in the inline controls does not?
Radar WebKit Bug Importer
<rdar://problem/83673931>
Mitsuo Matsunaga
In the case of inline, our players can detect button presses using our original controller.
Our players need to perform some action when the play button is pressed.
PiP window cannot be our original controller.
Therefore, we want PiP window to be the target of MediaSession API.
Not only that, we want browser's default controls to be the target of MediaSession API.
We want to disable seek while playing an ad when fullscreen on an iOS device.