From 7d481c18edbcd35e1234251dd0edb5bbc072304b Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Mon, 22 May 2023 20:41:10 +0200 Subject: [PATCH] Disable ExoPlayer and External player while in SyncPlay (cherry picked from commit 49b821ea4e7f8c181239e0a65544e861e04dd8bb) --- app/src/main/assets/native/ExoPlayerPlugin.js | 4 +++- app/src/main/assets/native/ExternalPlayerPlugin.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/native/ExoPlayerPlugin.js b/app/src/main/assets/native/ExoPlayerPlugin.js index 7b04a9abb..a5cc27d07 100644 --- a/app/src/main/assets/native/ExoPlayerPlugin.js +++ b/app/src/main/assets/native/ExoPlayerPlugin.js @@ -48,7 +48,9 @@ export class ExoPlayerPlugin { } canPlayItem(item, playOptions) { - return this._nativePlayer.isEnabled() && playOptions.fullscreen; + return this._nativePlayer.isEnabled() && + playOptions.fullscreen && + !this.playbackManager.syncPlayEnabled; } async stop(destroyPlayer) { diff --git a/app/src/main/assets/native/ExternalPlayerPlugin.js b/app/src/main/assets/native/ExternalPlayerPlugin.js index c2604a854..77ba1cbc6 100644 --- a/app/src/main/assets/native/ExternalPlayerPlugin.js +++ b/app/src/main/assets/native/ExternalPlayerPlugin.js @@ -34,7 +34,9 @@ export class ExternalPlayerPlugin { } canPlayItem(item, playOptions) { - return this._externalPlayer.isEnabled() && playOptions.fullscreen; + return this._externalPlayer.isEnabled() && + playOptions.fullscreen && + !this.playbackManager.syncPlayEnabled; } currentSrc() {