File tree 7 files changed +19
-4
lines changed
7 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ shakaDemo.MessageIds = {
167
167
DISABLE_THUMBNAILS : 'DEMO_DISABLE_THUMBNAILS' ,
168
168
DISABLE_VIDEO : 'DEMO_DISABLE_VIDEO' ,
169
169
DISABLE_XLINK_PROCESSING : 'DEMO_DISABLE_XLINK_PROCESSING' ,
170
+ DISPATCH_ALL_EMSG_BOXES : 'DEMO_DISPATCH_ALL_EMSG_BOXES' ,
170
171
DRM_RETRY_SECTION_HEADER : 'DEMO_DRM_RETRY_SECTION_HEADER' ,
171
172
DRM_SECTION_HEADER : 'DEMO_DRM_SECTION_HEADER' ,
172
173
DRM_SESSION_TYPE : 'DEMO_DRM_SESSION_TYPE' ,
Original file line number Diff line number Diff line change @@ -366,7 +366,9 @@ shakaDemo.Config = class {
366
366
'streaming.preferNativeHls' )
367
367
. addNumberInput_ ( MessageIds . UPDATE_INTERVAL_SECONDS ,
368
368
'streaming.updateIntervalSeconds' ,
369
- /* canBeDecimal= */ true ) ;
369
+ /* canBeDecimal= */ true )
370
+ . addBoolInput_ ( MessageIds . DISPATCH_ALL_EMSG_BOXES ,
371
+ 'streaming.dispatchAllEmsgBoxes' ) ;
370
372
371
373
if ( ! shakaDemoMain . getNativeControlsEnabled ( ) ) {
372
374
this . addBoolInput_ ( MessageIds . ALWAYS_STREAM_TEXT ,
Original file line number Diff line number Diff line change 58
58
"DEMO_DISABLE_THUMBNAILS" : " Disable Thumbnails" ,
59
59
"DEMO_DISABLE_VIDEO" : " Disable Video" ,
60
60
"DEMO_DISABLE_XLINK_PROCESSING" : " Disable Xlink processing" ,
61
+ "DEMO_DISPATCH_ALL_EMSG_BOXES" : " Dispatch all emsg boxes" ,
61
62
"DEMO_DOCUMENTATION" : " Documentation" ,
62
63
"DEMO_DRM_RETRY_SECTION_HEADER" : " DRM Retry Parameters" ,
63
64
"DEMO_DRM_SEARCH" : " DRM" ,
Original file line number Diff line number Diff line change 235
235
"description" : " The name of a configuration value." ,
236
236
"message" : " Disable [JARGON:Xlink] processing"
237
237
},
238
+ "DEMO_DISPATCH_ALL_EMSG_BOXES" : {
239
+ "description" : " The name of a configuration value." ,
240
+ "message" : " Dispatch all [JARGON:emsg] boxes"
241
+ },
238
242
"DEMO_DOCUMENTATION" : {
239
243
"description" : " A link in the footer, to the Shaka Player documentation." ,
240
244
"message" : " Documentation"
Original file line number Diff line number Diff line change @@ -798,7 +798,8 @@ shaka.extern.ManifestConfiguration;
798
798
* autoLowLatencyMode: boolean,
799
799
* forceHTTPS: boolean,
800
800
* preferNativeHls: boolean,
801
- * updateIntervalSeconds: number
801
+ * updateIntervalSeconds: number,
802
+ * dispatchAllEmsgBoxes: boolean
802
803
* }}
803
804
*
804
805
* @description
@@ -907,6 +908,8 @@ shaka.extern.ManifestConfiguration;
907
908
* If true, prefer native HLS playback when possible, regardless of platform.
908
909
* @property {number } updateIntervalSeconds
909
910
* The minimum number of seconds to see if the manifest has changes.
911
+ * @property {boolean } dispatchAllEmsgBoxes
912
+ * If true, all emsg boxes are parsed and dispatched.
910
913
*
911
914
* @exportDoc
912
915
*/
Original file line number Diff line number Diff line change @@ -1566,7 +1566,9 @@ shaka.media.StreamingEngine = class {
1566
1566
1567
1567
const hasClosedCaptions = stream . closedCaptions &&
1568
1568
stream . closedCaptions . size > 0 ;
1569
- if ( stream . emsgSchemeIdUris != null && stream . emsgSchemeIdUris . length > 0 ) {
1569
+ if ( ( stream . emsgSchemeIdUris != null &&
1570
+ stream . emsgSchemeIdUris . length > 0 ) ||
1571
+ this . config_ . dispatchAllEmsgBoxes ) {
1570
1572
new shaka . util . Mp4Parser ( )
1571
1573
. fullBox (
1572
1574
'emsg' ,
@@ -1652,7 +1654,8 @@ shaka.media.StreamingEngine = class {
1652
1654
// See DASH sec. 5.10.3.3.1
1653
1655
// If a DASH client detects an event message box with a scheme that is not
1654
1656
// defined in MPD, the client is expected to ignore it.
1655
- if ( emsgSchemeIdUris . includes ( schemeId ) ) {
1657
+ if ( emsgSchemeIdUris . includes ( schemeId ) ||
1658
+ this . config_ . dispatchAllEmsgBoxes ) {
1656
1659
// See DASH sec. 5.10.4.1
1657
1660
// A special scheme in DASH used to signal manifest updates.
1658
1661
if ( schemeId == 'urn:mpeg:dash:event:2012' ) {
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ shaka.util.PlayerConfiguration = class {
165
165
forceHTTPS : false ,
166
166
preferNativeHls : false ,
167
167
updateIntervalSeconds : 1 ,
168
+ dispatchAllEmsgBoxes : false ,
168
169
} ;
169
170
170
171
// Some browsers will stop earlier than others before a gap (e.g., Edge
You can’t perform that action at this time.
0 commit comments