mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 17:51:20 -08:00
fix: update loadTimeout default value to 0 in README, MediaBunnyEngine, and TypeScript definitions
This commit is contained in:
1 parent
d892685a25
commit
4a0fbda3c4
5 files changed
+7
-7
No files matched your search
@@ -53,12 +53,12 @@ export default class MediaBunnyEngine {
|
||||
|
||||
const loadTimeout = Number.isFinite(this.option.loadTimeout)
|
||||
? this.option.loadTimeout
|
||||
: 12000
|
||||
: 0
|
||||
|
||||
try {
|
||||
await Promise.race([
|
||||
this.performLoad(src, id),
|
||||
loadTimeout > 0 ? this.createTimeout(loadTimeout) : Promise.resolve(),
|
||||
loadTimeout > 0 ? this.createTimeout(loadTimeout) : new Promise(() => {}),
|
||||
])
|
||||
}
|
||||
catch (err) {
|
||||
|
||||
Reference in new issue
Block a user