Picture-in-Page
To test this feature and view the example code, please see the Browsers and Connected TV SDK 5 Example Code Quick Start guide. This feature is not supported by the Reduced Size SDK.
Picture-in-page mode moves the player to a fixed position in the bottom right corner of the page.
This feature should not be confused with full picture-in-picture where the video pane can float separately away from its parent browser window - see below.
Once the feature is enabled, you can initiate it using the corresponding button on the control bar. Alternatively, (by default) it is initiated automatically when 50% of the player is scrolled vertically out of the viewport. This feature is disabled by default; use the following code to enable automatic scroll-based initiation.
playerInstance.otvtoolkit().enablePiP();
Picture-in-Picture
A browsers native Picture-in-Picture functionality can be enabled in deployments where QuickMark forensic watermarking is not enabled.
playerInstance.requestPictureInPicture();
The browser enforces that the initiation of this function has come from a user gesture, e.g. mouse click of a UI element.
Browser/Streaming differences
|
Behaviour |
Safari / HLS |
DASH |
|---|---|---|
|
Subtitles |
Native subtitles rendered in the child PiP window. |
Subtitles remain rendered in the original parent video pane. |
|
Position |
Restricted by MacOS to be in one of the 4 corners of the screen. |
Freely movable. |
|
Controls |
Browser renders native controls in child PiP window. |
Browser renders native controls in child PiP window. |