test
npm install react-native-enable-pip-in-androidenable picture-in-picture in android
``sh`
npm install react-native-enable-pip-in-android
If you want support PIP in your app, register your video activity in your manifest by setting android:supportsPictureInPicture and android:resizeableActivity to true. Edit your AndroidManifest.xml :
``
android:label="@string/app_name"
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode|locale|layoutDirection|fontScale|screenLayout|density|smallestScreenSize"
android:launchMode="singleTask"
...
$ react-native link react-native-enable-pip-in-android
`javascript``
import { enterPictureInPictureMode } from 'react-native-enable-pip-in-android';
function pipHandler() {
enterPictureInPictureMode();
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
---
Made with create-react-native-library