add sleep

This commit is contained in:
Harvey Zack committed 2024-09-08 19:43:04 +08:00
1 parent c8b5282af9
commit c81364ca9a
3 files changed
+3 -10

No files matched your search

+1 -5
View File
@@ -128,12 +128,8 @@ export default function artplayerProxyCanvas(callback) {
art.on('video:loadedmetadata', async () => {
canvas.width = video.videoWidth;
canvas.height = video.videoHeight;
resize();
});
// 在视频数据可用时绘制第一帧
art.on('video:canplay', async () => {
await sleep(300);
resize();
drawFrame();
});