Skip to content

Commit

Permalink
fix: Fix exception in StreamingEngine for EMSG with HLS (#3887)
Browse files Browse the repository at this point in the history
Add null check for emsgSchemeIdUris when EMSG boxes are parsed, as this value is null for HLS streams

Fixes #3886
  • Loading branch information
pcruiksh committed Feb 9, 2022
1 parent 1becadf commit 48433ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/media/streaming_engine.js
Expand Up @@ -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.
Expand Down

0 comments on commit 48433ab

Please sign in to comment.