play through hls.js

This commit is contained in:
Evert Prants 2022-04-10 09:16:30 +03:00
parent c4f8f564d2
commit 43c1fe0f96
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -46,9 +46,7 @@ export class VideoPlayer {
} }
if (source.endsWith('m3u8')) { if (source.endsWith('m3u8')) {
if (this.video.canPlayType('application/vnd.apple.mpegurl')) { if (Hls.isSupported()) {
// Continue
} else if (Hls.isSupported()) {
this.hls = new Hls(); this.hls = new Hls();
this.hls.loadSource(source); this.hls.loadSource(source);
this.hls.attachMedia(this.video); this.hls.attachMedia(this.video);