Closed beaufortfrancois closed 4 years ago
This seems like a good suggestion to me. What do you think @mounirlamouri @jernoble?
When the exit Picture-in-Picture algorithm is invoked, the user agent MUST run the following steps:
- If pictureInPictureElement is null, throw a InvalidStateError and abort these steps.
- Run the close window algorithm with the Picture-in-Picture window associated with pictureInPictureElement.
- Unset pictureInPictureElement.
Queue a task to fire an event with the nameleavepictureinpicture
at the video with its bubbles attribute initialized to true.- Queue a task to fire an event with the name
leavepictureinpicture
usingPictureInPictureEvent
at the video with its bubbles attribute initialized to true and itspictureInPictureWindow
attribute initialized to "Picture-in-Picture window".
For info, here's the potential spec change: https://github.com/w3c/picture-in-picture/pull/189
@jernoble any concern from Apple here?
LGTM.
Originally posted by @marcoscaceres in https://github.com/w3c/picture-in-picture/pull/149