From a5163d0be4c4d0dd87a3d5aa266e6f84542b7812 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Tue, 3 May 2022 21:45:12 +0300 Subject: [PATCH] fix: Check undefined streamInfo.url When remuxing and transcoding are disabled and the media cannot be played direct, `streamInfo.url` is not set. --- src/components/playback/playbackmanager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 9736d597db..ba19510cde 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -3034,7 +3034,7 @@ class PlaybackManager { const streamInfo = error.streamInfo || getPlayerData(player).streamInfo; - if (streamInfo) { + if (streamInfo?.url) { const currentlyPreventsVideoStreamCopy = streamInfo.url.toLowerCase().indexOf('allowvideostreamcopy=false') !== -1; const currentlyPreventsAudioStreamCopy = streamInfo.url.toLowerCase().indexOf('allowaudiostreamcopy=false') !== -1;