Skip to main content

usePictureInPictureMode()

usePictureInPictureMode(): boolean

Determines whether Picture-in-Picture (PiP) mode is currently active.

This hook provides a reactive way to observe and respond to changes in the player’s Picture-in-Picture mode — i.e., whether the video is being displayed in a floating, resizable overlay outside the main player view.

⚠️ Must be used within a PlayerProvider or AVPlayerViewControllerProvider component.

Returns

boolean

boolean true if Picture-in-Picture mode is active, otherwise false.

Example

function PiPStatus() {
const pictureInPictureMode = usePictureInPictureMode();

return (
<Text>
{pictureInPictureMode ? 'PiP active' : 'PiP inactive'}
</Text>
);
}