API
Picture In Picture
An overview on requesting and tracking picture-in-picture changes.
Requesting
Section titled RequestingThe player will use the Picture In Picture (PIP) on supported browsers and
WebKit Presentation API on iOS Safari for entering and exiting PIP mode. You can
request PIP changes by using the PIPButton
, remote control, or
via methods on the player instance.
Remote Control
Section titled Remote ControlThe media remote provides methods for dispatching media-enter-pip-request
and
media-exit-pip-request
request events like so:
Methods
Section titled MethodsThe following enterPictureInPicture()
and exitPictureInPicture()
methods are available on the
player component instance for requesting PIP mode changes:
State
Section titled StateThe following PIP properties are available on the media store:
canPictureInPicture
: Whether PIP is supported by the current browser or provider.pictureInPicture
: Whether the PIP mode is active.
Styling
Section titled StylingThe following media data attributes are available for styling based on the current PIP state:
Events
Section titled EventsThe following events are available for detecting PIP mode changes or errors: