wscal
22 Oct 2010, 8:58 AM
Hi,
We have implemented an audio player for school media, working off the audio example in 0.96. We have a hidden audio player in an extended panel class:
//Hidden audio player component
this.hiddenAudio = new Ext.Audio({
enableControls: false,
url: 'intro.mp3', //initial audio url
loop: false,
listeners: {
afterrender: function(c){
c.media.on('timeupdate', function(){
var audioplayer = Ext.getCmp('audioplayer');
audioplayer.updateSeekBarSlider(c.media.dom.currentTime,c.media.dom.duration);
});
}
},
scope: this
});
The play button just calls this.hiddenAudio.play(); to start playback. This worked great in 0.96, but does not work in 0.97. It works in our development environment (PC running Chrome or Safari), but playback does not start on iPod touch running IOS 4.1 and Mobile Safari.
Also had to implement a very unorthodox workaround to get the audio component's url changed dynamically. When the url is set by using
this.hiddenAudio.url = "myUrl"; the audio component does not seem to unload the previous url and load the new one for playback. We found it necessary to call initComponent(); on the extended panel class before changing the url:(
Please inform us whether these are known issues. Otherwise, any advice would be appreciated.
Kind regards,
WSCAL
We have implemented an audio player for school media, working off the audio example in 0.96. We have a hidden audio player in an extended panel class:
//Hidden audio player component
this.hiddenAudio = new Ext.Audio({
enableControls: false,
url: 'intro.mp3', //initial audio url
loop: false,
listeners: {
afterrender: function(c){
c.media.on('timeupdate', function(){
var audioplayer = Ext.getCmp('audioplayer');
audioplayer.updateSeekBarSlider(c.media.dom.currentTime,c.media.dom.duration);
});
}
},
scope: this
});
The play button just calls this.hiddenAudio.play(); to start playback. This worked great in 0.96, but does not work in 0.97. It works in our development environment (PC running Chrome or Safari), but playback does not start on iPod touch running IOS 4.1 and Mobile Safari.
Also had to implement a very unorthodox workaround to get the audio component's url changed dynamically. When the url is set by using
this.hiddenAudio.url = "myUrl"; the audio component does not seem to unload the previous url and load the new one for playback. We found it necessary to call initComponent(); on the extended panel class before changing the url:(
Please inform us whether these are known issues. Otherwise, any advice would be appreciated.
Kind regards,
WSCAL