@@ -180,10 +180,10 @@ function MediaController() {
180180 if ( ! track ) {
181181 return ;
182182 }
183- logger . info ( 'addTrack with track.codec=\'' + track . codec + '\', track.type=\'' + track . type + '\'' ) ;
184183
185184 const mediaType = track . type ;
186185 if ( ! _isMultiTrackSupportedByType ( mediaType ) ) {
186+ logger . info ( 'track not added (_isMultiTrackSupportedByType), track.index=' + track . index ) ;
187187 return ;
188188 }
189189
@@ -196,10 +196,12 @@ function MediaController() {
196196 for ( let i = 0 , len = mediaTracks . length ; i < len ; ++ i ) {
197197 //track is already set.
198198 if ( areTracksEqual ( mediaTracks [ i ] , track ) ) {
199+ logger . info ( 'track not added as it is already set (this track-index=' + track . index + ' - existing track.index=' + mediaTracks [ i ] . index + ')' ) ;
199200 return ;
200201 }
201202 }
202-
203+
204+ logger . info ( 'addTrack with track.codec=\'' + track . codec + '\', track.type=\'' + track . type + '\', track.id=\'' + track . id + '\', track.index=' + track . index ) ;
203205 mediaTracks . push ( track ) ;
204206 }
205207
@@ -373,8 +375,10 @@ function MediaController() {
373375 const sameRoles = JSON . stringify ( t1 . roles ) === JSON . stringify ( t2 . roles ) ;
374376 const sameAccessibility = JSON . stringify ( t1 . accessibility ) === JSON . stringify ( t2 . accessibility ) ;
375377 const sameAudioChannelConfiguration = JSON . stringify ( t1 . audioChannelConfiguration ) === JSON . stringify ( t2 . audioChannelConfiguration ) ;
378+ const sameSupplementalProps = JSON . stringify ( t1 . supplementalProperties ) === JSON . stringify ( t2 . supplementalProperties ) ;
379+ const sameEssentialProps = JSON . stringify ( t1 . essentialProperties ) === JSON . stringify ( t2 . essentialProperties ) ;
376380
377- return ( sameId && sameCodec && sameViewpoint && sameLang && sameRoles && sameAccessibility && sameAudioChannelConfiguration ) ;
381+ return ( sameId && sameCodec && sameViewpoint && sameLang && sameRoles && sameAccessibility && sameAudioChannelConfiguration && sameSupplementalProps && sameEssentialProps ) ;
378382 }
379383
380384
0 commit comments