Commit 4105c92c authored by Chen Jiping's avatar Chen Jiping

feat:调整音频播放逻辑

parent 2fb2c068
...@@ -475,22 +475,29 @@ cc.Class({ ...@@ -475,22 +475,29 @@ cc.Class({
//设置不可点击 //设置不可点击
this._cantouch = false; this._cantouch = false;
playAudio(this.audioBtn.clip, () => { let audioUrl = word.lrcData.audio_url;
let audioUrl = word.lrcData.audio_url; if(isInitial){
//显示完,则播放音频 this.playTextAutio(labelNode, audioUrl, () => {
if (this._shown) {
this.playTextAutio(labelNode, audioUrl, () => {
this._cantouch = true;
});
}
else {
this._cantouch = true; this._cantouch = true;
} })
}
}) else{
playAudio(this.audioBtn.clip, () => {
//显示完,则播放音频
if (this._shown) {
this.playTextAutio(labelNode, audioUrl, () => {
this._cantouch = true;
});
}
else {
this._cantouch = true;
}
})
}
}) })
return labelNode; return labelNode;
......
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