Hi all,
I am new to Sencha Touch 2. Was trying to implement dynamic update of Audio url via a drop down menu.
The setup is simple, I have an audio object added to a panel.
I tried updateUrl and setUrl to the existing audio url but no dice. When it loaded, the audio plays but when the url is updated, the url is updated but the audio will not play.
Then I try to do a add and remove an new audio object with the updated url. The first add always works but when I remove the object and add a new, again the url is updated but the audio will not play.
Both methods(update url and object add/remove) work in Chrome but when I compile it to run in PhoneGap and then on the phone, it didn't.
Here is my code snippet:
change: function(thisSelection, newValue, oldValue) {
var currentAudio = this.getRadioPanel().down('audio');
if ( currentAudio != null ) {
if ( currentAudio.isPlaying() ) {
currentAudio.stop();
}
currentAudio.destroy();
this.getRadioPanel().removeAll();
}
var newAudio = Ext.create("Ext.Audio", {
url: newValue
});
Hi Mitchell
Yes, the code does work in Safari and Chrome. I even try to add a 2 sec timeout before changing the URL but it still will not play after the URL is changed.
Could it be the phone? I am using a Samsung Galaxy Note.