mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
refactor(core): CORE-19 type capture and preserve progress lifetimes
This commit is contained in:
1 parent
98a1800032
commit
ccf77c4ed2
49 files changed
+31570
-681
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import type { CaptureMedia } from '../../packages/artplayer/src/capture/frame'
|
||||
import type { ScreenshotHost } from '../../packages/artplayer/src/player/screenshotMix'
|
||||
import type Artplayer from '../../packages/artplayer/types/artplayer'
|
||||
import screenshotMix from '../../packages/artplayer/src/player/screenshotMix'
|
||||
|
||||
declare const art: Artplayer
|
||||
declare const host: ScreenshotHost
|
||||
declare const video: HTMLVideoElement
|
||||
const media: CaptureMedia = video
|
||||
const data: Promise<string> = art.getDataURL()
|
||||
const blob: Promise<string> = art.getBlobUrl()
|
||||
const screenshot: Promise<string> = art.screenshot('frame')
|
||||
const installed: void = screenshotMix(host)
|
||||
// @ts-expect-error Screenshot names remain strings.
|
||||
art.screenshot(123)
|
||||
// @ts-expect-error Captures return promises, not synchronous data URLs.
|
||||
const sync: string = art.getDataURL()
|
||||
export { blob, data, installed, media, screenshot, sync }
|
||||
Reference in new issue
Block a user