您好我创建了广播应用。
如何从out函数中设置var?
App.ApplicationController.set('isPlaying',true);
这只是jquery http://rzk.com.ua/frodio/#station20,我需要创建ember App
App.ApplicationController = Ember.Controller.extend({
isPlaying: false,
actions: {
playRadio: function() {
MRP.play();
//this.set('isPlaying', true);
},
stopRadio: function() {
MRP.stop();
//this.set('isPlaying', false);
}
}
});
function musesCallback (event,param){
console.log(event+': '+param);
if (event == 'play') {
App.ApplicationController.isPlaying = true;
}
if (event == 'stop') {
App.ApplicationController.isPlaying = false;
}
}