[LayaAir 2.0]背景音乐文件太大 播放延迟

Laya   背景音乐太大 预加载 Laya.loader.load 音乐   Laya.SoundManager.playMusic 播放 会出现延迟效果
   Laya.loader.load(['remote/music/' + this.soundUrl + '.mp3'], new Laya.Handler(this, () => {
                this.store.isDemo = true;
                Laya.Scene.open("scene/Home.scene")
            }), new Laya.Handler(this, (value: number) => {
                this._page = this.page
                this.mask_value = value
                EventMgr.eventManager.event(EventMgr.EVENT_LIST)
            }), Laya.Loader.SOUND, 0, true, null, false)
        })
 
    public static playBackGroundMusic(url: string, start: number) {
        if (soundMsg.isPlayingBgMusic) {
            let path = "remote/music/" + url + '.mp3';
            Laya.SoundManager.playMusic(path, 1, new Laya.Handler(this, () => { }), start)
        }
    }
已邀请:

小杨จุ๊บ

赞同来自:

进入 home 场景 点击场景的时候播放背景 音乐 会出现延迟 效果 背景音乐太大  预加载之后会延迟几秒才可以

小杨จุ๊บ

赞同来自:

有人知道怎么解决的嘛

要回复问题请先

商务合作
商务合作