mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 22:06:17 -08:00
refactor(core): CORE-11 split media events and scope reconnect lifetimes
This commit is contained in:
1 parent
5e31274f1d
commit
b8039ad1f1
27 files changed
+4844
-475
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import type { MediaEventHost } from '../../packages/artplayer/src/media/events/types'
|
||||
import eventInit from '../../packages/artplayer/src/player/eventInit'
|
||||
|
||||
declare const art: MediaEventHost
|
||||
eventInit(art)
|
||||
art.emit('ready')
|
||||
art.emit('resize')
|
||||
art.emit('video:custom', new Event('custom'))
|
||||
art.emit('error', new Error('source'), 1)
|
||||
// @ts-expect-error Media forwarding retains the Event object, not an arbitrary payload.
|
||||
art.emit('video:canplay', 'canplay')
|
||||
// @ts-expect-error Retry errors include the attempt count.
|
||||
art.emit('error', new Error('source'))
|
||||
// @ts-expect-error UI visibility does not accept a source URL.
|
||||
art.loading.show = 'video.mp4'
|
||||
// @ts-expect-error A structural proxy still needs EventTarget listener capabilities.
|
||||
art.template.$video = { src: 'video.mp4' }
|
||||
Reference in new issue
Block a user