PDA

View Full Version : [OPEN] Audio on Android Native App don't work



stefx
19 Nov 2012, 3:35 AM
Hi, I've try to play an audio on android 2.3.5 device (sencha touch 2.1).
This is the code:


Ext.define('fh.view.AudioPlayer', {
extend: 'Ext.Panel',
config: {
items:[{
xtype : 'button',
height: 100,
id: 'btn',
text : 'Play audio',
handler: function() {
var audio = this.getParent().down('audio');


if (audio.isPlaying()) {
audio.pause();
this.setText('Play audio');
} else {
audio.play();
this.setText('Pause audio');
}
}
},{
xtype: 'audio',
url : 'data/audio/test/01.mp3',
enableControls: false
}]
}
});


If I try with internet browser (on device) I can ear the audio, with native application I can't.
In the apk the file is present.

I think this is a bug.
Thanks
Stefano

mitchellsimoens
19 Nov 2012, 12:47 PM
Thanks for the report! I have opened a bug in our bug tracker.

stefx
4 Dec 2012, 3:59 AM
Hi mitchell, any workaround?
thanks
stefano