mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
fix(canvas): [PKG-CANVAS-04] preserve public type and export compatibility
This commit is contained in:
1 parent
2b319109cd
commit
224572032a
29 files changed
+682
-41
No files matched your search
@@ -6,7 +6,7 @@ import { ownMedia } from './media'
|
||||
import { createRenderer } from './renderer'
|
||||
import { createFrameScheduler } from './scheduler'
|
||||
|
||||
export default function artplayerProxyCanvas(callback?: DrawCallback) {
|
||||
function artplayerProxyCanvas(callback?: DrawCallback) {
|
||||
return (art: Artplayer): HTMLCanvasElement => {
|
||||
const constructor = art.constructor as typeof Artplayer
|
||||
const canvas = constructor.utils.createElement('canvas')
|
||||
@@ -130,3 +130,5 @@ export default function artplayerProxyCanvas(callback?: DrawCallback) {
|
||||
return canvas
|
||||
}
|
||||
}
|
||||
|
||||
export default Object.assign(artplayerProxyCanvas, { default: artplayerProxyCanvas })
|
||||
Reference in new issue
Block a user