diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 7d5bba1a..508a1a18 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1903,6 +1903,11 @@ public class ReactExoplayerView extends FrameLayout implements } public void setRateModifier(float newRate) { + if (newRate <= 0) { + DebugLog.w(TAG, "cannot set rate <= 0"); + return; + } + rate = newRate; if (player != null) { diff --git a/docs/pages/component/props.mdx b/docs/pages/component/props.mdx index e3c7986d..c6fca678 100644 --- a/docs/pages/component/props.mdx +++ b/docs/pages/component/props.mdx @@ -434,8 +434,8 @@ Default: 250.0 Speed at which the media should play. -- **0.0** - Pauses the video -- **1.0** - Play at normal speed +- **0.0** - Pauses the video (iOS only) +- **1.0** - Play at normal speed (default) - **Other values** - Slow down or speed up playback ### `repeat` diff --git a/examples/basic/src/VideoPlayer.tsx b/examples/basic/src/VideoPlayer.tsx index 4b657c1b..c4866e97 100644 --- a/examples/basic/src/VideoPlayer.tsx +++ b/examples/basic/src/VideoPlayer.tsx @@ -638,11 +638,13 @@ class VideoPlayer extends Component { /> + {/* shall be replaced by slider */} + {/* shall be replaced by slider */}