Skip to content

Commit

Permalink
fix(hls): fix downloading m3u8 file twice
Browse files Browse the repository at this point in the history
vgHls downloads the m3u8 file twice. It doesn't harm anything, but it's an extra call that is not
needed.

808
  • Loading branch information
jimbeck committed Jan 10, 2019
1 parent 3686fdc commit 86ea1e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/vg-hls/vg-hls.ts
Expand Up @@ -96,7 +96,7 @@ export class VgHLS implements OnInit, OnChanges, OnDestroy {
}

// It's a HLS source
if (this.vgHls && this.vgHls.indexOf('m3u8') > -1 && Hls.isSupported()) {
if (this.vgHls && this.vgHls.indexOf('m3u8') > -1 && Hls.isSupported() && this.API.isPlayerReady) {
let video:HTMLVideoElement = this.ref.nativeElement;

this.hls = new Hls(this.config);
Expand Down

0 comments on commit 86ea1e1

Please sign in to comment.