fix(canvas): [PKG-CANVAS-04] preserve public type and export compatibility

This commit is contained in:
Harvey Zhao committed 2026-09-12 13:29:10 +08:00
1 parent 2b319109cd
commit 224572032a
29 files changed
+682 -41

No files matched your search

+3 -1
View File
@@ -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 })