-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
|
@@ -32,6 +37,7 @@ jobs: | |
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
|
@@ -44,4 +50,4 @@ jobs: | |
with: | ||
build-script: 'build:packs' | ||
repo-token: '${{ secrets.GIT_HUB_TOKEN }}' | ||
pattern: './packages/*/{dist,compiled}/**/*.{js,d.ts}' | ||
pattern: './packages/*/{dist,compiled}/**/*.{js}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,7 +217,8 @@ | |
<script> | ||
var hlsScriptCdn = 'https://cdn.jsdelivr.net/npm/@oplayer/hls@latest/dist/index.hls.js' | ||
var danmakuScriptCdn = 'https://cdn.jsdelivr.net/npm/@oplayer/danmaku@latest/dist/index.min.js' | ||
var playlistScriptCdn = 'https://cdn.jsdelivr.net/npm/@oplayer/plugins@latest/dist/playlist.min.js' | ||
var playlistScriptCdn = | ||
'https://cdn.jsdelivr.net/npm/@oplayer/[email protected]/dist/playlist.min.js' | ||
var chromecastScriptCdn = 'https://cdn.jsdelivr.net/npm/@oplayer/plugins@latest/dist/chromecast.min.js' | ||
|
||
var query = document.location.search.substring(1) | ||
|
@@ -264,7 +265,11 @@ | |
} | ||
|
||
var player = OPlayer.make('#oplayer', { | ||
source: { src: !playlist.length ? src : undefined, poster, title: title || 'Free HTML5 Player' }, | ||
source: { | ||
src: /m3u8(#|\?|$)/.test(src) || /.mpd(#|\?|$)/i.test(src) ? undefined : src, | ||
poster, | ||
title: title || 'Free HTML5 Player' | ||
}, | ||
playbackRate: localStorage.getItem('@oplayer/UserPreferences/speed') || 1, | ||
volume: localStorage.getItem('@oplayer/UserPreferences/volume') || 1 | ||
}) | ||
|
@@ -326,7 +331,7 @@ | |
[ | ||
chromecastScriptCdn, | ||
() => { | ||
player.applyPlugin(OChromecast) | ||
player.applyPlugin(new OChromecast()) | ||
} | ||
] | ||
] | ||
|
@@ -372,6 +377,8 @@ | |
}) | ||
|
||
function bootstrap() { | ||
if (!player.options.source.src && src) player.changeSource({ src, poster }) | ||
|
||
if (danmaku) { | ||
loadScripts([danmakuScriptCdn]).then((p) => { | ||
player.applyPlugin(ODanmaku({ source: danmaku })) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters