mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -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 {
|
try {
|
||||||
await Promise.resolve();
|
await Promise.resolve();
|
||||||
|
state.readyState = 1;
|
||||||
art.emit('video:loadstart', { type: 'loadstart' });
|
art.emit('video:loadstart', { type: 'loadstart' });
|
||||||
const response = await fetch(option.url);
|
const response = await fetch(option.url);
|
||||||
|
|
||||||
@@ -203,6 +204,7 @@ export default function artplayerProxyWebAV(opt = {}) {
|
|||||||
|
|
||||||
clip = new MP4Clip(response.body, opt);
|
clip = new MP4Clip(response.body, opt);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
state.readyState = 0;
|
||||||
art.emit('video:error', error);
|
art.emit('video:error', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user