From e2c18c0b120c45d9a447f6a3f2e2d0444def0f23 Mon Sep 17 00:00:00 2001 From: shiyiya Date: Sat, 4 May 2024 15:47:02 +0800 Subject: [PATCH] auto set hls mime-type --- packages/docs/public/oplayer.html | 2 +- packages/hls/package.json | 2 +- packages/hls/src/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docs/public/oplayer.html b/packages/docs/public/oplayer.html index 0b9b03e3..cf139987 100644 --- a/packages/docs/public/oplayer.html +++ b/packages/docs/public/oplayer.html @@ -198,7 +198,7 @@ - + diff --git a/packages/hls/package.json b/packages/hls/package.json index e3b1e318..1e56bc28 100644 --- a/packages/hls/package.json +++ b/packages/hls/package.json @@ -1,6 +1,6 @@ { "name": "@oplayer/hls", - "version": "1.2.26-beta.0", + "version": "1.2.26-beta.1", "description": "Hls plugin for oplayer", "type": "module", "main": "./dist/index.es.js", diff --git a/packages/hls/src/index.ts b/packages/hls/src/index.ts index 65853443..3f92fe45 100644 --- a/packages/hls/src/index.ts +++ b/packages/hls/src/index.ts @@ -144,7 +144,7 @@ class HlsPlugin implements PlayerPlugin { instance.once(HlsPlugin.library.Events.MEDIA_ATTACHED, (_, { media }: MediaAttachedData) => { const $source = document.createElement('source') as HTMLSourceElement $source.src = source.src - $source.type = source.type || 'application/x-mpegurl' + $source.type = source.type || (source.type = 'application/x-mpegurl') media.appendChild($source) instance.once(HlsPlugin.library.Events.DESTROYING, () => {