mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
seek when video metadata is ready in switch url (#743)
This commit is contained in:
1 parent
bc1554d240
commit
2f9604c44a
1 file changed
+3
-1
@@ -11,10 +11,12 @@ export default function switchMix(art) {
|
|||||||
art.notice.show = '';
|
art.notice.show = '';
|
||||||
|
|
||||||
art.once('video:error', reject);
|
art.once('video:error', reject);
|
||||||
|
art.once('video:loadedmetadata', () => {
|
||||||
|
art.currentTime = currentTime;
|
||||||
|
});
|
||||||
art.once('video:canplay', async () => {
|
art.once('video:canplay', async () => {
|
||||||
art.playbackRate = playbackRate;
|
art.playbackRate = playbackRate;
|
||||||
art.aspectRatio = aspectRatio;
|
art.aspectRatio = aspectRatio;
|
||||||
art.currentTime = currentTime;
|
|
||||||
|
|
||||||
if (playing) {
|
if (playing) {
|
||||||
await art.play();
|
await art.play();
|
||||||
|
|||||||
Reference in new issue
Block a user