From f800776508e7aee77dc4d8f7bbf0aa19a77ab0f9 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Thu, 23 Jun 2022 13:31:34 -0700 Subject: [PATCH] Port of #1493. Closes #2478. --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 69e0c516..3dccad93 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -956,6 +956,7 @@ class ReactExoplayerView extends FrameLayout implements int playbackState = player.getPlaybackState(); boolean playWhenReady = player.getPlayWhenReady(); String text = "onStateChanged: playWhenReady=" + playWhenReady + ", playbackState="; + eventEmitter.playbackRateChange(playWhenReady && playbackState == ExoPlayer.STATE_READY ? 1.0f : 0.0f); switch (playbackState) { case Player.STATE_IDLE: text += "idle";