From fccbc939d9fd2643743e55204b668d656ad252c9 Mon Sep 17 00:00:00 2001 From: Joe Meyer Date: Fri, 3 May 2019 09:54:12 -0500 Subject: [PATCH 1/4] Adds onPlaybackRateChange to README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 1527448758..8812be8970 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 | 1 if playback is ongoing and 0 otherwise + +Example: +``` +{ + playbackRate: 0, +} +``` + +Platforms: all + + #### onProgress Callback function that is called every progressUpdateInterval seconds with info about which position the media is currently playing. From 4efd0b5fa4128ca7e885cba891e91ca689693a9d Mon Sep 17 00:00:00 2001 From: Joe Meyer Date: Tue, 11 Jun 2019 15:52:59 -0500 Subject: [PATCH 2/4] Updates README description --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8812be8970..b5f99f218b 100644 --- a/README.md +++ b/README.md @@ -975,12 +975,12 @@ Callback function that is called when the rate of playback changes - either paus Property | Type | Description --- | --- | --- -playbackRate | number | 1 if playback is ongoing and 0 otherwise +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, + playbackRate: 0, // indicates paused } ``` From 5f42e0fb88d7f53a26381d6ed5102a7f87a0ce0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mari=C3=B1o=20Ruiz?= <1237997+CHaNGeTe@users.noreply.github.com> Date: Wed, 12 Jun 2019 07:01:36 +0200 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5863b9f20b..a6ebe1332b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +### next +* Improve README for `onPlaybackRateChange` [#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) From 4223f5dfe53690d538c9fa1186a656fb0b30f79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mari=C3=B1o=20Ruiz?= <1237997+CHaNGeTe@users.noreply.github.com> Date: Wed, 12 Jun 2019 07:04:43 +0200 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ebe1332b..a91fd63833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Changelog ### next -* Improve README for `onPlaybackRateChange` [#1578](https://github.com/react-native-community/react-native-video/pull/1578) +* 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)