From edd3cc169819c7ce8c457fececd569fd52977d08 Mon Sep 17 00:00:00 2001 From: Armands Malejevs Date: Wed, 30 Mar 2022 15:27:09 +0300 Subject: [PATCH] Fix runtime issues --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 4d8fd980..759989ef 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -537,13 +537,13 @@ class ReactExoplayerView extends FrameLayout implements @Override public void run () { // Source initialization must run on the main thread - initializePlayerSource(self, drmSessionManager); + initializePlayerSource(self, drmSessionManager, srcUri); } }); } }); } else { - initializePlayerSource(self, null); + initializePlayerSource(self, null, srcUri); } @@ -613,9 +613,9 @@ class ReactExoplayerView extends FrameLayout implements return drmSessionManager; } - private void initializePlayerSource(ReactExoplayerView self, DrmSessionManager drmSessionManager) { + private void initializePlayerSource(ReactExoplayerView self, DrmSessionManager drmSessionManager, Uri srcUri) { ArrayList mediaSourceList = buildTextSources(); - MediaSource videoSource = self.buildMediaSource(self.srcUri, self.extension, drmSessionManager); + MediaSource videoSource = self.buildMediaSource(srcUri, self.extension, drmSessionManager); MediaSource mediaSource; if (mediaSourceList.size() == 0) { mediaSource = videoSource;