Skip to content

Commit

Permalink
auto set hls mime-type
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed May 4, 2024
1 parent 6e6571c commit e2c18c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/docs/public/oplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected]/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected]/dist/index.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected].0/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected].1/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected]/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected]/dist/index.min.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion packages/hls/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/hls/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, () => {
Expand Down

0 comments on commit e2c18c0

Please sign in to comment.