Skip to content

Commit

Permalink
docs: add pictureInPicture prop's Android guide
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJonghun committed Jan 20, 2024
1 parent 2872689 commit 9723313
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/pages/component/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,17 @@ Determine whether the media should played as picture in picture.
* **false (default)** - Don't not play as picture in picture
* **true** - Play the media as picture in picture

To use this feature on Android, you must:
* [Declare PiP support](https://developer.android.com/develop/ui/views/picture-in-picture#declaring) in your AndroidManifest.xml
* setting `android:supportsPictureInPicture` to `true`
Example
```xml
<activity
android:name=".MainActivity"
...
android:supportsPictureInPicture="true">
```

NOTE: Video ads cannot start when you are using the PIP on iOS (more info available at [Google IMA SDK Docs](https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/picture_in_picture?hl=en#starting_ads)). If you are using custom controls, you must hide your PIP button when you receive the ```STARTED``` event from ```onReceiveAdEvent``` and show it again when you receive the ```ALL_ADS_COMPLETED``` event.

Platforms: Android, iOS
Expand Down

0 comments on commit 9723313

Please sign in to comment.