移除加载房间的随机延迟

This commit is contained in:
John Smith
2026-02-01 17:55:46 +08:00
parent 3d6d94e38f
commit 4e8521d27a

View File

@@ -268,12 +268,7 @@ export default {
}
if (document.visibilityState === 'visible') {
if (this.roomKeyValue === null) {
this.init()
} else {
// 正式房间要随机延迟加载,防止同时请求导致雪崩
window.setTimeout(this.init, Math.random() * 3000)
}
this.init()
} else {
// 当前窗口不可见延迟到可见时加载防止OBS中一次并发太多请求OBS中浏览器不可见时也会加载网页除非显式设置
document.addEventListener('visibilitychange', this.onVisibilityChange)