diff --git a/CHANGELOG.md b/CHANGELOG.md index 5863b9f20b..a91fd63833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +### next +* Added `onPlaybackRateChange` to README [#1578](https://github.com/react-native-community/react-native-video/pull/1578) + ### Version 4.4.1 * Fix tvOS picture-in-picture compilation regression [#1518](https://github.com/react-native-community/react-native-video/pull/1518) * fullscreen rotation issues with iOS built-in controls [#1441](https://github.com/react-native-community/react-native-video/pull/1441) diff --git a/README.md b/README.md index 1527448758..b5f99f218b 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,7 @@ var styles = StyleSheet.create({ * [onLoad](#onload) * [onLoadStart](#onloadstart) * [onPictureInPictureStatusChanged](#onpictureinpicturestatuschanged) +* [onPlaybackRateChange](#onplaybackratechange) * [onProgress](#onprogress) * [onSeek](#onseek) * [onRestoreUserInterfaceForPictureInPictureStop](#onrestoreuserinterfaceforpictureinpicturestop) @@ -969,6 +970,23 @@ isActive: true Platforms: iOS +#### onPlaybackRateChange +Callback function that is called when the rate of playback changes - either paused or starts/resumes. + +Property | Type | Description +--- | --- | --- +playbackRate | number | 0 when playback is paused, 1 when playing at normal speed. Other values when playback is slowed down or sped up + +Example: +``` +{ + playbackRate: 0, // indicates paused +} +``` + +Platforms: all + + #### onProgress Callback function that is called every progressUpdateInterval seconds with info about which position the media is currently playing.