Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed May 12, 2024
1 parent 0a9182d commit 7e72ec2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/standalone/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import hls from '@oplayer/hls'
import mpegts from '@oplayer/mpegts'
import ui from '@oplayer/ui'
import torrent from '@oplayer/torrent'
import { PlaylistPlugin, Chromecast } from '@oplayer/plugins'
import { Playlist, Chromecast } from '@oplayer/plugins'

import vercel from '../../packages/docs/public/vercel.svg'

Expand All @@ -21,7 +21,7 @@ interface Ctx {
dash: ReturnType<typeof dash>
mpegts: ReturnType<typeof mpegts>
danmaku: ReturnType<typeof danmaku>
playlist: PlaylistPlugin
playlist: Playlist
}

const initialIndex = 0
Expand Down Expand Up @@ -104,7 +104,7 @@ const player = Player.make<Ctx>('#player', {
// displaySender: true,
source: DANMAKU //SUPER_DANMAKU
}),
new PlaylistPlugin({
new Playlist({
initialIndex,
sources: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/pages/plugins/playlist.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ npm i @oplayer/ui @oplayer/plugins
```jsx
import Player from '@oplayer/core'
import ui from '@oplayer/ui'
import { PlaylistPlugin } from '@oplayer/plugins'
import { Playlist } from '@oplayer/plugins'

Player.make('#player')
.use([
ui(),
new PlaylistPlugin({
new Playlist({
initialIndex: 0,
autoNext: true,
sources: [
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/pages/preview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import dash from '@oplayer/dash'
import mpegts from '@oplayer/mpegts'
import ui from '@oplayer/ui'
import danmaku from '@oplayer/danmaku'
import { PlaylistPlugin, Chromecast, AirPlay } from '@oplayer/plugins'
import { Playlist, Chromecast, AirPlay } from '@oplayer/plugins'

<div className="nx-rounded-sm nx-overflow-hidden" style={{ maxWidth: '1024px', margin: '1.25rem auto' }}>
<Player
Expand Down Expand Up @@ -55,7 +55,7 @@ import { PlaylistPlugin, Chromecast, AirPlay } from '@oplayer/plugins'
dash(),
mpegts(),
!isMobile && danmaku({ enable: false, fontSize: 0.75, displaySender: false }),
new PlaylistPlugin({
new Playlist({
initialIndex: 0,
autoNext: true,
sources: [
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ npm i @oplayer/plugins
```

```js
import { PlaylistPlugin, Chromecast, AirPlay, ad, vttThumbnails } from '@oplayer/plugins'
import { Playlist, Chromecast, AirPlay, ad, vttThumbnails } from '@oplayer/plugins'
```

```html
Expand Down Expand Up @@ -33,7 +33,7 @@ import { PlaylistPlugin, Chromecast, AirPlay, ad, vttThumbnails } from '@oplayer
```js
Player.make('#oplayer')
.use([
new PlaylistPlugin({
new Playlist({
initialIndex: 0, // default
autoNext: true, // default
autoHide: true, // default
Expand Down

0 comments on commit 7e72ec2

Please sign in to comment.