Address some of the feedback from the pull reqeust
This commit is contained in:
committed by
Abdulrahman Alzenki
parent
4a16151195
commit
62dc913cb3
101
README.md
101
README.md
@@ -271,6 +271,7 @@ var styles = StyleSheet.create({
|
||||
* [maxBitRate](#maxbitrate)
|
||||
* [muted](#muted)
|
||||
* [paused](#paused)
|
||||
* [pictureInPicture](#pictureinpicture)
|
||||
* [playInBackground](#playinbackground)
|
||||
* [playWhenInactive](#playwheninactive)
|
||||
* [poster](#poster)
|
||||
@@ -298,12 +299,12 @@ var styles = StyleSheet.create({
|
||||
* [onFullscreenPlayerDidPresent](#onfullscreenplayerdidpresent)
|
||||
* [onFullscreenPlayerWillDismiss](#onfullscreenplayerwilldismiss)
|
||||
* [onFullscreenPlayerDidDismiss](#onfullscreenplayerdiddismiss)
|
||||
* [onIsPictureInPictureActive](#onispictureinpictureactive)
|
||||
* [onIsPictureInPictureSupported](#onispictureinpicturesupported)
|
||||
* [onLoad](#onload)
|
||||
* [onLoadStart](#onloadstart)
|
||||
* [onPictureInPictureStatusChanged](#onpictureinpicturestatuschanged)
|
||||
* [onProgress](#onprogress)
|
||||
* [onSeek](#onseek)
|
||||
* [onRestoreUserInterfaceForPictureInPictureStop](#onrestoreuserinterfaceforpictureinpicturestop)
|
||||
* [onTimedMetadata](#ontimedmetadata)
|
||||
|
||||
### Methods
|
||||
@@ -311,9 +312,7 @@ var styles = StyleSheet.create({
|
||||
* [presentFullscreenPlayer](#presentfullscreenplayer)
|
||||
* [save](#save)
|
||||
* [restoreUserInterfaceForPictureInPictureStop](#restoreuserinterfaceforpictureinpicturestop)
|
||||
* [startPictureInPicture](#startpictureinpicture)
|
||||
* [seek](#seek)
|
||||
* [stopPictureInPicture](#stoppictureinpicture)
|
||||
|
||||
### Configurable props
|
||||
|
||||
@@ -491,6 +490,13 @@ Controls whether the media is paused
|
||||
|
||||
Platforms: all
|
||||
|
||||
#### pictureInPicture
|
||||
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
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### playInBackground
|
||||
Determine whether the media should continue playing while the app is in the background. This allows customers to continue listening to the audio.
|
||||
* **false (default)** - Don't continue playing the media
|
||||
@@ -866,38 +872,6 @@ Payload: none
|
||||
|
||||
Platforms: Android ExoPlayer, Android MediaPlayer, iOS
|
||||
|
||||
#### onIsPictureInPictureActive
|
||||
Callback function that is called when picture in picture becomes active or inactive.
|
||||
|
||||
Property | Type | Description
|
||||
--- | --- | ---
|
||||
active | boolean | Boolean indicating whether picture in picture is active
|
||||
|
||||
Example:
|
||||
```
|
||||
{
|
||||
active: true
|
||||
}
|
||||
```
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### onIsPictureInPictureSupported
|
||||
Callback function that is called initially to determine whether or not picture in picture is supported.
|
||||
|
||||
Property | Type | Description
|
||||
--- | --- | ---
|
||||
supported | boolean | Boolean indicating whether picture in picture is supported
|
||||
|
||||
Example:
|
||||
```
|
||||
{
|
||||
supported: true
|
||||
}
|
||||
```
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### onLoad
|
||||
Callback function that is called when the media is loaded and ready to play.
|
||||
|
||||
@@ -963,6 +937,22 @@ Example:
|
||||
|
||||
Platforms: all
|
||||
|
||||
#### onPictureInPictureStatusChanged
|
||||
Callback function that is called when picture in picture becomes active or inactive.
|
||||
|
||||
Property | Type | Description
|
||||
--- | --- | ---
|
||||
isActive | boolean | Boolean indicating whether picture in picture is active
|
||||
|
||||
Example:
|
||||
```
|
||||
{
|
||||
isActive: true
|
||||
}
|
||||
```
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### onProgress
|
||||
Callback function that is called every progressUpdateInterval seconds with info about which position the media is currently playing.
|
||||
|
||||
@@ -1006,6 +996,13 @@ Both the currentTime & seekTime are reported because the video player may not se
|
||||
|
||||
Platforms: Android ExoPlayer, Android MediaPlayer, iOS, Windows UWP
|
||||
|
||||
#### onRestoreUserInterfaceForPictureInPictureStop
|
||||
Callback function that corresponds to Apple's [`restoreUserInterfaceForPictureInPictureStopWithCompletionHandler`](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). Call `restoreUserInterfaceForPictureInPictureStopCompleted` inside of this function when done restoring the user interface.
|
||||
|
||||
Payload: none
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### onTimedMetadata
|
||||
Callback function that is called when timed metadata becomes available
|
||||
|
||||
@@ -1094,26 +1091,14 @@ Future:
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### restoreUserInterfaceForPictureInPictureStop
|
||||
`restoreUserInterfaceForPictureInPictureStop(restore)`
|
||||
#### restoreUserInterfaceForPictureInPictureStopCompleted
|
||||
`restoreUserInterfaceForPictureInPictureStopCompleted(restored)`
|
||||
|
||||
This function corresponds to Apple's [restoreUserInterfaceForPictureInPictureStop](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). IMPORTANT: After picture in picture stops, this function must be called.
|
||||
This function corresponds to the completion handler in Apple's [restoreUserInterfaceForPictureInPictureStop](https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate/1614703-pictureinpicturecontroller?language=objc). IMPORTANT: This function must be called after `onRestoreUserInterfaceForPictureInPictureStop` is called.
|
||||
|
||||
Example:
|
||||
```
|
||||
this.player.restoreUserInterfaceForPictureInPictureStop(true);
|
||||
```
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### startPictureInPicture
|
||||
`startPictureInPicture()`
|
||||
|
||||
Calling this function will start picture in picture if it is supported.
|
||||
|
||||
Example:
|
||||
```
|
||||
this.player.startPictureInPicture();
|
||||
this.player.restoreUserInterfaceForPictureInPictureStopCompleted(true);
|
||||
```
|
||||
|
||||
Platforms: iOS
|
||||
@@ -1147,18 +1132,6 @@ this.player.seek(120, 50); // Seek to 2 minutes with +/- 50 milliseconds accurac
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
#### stopPictureInPicture
|
||||
`stopPictureInPicture()`
|
||||
|
||||
Calling this function will stop picture in picture if it is currently active.
|
||||
|
||||
Example:
|
||||
```
|
||||
this.player.stopPictureInPicture();
|
||||
```
|
||||
|
||||
Platforms: iOS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user