mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Always try transcode as last resort
This commit is contained in:
parent
2b59a9f998
commit
20e29b81b5
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue