Commit 140dbb6f authored by liujiaxin's avatar liujiaxin

load remote

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