VEX-6350: add onPlaybackStateChanged prop (#25)

* Adds the new prop onPlaybackStateChanged
This commit is contained in:
Gabriel Rivero
2022-04-19 12:12:47 -04:00
committed by GitHub
parent f78c623df4
commit 03f77495fc
4 changed files with 43 additions and 1 deletions

View File

@@ -332,6 +332,7 @@ var styles = StyleSheet.create({
* [onFullscreenPlayerDidDismiss](#onfullscreenplayerdiddismiss)
* [onLoad](#onload)
* [onLoadStart](#onloadstart)
* [onPlaybackStateChanged]($onPlaybackStateChanged)
* [onReadyForDisplay](#onreadyfordisplay)
* [onPictureInPictureStatusChanged](#onpictureinpicturestatuschanged)
* [onPlaybackRateChange](#onplaybackratechange)
@@ -1110,6 +1111,24 @@ Example:
Platforms: all
#### onPlaybackStateChanged
Callback function that is called when the playback state changes.
Payload:
Property | Description
--- | ---
isPlaying | boolean | Boolean indicating if the media is playing or not
Example:
```
{
isPlaying: true,
}
```
Platforms: Android ExoPlayer
#### onReadyForDisplay
Callback function that is called when the first video frame is ready for display. This is when the poster is removed.