Skip to content

Commit

Permalink
Compare indices of mediaInfo objects when checking if a track change …
Browse files Browse the repository at this point in the history
…was rendered. This accounts for content that has no ID attribute for the AdaptationSets. (#4249)
  • Loading branch information
dsilhavy committed Aug 5, 2023
1 parent 23941f8 commit e959ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/controllers/ScheduleController.js
Expand Up @@ -340,7 +340,7 @@ function ScheduleController(config) {
})[0];

if (item && playbackController.getTime() >= item.startTime) {
if ((!lastFragmentRequest.mediaInfo || (item.mediaInfo.type === lastFragmentRequest.mediaInfo.type && item.mediaInfo.id !== lastFragmentRequest.mediaInfo.id)) && trigger) {
if ((!lastFragmentRequest.mediaInfo || (item.mediaInfo.type === lastFragmentRequest.mediaInfo.type && item.mediaInfo.index !== lastFragmentRequest.mediaInfo.index)) && trigger) {
eventBus.trigger(Events.TRACK_CHANGE_RENDERED, {
mediaType: type,
oldMediaInfo: lastFragmentRequest.mediaInfo,
Expand Down

0 comments on commit e959ec4

Please sign in to comment.