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 authored and joeyparrish committed Feb 16, 2022
1 parent 87a5649 commit 02030bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/media/streaming_engine.js
Expand Up @@ -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') {
Expand Down

0 comments on commit 02030bf

Please sign in to comment.