@@ -152,6 +152,28 @@ const manifest_with_supplemental_properties_on_repr = {
152
152
} ]
153
153
} ]
154
154
} ;
155
+ const manifest_with_supplemental_properties_on_not_all_repr = {
156
+ loadedTime : new Date ( ) ,
157
+ mediaPresentationDuration : 10 ,
158
+ Period : [ {
159
+ AdaptationSet : [ {
160
+ id : 0 , mimeType : Constants . VIDEO ,
161
+ [ DashConstants . REPRESENTATION ] : [
162
+ {
163
+ id : 10 , bandwidth : 128000 ,
164
+ [ DashConstants . SUPPLEMENTAL_PROPERTY ] : [
165
+ { schemeIdUri : 'test:scheme' , value : 'value1' } ,
166
+ { schemeIdUri : 'test:scheme' , value : 'value2' } ,
167
+ { schemeIdUri : 'test:scheme' , value : 'value3' }
168
+ ]
169
+ } ,
170
+ {
171
+ id : 11 , bandwidth : 160000
172
+ }
173
+ ]
174
+ } ]
175
+ } ]
176
+ } ;
155
177
const manifest_with_essential_properties_on_only_one_repr = {
156
178
loadedTime : new Date ( ) ,
157
179
mediaPresentationDuration : 10 ,
@@ -740,6 +762,22 @@ describe('DashAdapter', function () {
740
762
expect ( mediaInfoArray [ 0 ] . supplementalProperties [ 1 ] . value ) . equals ( 'value2' ) ;
741
763
} ) ;
742
764
765
+ it ( 'supplemental properties should be filled if set on all representations' , function ( ) {
766
+ const mediaInfoArray = dashAdapter . getAllMediaInfoForType ( {
767
+ id : 'defaultId_0' ,
768
+ index : 0
769
+ } , Constants . VIDEO , manifest_with_supplemental_properties_on_not_all_repr ) ;
770
+
771
+ expect ( mediaInfoArray ) . to . be . instanceOf ( Array ) ;
772
+ expect ( mediaInfoArray . length ) . equals ( 1 ) ;
773
+
774
+ expect ( mediaInfoArray [ 0 ] . representationCount ) . equals ( 2 ) ;
775
+ expect ( mediaInfoArray [ 0 ] . codec ) . not . to . be . null ;
776
+
777
+ expect ( mediaInfoArray [ 0 ] . supplementalProperties ) . to . be . instanceOf ( Array ) ;
778
+ expect ( mediaInfoArray [ 0 ] . supplementalProperties . length ) . equals ( 0 ) ;
779
+ } ) ;
780
+
743
781
it ( 'supplemental properties should not be filled if not set on all representations' , function ( ) {
744
782
const mediaInfoArray = dashAdapter . getAllMediaInfoForType ( {
745
783
id : 'defaultId_0' ,
0 commit comments