shaun-chiang / rn-android-pip

React Native Android Picture-in-Picture Library.
MIT License
17 stars 24 forks source link

Current activity doesnt support picture-in-picture #1

Open hotdev405 opened 5 years ago

hotdev405 commented 5 years ago

Hi, i try to play video player from react-native-video in pip mode. the render methods return looks like this when I call the enterPip mode function from your library

<View>
<Video>
</View>

I get the error that the activity doesnt support it. Could you help me to fix it

hotdev405 commented 5 years ago
image
Yatanvesh commented 4 years ago

You have to add supportsPictureInPicture= true in you activity manifest. Here, I'll share my config: <activity android:name=".MainActivity" android:label="@string/app_name" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:resizeableActivity="true" android:supportsPictureInPicture="true" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|smallestScreenSize|orientation"