Skip to content

Commit

Permalink
fix(playlist): ts type
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Nov 1, 2023
1 parent 58af300 commit 20c5ce1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/plugins/src/playlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Segment {
}

export interface PlaylistOptions {
sources: PlaylistSource[]
sources?: PlaylistSource[]
customFetcher?: (source: PlaylistSource, index: number) => Promise<PlaylistSource> | PlaylistSource
autoNext?: boolean
autoHide?: boolean
Expand Down Expand Up @@ -48,10 +48,10 @@ export default class PlaylistPlugin implements PlayerPlugin {

$root!: HTMLDivElement

options: PartialRequired<PlaylistOptions, 'autoNext' | 'autoHide'>
options: PartialRequired<PlaylistOptions, 'autoNext' | 'autoHide' | 'sources'>

constructor(options?: PlaylistOptions) {
this.options = Object.assign({ autoNext: true, autoHide: true }, options)
this.options = Object.assign({ autoNext: true, autoHide: true, sources: [] }, options)
}

apply(player: Player) {
Expand Down

1 comment on commit 20c5ce1

@vercel
Copy link

@vercel vercel bot commented on 20c5ce1 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

oplayer – ./

oplayer-git-main-shiyiya.vercel.app
oplayer.vercel.app
oplayer-shiyiya.vercel.app

Please sign in to comment.