Commit 140dbb6f authored by liujiaxin's avatar liujiaxin

load remote

parent 5a4189ff
......@@ -105,7 +105,7 @@ cc.Class({
initialize() {
if (this.audio_url) {
cc.assetManager.loadRemote(this.audio_url, null, (err, audioClip) => {
cc.assetManager.loadRemote(this.audio_url, null, (function(err, audioClip){
if(err) {
// TODO handle error
return;
......@@ -130,11 +130,11 @@ cc.Class({
this.renderHighlight();
// this.currentAudioId = audioEngine.play(audioClip, false, 1);
// console.log(this.displayMode);
});
}).bind(this));
}
if (this.accompany_audio_url) {
cc.assetManager.loadRemote(this.accompany_audio_url, null, (err, audioClip) => {
cc.assetManager.loadRemote(this.accompany_audio_url, null, (function(err, audioClip) {
if(err) {
// TODO handle error
return;
......@@ -158,7 +158,7 @@ cc.Class({
// audioEngine.pause(this.currentAcAudioId);
// audioEngine.setCurrentTime(this.currentAcAudioId, 0);
// audioEngine.setVolume(this.currentAcAudioId, 1);
});
}).bind(this));
}
},
......
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