Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Apr 16, 2024
1 parent 95094db commit afbaba1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/docs/public/oplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@

<script>
var playlistScriptCdn =
'https://cdn.jsdelivr.net/npm/@oplayer/[email protected].7/dist/playlist.min.js'
'https://cdn.jsdelivr.net/npm/@oplayer/[email protected].8/dist/playlist.min.js'
var danmakuScriptCdn = 'https://cdn.jsdelivr.net/npm/@oplayer/danmaku@latest/dist/index.min.js'

var query = document.location.search.substring(1)
Expand Down Expand Up @@ -391,7 +391,7 @@
deps.map(([_, fn]) => fn && fn())
} catch (error) {}

if (player.context.playlist && typeof p != 'number') {
if (player.context.playlist && (isNaN(p) || typeof p != 'number')) {
player.once('playlistchange', () => {
player.context.playlist.showUI()
})
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oplayer/plugins",
"version": "1.0.12-beta.7",
"version": "1.0.12-beta.8",
"author": "shiyiya",
"description": "oplayer's plugin",
"homepage": "https://github.com/shiyiya/oplayer",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/src/playlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class PlaylistPlugin implements PlayerPlugin {
async _init() {
const start = () => {
this.renderContainer()
this.renderList(this.options.sources)
this.changeSourceList(this.options.sources)
if (typeof initialIndex == 'number') {
this.changeSource(initialIndex)
}
Expand Down

0 comments on commit afbaba1

Please sign in to comment.