mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 05:11:20 -08:00
add sleep
This commit is contained in:
1 parent
c8b5282af9
commit
c81364ca9a
3 files changed
+3
-10
No files matched your search
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user