Skip to content

Commit

Permalink
fix(FEC-9231): fix flavorParamsId in native hls (#41)
Browse files Browse the repository at this point in the history
changed the filter which identifies the id3
  • Loading branch information
RoyBregman authored Jul 9, 2019
1 parent f85722f commit 3d81294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kava.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {KavaTimer} from './kava-timer';
import {KavaModel, SoundMode, TabMode} from './kava-model';

const DIVIDER: number = 1024;
const ID3_TRACK_LABEL: string = 'id3';
const TEXT_TYPE: string = 'TEXT';

/**
* Kaltura Advanced Analytics plugin.
Expand Down Expand Up @@ -501,7 +501,7 @@ class Kava extends BasePlugin {
}

_onTimedMetadataLoaded(event: FakeEvent): void {
const id3TagCues = event.payload.cues.filter(entry => entry.track && entry.track.label === ID3_TRACK_LABEL);
const id3TagCues = event.payload.cues.filter(entry => entry.value && entry.value.key === TEXT_TYPE);
if (id3TagCues.length) {
try {
this._model.updateModel({flavorParamsId: Number(JSON.parse(id3TagCues[id3TagCues.length - 1].value.data).sequenceId)});
Expand Down

0 comments on commit 3d81294

Please sign in to comment.