From a66e4d6d1a182650a6d1187d08151704bc3b2968 Mon Sep 17 00:00:00 2001 From: gnattu Date: Tue, 28 May 2024 01:33:29 +0800 Subject: [PATCH] Allow VideoStreamCopy for remote source fallback During LiveTV playback, a fallback is usually needed because the first attempt would be try to direct play the remote url of that channel. If that failed we should still allow stream copy because the playback would still success in this case. The server side will enforce the most compatible format (h264+ts) and still do transcoding if that condition is not met. --- src/components/playback/playbackmanager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index c11e176df3..e4d1860460 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -3304,10 +3304,10 @@ class PlaybackManager { const startTime = getCurrentTicks(player) || streamInfo.playerStartPositionTicks; changeStream(player, startTime, { - // force transcoding + // force transcoding and only allow remuxing for remote source like liveTV EnableDirectPlay: false, EnableDirectStream: false, - AllowVideoStreamCopy: false, + AllowVideoStreamCopy: streamInfo.item.LocationType === 'Remote' ? true : false, AllowAudioStreamCopy: currentlyPreventsAudioStreamCopy || currentlyPreventsVideoStreamCopy ? false : null });