From 02030bf4ba7e2b14bf61bbc8d1f79f4751d69551 Mon Sep 17 00:00:00 2001 From: Patrick Cruikshank Date: Wed, 9 Feb 2022 15:38:08 -0500 Subject: [PATCH] fix: Fix exception in StreamingEngine for EMSG with HLS (#3887) Add null check for emsgSchemeIdUris when EMSG boxes are parsed, as this value is null for HLS streams Fixes #3886 --- lib/media/streaming_engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/media/streaming_engine.js b/lib/media/streaming_engine.js index 0f8816fd42..edd27937f2 100644 --- a/lib/media/streaming_engine.js +++ b/lib/media/streaming_engine.js @@ -1644,7 +1644,7 @@ shaka.media.StreamingEngine = class { // See DASH sec. 5.10.3.3.1 // If a DASH client detects an event message box with a scheme that is not // defined in MPD, the client is expected to ignore it. - if (emsgSchemeIdUris.includes(schemeId)) { + if (emsgSchemeIdUris && emsgSchemeIdUris.includes(schemeId)) { // See DASH sec. 5.10.4.1 // A special scheme in DASH used to signal manifest updates. if (schemeId == 'urn:mpeg:dash:event:2012') {