aws / aws/amazon-ivs-react-native-player

Suggestion: Change behaviour of PIP to allow more customisable flow

Open
#161 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
313
Forks
42
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
This is not a bug, but more a feature request.

IOS:
- Currently PIP works globally for all instances of IVSPlayer by default. It would be good to move the preparePictureInPicture() to be callable through javascript layer in order to specfically enable PIP for the player instance you want rather than having it be enabled by default. For example initPip({...options})

Android:
- The current implementation on Android differs from the iOS implementation. On Android togglePip must be explicitly called in order to enter PIP mode. However with later Android its possible to setAutoEnterEnabled(true) on the PictureInPictureParams in order for the PIP mode to automatically be entered when clicking home or using swipe gesture to hide the app (like on iOS)
- Currently there is no way to set the aspect ratio of the PIP and it defaults to horizontal aspect ratio. It would be good to have the same approach with initPip({...options}) in order to instruct both if you want it to autoEnter pip and what the desired aspect ratio would be through setAspectRatio() in setPictureInPictureParams(PictureInPictureParams)

**To reproduce**
- Use current API and see that there is potential for allowing more flexible, and better usability of the PIP modes

**Expected behavior**
See original description

**Screenshots**
No screenshots

**Device (please complete the following information):**
- all iOS and Android
-
**Debug logs**
Not relevant

**Additional context**
This is a feature request

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.