diff --git a/docs/assets/example/hls.quality.js b/docs/assets/example/hls.quality.js index 328d32a25..0f9bbde2d 100644 --- a/docs/assets/example/hls.quality.js +++ b/docs/assets/example/hls.quality.js @@ -17,24 +17,10 @@ var art = new Artplayer({ ], customType: { m3u8: function (video, url) { - if (Hls.isSupported()) { - // Destroy the last decoder instance before switching url - if (art.hls) art.hls.destroy(); - - // When the player is destroyed, the decoder instance must also be destroyed - art.on('destroy', () => { - if (art.hls) art.hls.destroy(); - }); - - // Attach the Hls instance to the Artplayer instance - art.hls = new Hls(); - art.hls.loadSource(url); - art.hls.attachMedia(video); - } else if (video.canPlayType('application/vnd.apple.mpegurl')) { - video.src = url; - } else { - art.notice.show = 'Does not support playback of m3u8'; - } + // Attach the Hls instance to the Artplayer instance + art.hls = new Hls(); + art.hls.loadSource(url); + art.hls.attachMedia(video); }, }, });