Skip to content

Commit

Permalink
Merge branch 'buffer-controller-ts' of github.com:itsjamie/hls.js int…
Browse files Browse the repository at this point in the history
…o buffer-controller-ts
  • Loading branch information
itsjamie committed Jan 21, 2019
2 parents e926482 + 59e6040 commit 0503ea7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/buffer-controller.ts
Expand Up @@ -133,7 +133,7 @@ class BufferController extends EventHandler {
}
}

onManifestParsed (data: any) {
onManifestParsed (data: { altAudio: boolean }) {
// in case of alt audio 2 BUFFER_CODECS events will be triggered, one per stream controller
// sourcebuffers will be created all at once when the expected nb of tracks will be reached
// in case alt audio is not used, only one BUFFER_CODEC event will be fired from main stream controller
Expand Down Expand Up @@ -478,7 +478,7 @@ class BufferController extends EventHandler {
}

onLevelUpdated ({ details }: { details: { totalduration: number, targetduration?: number, averagetargetduration?: number, live: boolean, fragments: any[] } }) {
if (details.fragments.length <= 0) {
if (details.fragments.length > 0) {
this._levelDuration = details.totalduration + details.fragments[0].start;
this._levelTargetDuration = details.averagetargetduration || details.targetduration || 10;
this._live = details.live;
Expand Down

0 comments on commit 0503ea7

Please sign in to comment.