Commit 5355dab9 authored by 范雪寒's avatar 范雪寒

fix:

parent c30f1a6c
......@@ -229,12 +229,12 @@ cc.Class({
cc.assetManager.loadRemote(this.data.shortAudio_url, null, async (err, clip) => {
this.audioID = cc.audioEngine.play(clip, false, 1);
await asyncDelay(0.01);
await this.asyncDelay(0.01);
this.audioDuration = cc.audioEngine.getDuration(this.audioID);
this.textDuration = this.audioDuration / this.layoutText.childrenCount;
this.textIndex = 0;
await asyncDelay(0.01);
await this.asyncDelay(0.01);
if (this.textDuration <= 0) {
this.textDuration = 1
}
......@@ -242,6 +242,7 @@ cc.Class({
this.schedule(this.chengeTextColor, this.textDuration, this.layoutText.childrenCount, 0.01)
});
},
stopAudio() {
cc.audioEngine.stop(this.audioID);
this.unschedule(this.chengeTextColor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment