View Full Version : Hidden Audio Example Broken in 0.97

22 Oct 2010, 8:58 AM

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');
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,

22 Oct 2010, 9:42 AM
Wrong forum? Shouldn't it be Sencha Touch? I can move it there if you want.

22 Oct 2010, 11:56 AM
Sorry, our mistake. Please move it to Sencha Touch forum.


22 Oct 2010, 4:56 PM
I think the iOS4 only allows for a audio tag and the eariler versions rely on the embed tag. . I also had a problem with the url.
The things is, if you change the src attribute of the audio tag you need to call audiotag.load(). Then only will the new url be played.
Either u can use a css selector and get it done. Or rewrite the audio component by adding a new function which does the same.
These are all work arounds. This should be posted as a bug.

28 Nov 2010, 4:59 AM
But it works?
I cant get hidden audio running on my iPad/iPhone.