From 48433abe74c5f603cf06097e391ffdfa22d64256 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 5625138d59..6cdd405b32 100644 --- a/lib/media/streaming_engine.js +++ b/lib/media/streaming_engine.js @@ -1672,7 +1672,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)) || this.config_.dispatchAllEmsgBoxes) { // See DASH sec. 5.10.4.1 // A special scheme in DASH used to signal manifest updates.