seek when video metadata is ready in switch url (#743)

This commit is contained in:
WeidiDeng authored and GitHub committed 2024-05-26 21:08:00 +08:00
1 parent bc1554d240
commit 2f9604c44a
1 file changed
+3 -1
+3 -1
View File
@@ -11,10 +11,12 @@ export default function switchMix(art) {
art.notice.show = '';
art.once('video:error', reject);
art.once('video:loadedmetadata', () => {
art.currentTime = currentTime;
});
art.once('video:canplay', async () => {
art.playbackRate = playbackRate;
art.aspectRatio = aspectRatio;
art.currentTime = currentTime;
if (playing) {
await art.play();