Use esm module for hls.js (#16878)

This commit is contained in:
Paul Bottein 2023-06-12 13:49:39 +02:00 committed by GitHub
parent 655b630fa5
commit e3faa618bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,8 @@ class HaHLSPlayer extends LitElement {
private async _startHls(): Promise<void> {
const masterPlaylistPromise = fetch(this.url);
const Hls: typeof HlsType = (await import("hls.js/dist/hls.light")).default;
const Hls: typeof HlsType = (await import("hls.js/dist/hls.light.mjs"))
.default;
if (!this.isConnected) {
return;