mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
refactor: update type exports and improve type usage in tests
This commit is contained in:
1 parent
8a87de6df3
commit
d9c84d2dbc
2 files changed
+5
-1
No files matched your search
+2
@@ -10,6 +10,8 @@ import type { Subtitle } from './subtitle'
|
|||||||
import type { Template } from './template'
|
import type { Template } from './template'
|
||||||
import type { Utils } from './utils'
|
import type { Utils } from './utils'
|
||||||
|
|
||||||
|
export type { Config, Events, I18n, Icons, Option, Player, Setting, SettingOption, Subtitle, Template, Utils }
|
||||||
|
|
||||||
export default class Artplayer extends Player {
|
export default class Artplayer extends Player {
|
||||||
constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
|
constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,6 +1,7 @@
|
|||||||
|
import type { Option } from '../packages/artplayer'
|
||||||
import Artplayer from '../packages/artplayer'
|
import Artplayer from '../packages/artplayer'
|
||||||
|
|
||||||
const option: Artplayer['Option'] = {
|
const option: Option = {
|
||||||
container: '.artplayer-app',
|
container: '.artplayer-app',
|
||||||
url: './assets/sample/video.mp4',
|
url: './assets/sample/video.mp4',
|
||||||
}
|
}
|
||||||
@@ -8,3 +9,4 @@ const option: Artplayer['Option'] = {
|
|||||||
option.volume = 0.5
|
option.volume = 0.5
|
||||||
|
|
||||||
const art = new Artplayer(option)
|
const art = new Artplayer(option)
|
||||||
|
art.play()
|
||||||
Reference in new issue
Block a user