diff --git a/packages/docs/src/pages/plugins/playlist.mdx b/packages/docs/src/pages/plugins/playlist.mdx
index b76b9c84..1ada1a2e 100644
--- a/packages/docs/src/pages/plugins/playlist.mdx
+++ b/packages/docs/src/pages/plugins/playlist.mdx
@@ -6,8 +6,16 @@
npm i @oplayer/ui @oplayer/plugins
```
+```html
+
+
+
+```
+
```jsx
-import Player from '@oplayer/react'
+import Player from '@oplayer/core'
import ui from '@oplayer/ui'
import { PlaylistPlugin } from '@oplayer/plugins'
@@ -74,56 +82,59 @@ Player.make('#player')
])
.create()
```
-## methods
+
+## methods
```ts
export default class PlaylistPlugin implements PlayerPlugin {
- key: string;
- name: string;
- version: string;
- static m3u8Parser: any;
- player: Player;
- currentIndex?: number;
- $root: HTMLDivElement;
- options: PartialRequired;
- constructor(options?: PlaylistOptions);
- apply(player: Player): this | undefined;
- _init(): Promise;
- get isWaiting(): boolean;
- changeSource(idx: number): Promise;
- changeSourceList(sources: PlaylistSource[]): void;
- next(): void;
- previous(): void;
- showUI(): void;
- hideUI(): void;
- render(): void;
- renderList(sources: PlaylistSource[]): void;
- destroy(): void;
+ player: Player
+ currentIndex?: number
+ $root: HTMLDivElement
+ constructor(options?: PlaylistOptions)
+ get isWaiting(): boolean
+ changeSource(idx: number): Promise
+ changeSourceList(sources: PlaylistSource[]): void
+ next(): void
+ previous(): void
+ showUI(): void
+ hideUI(): void
+ render(): void
+ destroy(): void
}
interface Segment {
- uri: string;
- timeline: number;
- title: string;
+ uri: string
+ timeline: number
+ title: string
}
export interface PlaylistOptions {
- sources: PlaylistSource[];
- customFetcher?: (source: PlaylistSource, index: number) => Promise | PlaylistSource;
- autoNext?: boolean;
- autoHide?: boolean;
- initialIndex?: number;
- m3uList?: {
- sourceFormat?: (info: Segment) => Source;
- } | true;
+ sources: PlaylistSource[]
+ customFetcher?: (source: PlaylistSource, index: number) => Promise | PlaylistSource
+ autoNext?: boolean
+ autoHide?: boolean
+ initialIndex?: number
+ m3uList?:
+ | {
+ sourceFormat?: (info: Segment) => Source
+ }
+ | true
}
export interface PlaylistSource extends Omit