Unanswered: Can't play audio on Android - Sencha Touch SDK tools 2.0.0
Unanswered: Can't play audio on Android - Sencha Touch SDK tools 2.0.0
I heard that Android devices do not play some audio files in html5 (for example they support mp3 but do not play files created with help of some standart soft: [the link][1]).
I tried different variants, but no one worked for me.
E.g. the standart example from [here][2]:
Ext.create('Ext.Container', {
fullscreen: true,
layout: {
type: 'vbox',
pack: 'center'
},
items: [
{
xtype : 'toolbar',
docked: 'top',
title : 'Ext.Audio'
},
{
xtype: 'toolbar',
docked: 'bottom',
defaults: {
xtype: 'button',
handler: function() {
var container = this.getParent().getParent(),
// use ComponentQuery to get the audio component (using its xtype)
audio = container.down('audio');
<audio controls>
<source src="resources/sound/1.mp3" type="audio/mpeg">
Can't play sound on your device.
</audio>
When I debug my application with help of the Chrome browser I hear the sound, but I do not hear it on a real device (Android 2.3.5).
In case of the html variant I see that a slider twitches and immediately stay at the end of a progress bar. In case of the 'play' button everything works normally (graphics, play/pause) except the sound that is missing.
I did not find any special Android permission option for sound, so, I think the permissions are not the reason.
**The question**. Am I wrong and is it possible to play any mp3 audio? What is the easiest work around?
While I haven't tried Android 2.3 device is a very long time I know I have had the audio example that comes with ST 2 (and ST 1) working just fine.
Is it a standart example in sencha-touch-2.1.0-commercial/examples/ or something else? I tried also 'audio' example from the directory, it does not sound too.