Skip to main content

Picture in picture (PiP)

What you learn​

You're instantiating DIVA Player in your app and relying on DIVA Back Office as the video streaming source.

The goal of this article is to build the simplest front-end to stream a video from the DIVA Back Office with enabled PiP view.

Before starting​

  • Ensure the DIVA Back Office instance you rely on is up and running.

  • Ask your video engineers team <videoId>, <settingsURL>, <languageCountryCode>, <userToken> and <sharedKey>.

  • In the settings file, the general section must contain "pipMode": true, like in the following example:

    {
    "general": {
    ...
    "pipMode": true,
    ...
    },
    ...
    }

Instantiation​

There's no code to add to the Basic instantiation code. Verify that in AndroidManifest.xml the PiP feature is enabled:

<activity
...
android:supportsPictureInPicture="true">
...
</activity>