diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 819abfee79..666034e6fd 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -3296,18 +3296,21 @@ class PlaybackManager { const streamInfo = error.streamInfo || getPlayerData(player).streamInfo; if (streamInfo?.url) { + const isAlreadyFallbacking = streamInfo.url.toLowerCase().includes('transcodereasons=directplayerror'); const currentlyPreventsVideoStreamCopy = streamInfo.url.toLowerCase().indexOf('allowvideostreamcopy=false') !== -1; const currentlyPreventsAudioStreamCopy = streamInfo.url.toLowerCase().indexOf('allowaudiostreamcopy=false') !== -1; // Auto switch to transcoding if (enablePlaybackRetryWithTranscoding(streamInfo, errorType, currentlyPreventsVideoStreamCopy, currentlyPreventsAudioStreamCopy)) { const startTime = getCurrentTicks(player) || streamInfo.playerStartPositionTicks; + const isRemoteSource = streamInfo.item.LocationType === 'Remote'; + // force transcoding and only allow remuxing for remote source like liveTV, but only for initial trial + const tryVideoStreamCopy = isRemoteSource && !isAlreadyFallbacking; changeStream(player, startTime, { - // force transcoding and only allow remuxing for remote source like liveTV EnableDirectPlay: false, EnableDirectStream: false, - AllowVideoStreamCopy: streamInfo.item.LocationType === 'Remote', + AllowVideoStreamCopy: tryVideoStreamCopy, AllowAudioStreamCopy: currentlyPreventsAudioStreamCopy || currentlyPreventsVideoStreamCopy ? false : null });