From 08952f852521a1981b924e050fc97d52a5800f03 Mon Sep 17 00:00:00 2001 From: Olgun Kaya Date: Mon, 11 Oct 2021 19:45:46 +0300 Subject: [PATCH] Fixed to send events only for player playing the actual content. --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 2ec8128d..6e6b5908 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -800,7 +800,7 @@ class ReactExoplayerView extends FrameLayout implements } private void videoLoaded() { - if (loadVideoStarted) { + if (!player.isPlayingAd() && loadVideoStarted) { loadVideoStarted = false; setSelectedAudioTrack(audioTrackType, audioTrackValue); setSelectedVideoTrack(videoTrackType, videoTrackValue);