mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
Update index.js
This commit is contained in:
1 parent
6f6d49bbae
commit
b2e54d6969
1 file changed
+2
@@ -194,6 +194,7 @@ export default function artplayerProxyWebAV(opt = {}) {
|
||||
|
||||
try {
|
||||
await Promise.resolve();
|
||||
state.readyState = 1;
|
||||
art.emit('video:loadstart', { type: 'loadstart' });
|
||||
const response = await fetch(option.url);
|
||||
|
||||
@@ -203,6 +204,7 @@ export default function artplayerProxyWebAV(opt = {}) {
|
||||
|
||||
clip = new MP4Clip(response.body, opt);
|
||||
} catch (error) {
|
||||
state.readyState = 0;
|
||||
art.emit('video:error', error);
|
||||
throw error;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user