w3c/mediasession

EnterPictureInPicture MediaSessionAction

Closed this issue · 2 comments

Having an 'enterpictureinpicture' MediaSessionAction could be a useful addition. While in some cases the user agent can determine a way to enter picture-in-picture (e.g. use requestPictureInPicture() on the only active video element on the page), there are cases where delegating to the website makes sense:

  1. If the website has multiple active video elements
  2. If the website does not have a video element, but will create one for a picture-in-picture experience (I believe Spotify does this for a pip music player)
  3. If the website wants to use Document Picture-in-Picture

Note that I don't think 'exitpictureinpicture' would have value since the user agent can just close any open PiP window

I'll close this, as we've merged #295.