[0]无法获取音频的时间长度
var soundChItem:Laya.SoundChannel = Laya.SoundManager.playMusic("resources/sound/dh/gril1.wav", 1,Laya.Handler.create(this,() => {
}));
console.log(soundChItem.position+"");
console.log(soundChItem.duration+"");
}));
console.log(soundChItem.position+"");
console.log(soundChItem.duration+"");
没有找到相关结果
已邀请:

1 个回复
小高
赞同来自: 逸辰
onEnable(): void {
let sc = Laya.SoundManager.playMusic("resources/mov_bbb.ogg");
setTimeout(() => {
console.log(sc.duration);
}, 1000);
}