@@ -1983,6 +1983,10 @@ shaka.dash.DashParser = class {
1983
1983
// Duplicate representations with their supplementalCodecs
1984
1984
const obj = shaka . util . ObjectUtils . cloneObject ( rep ) ;
1985
1985
obj . attributes [ 'codecs' ] = supplementalCodecs . split ( ' ' ) . join ( ',' ) ;
1986
+ if ( obj . attributes [ 'id' ] ) {
1987
+ obj . attributes [ 'supplementalId' ] =
1988
+ obj . attributes [ 'id' ] + '_supplementalCodecs' ;
1989
+ }
1986
1990
supplementalRepresentations . push ( obj ) ;
1987
1991
}
1988
1992
}
@@ -2048,8 +2052,9 @@ shaka.dash.DashParser = class {
2048
2052
}
2049
2053
2050
2054
const repIds = representations
2051
- . map ( ( node ) => { return node . attributes [ 'id' ] ; } )
2052
- . filter ( shaka . util . Functional . isNotNull ) ;
2055
+ . map ( ( node ) => {
2056
+ return node . attributes [ 'supplementalId' ] || node . attributes [ 'id' ] ;
2057
+ } ) . filter ( shaka . util . Functional . isNotNull ) ;
2053
2058
2054
2059
return {
2055
2060
id : adaptationId ,
@@ -2580,6 +2585,7 @@ shaka.dash.DashParser = class {
2580
2585
const evalDivision = TXml . evalDivision ;
2581
2586
2582
2587
const id = elem . attributes [ 'id' ] ;
2588
+ const supplementalId = elem . attributes [ 'supplementalId' ] ;
2583
2589
const uriObjs = TXml . findChildren ( elem , 'BaseURL' ) ;
2584
2590
let calculatedBaseUris ;
2585
2591
let someLocationValid = false ;
@@ -2694,7 +2700,8 @@ shaka.dash.DashParser = class {
2694
2700
frameRate : frameRate ,
2695
2701
pixelAspectRatio : pixelAspectRatio ,
2696
2702
emsgSchemeIdUris : emsgSchemeIdUris ,
2697
- id : id ,
2703
+ id : supplementalId || id ,
2704
+ originalId : id ,
2698
2705
language : elem . attributes [ 'lang' ] ,
2699
2706
numChannels : numChannels ,
2700
2707
audioSamplingRate : audioSamplingRate ,
@@ -3243,6 +3250,7 @@ shaka.dash.DashParser.RequestSegmentCallback;
3243
3250
* pixelAspectRatio: (string|undefined),
3244
3251
* emsgSchemeIdUris: !Array<string>,
3245
3252
* id: ?string,
3253
+ * originalId: ?string,
3246
3254
* position: (number|undefined),
3247
3255
* language: ?string,
3248
3256
* numChannels: ?number,
@@ -3284,6 +3292,8 @@ shaka.dash.DashParser.RequestSegmentCallback;
3284
3292
* emsg registered schemeIdUris.
3285
3293
* @property {?string } id
3286
3294
* The ID of the element.
3295
+ * @property {?string } originalId
3296
+ * The original ID of the element.
3287
3297
* @property {number|undefined } position
3288
3298
* Position of the element used for indexing in case of no id
3289
3299
* @property {?string } language
0 commit comments