]>
git.proxmox.com Git - sencha-touch.git/blob - src/examples/audio/app.js
8 * A simple example which demonstrates the Ext.Audio component in Sencha Touch.
15 '320x460': 'resources/startup/Default.jpg', // Non-retina iPhone, iPod touch, and all Android devices
16 '640x920': 'resources/startup/640x920.png', // Retina iPhone and iPod touch
17 '640x1096': 'resources/startup/640x1096.png', // iPhone 5 and iPod touch (fifth generation)
18 '768x1004': 'resources/startup/768x1004.png', // Non-retina iPad (first and second generation) in portrait orientation
19 '748x1024': 'resources/startup/748x1024.png', // Non-retina iPad (first and second generation) in landscape orientation
20 '1536x2008': 'resources/startup/1536x2008.png', // : Retina iPad (third generation) in portrait orientation
21 '1496x2048': 'resources/startup/1496x2048.png' // : Retina iPad (third generation) in landscape orientation
24 isIconPrecomposed
: false,
26 57: 'resources/icons/icon.png',
27 72: 'resources/icons/icon@72.png',
28 114: 'resources/icons/icon@2x.png',
29 144: 'resources/icons/icon@144.png'
45 var hiddenAudio
= Ext
.create('Ext.Container', {
57 var audio
= this.getParent().down('audio');
59 if (audio
.isPlaying()) {
61 this.setText('Play audio');
64 this.setText('Pause audio');
68 Ext
.apply({}, audioBase
, {
74 var styledAudio
= Ext
.create('Ext.Audio', Ext
.apply({}, audioBase
, {
79 var autoAudio
= Ext
.create('Ext.Audio', Ext
.apply({}, audioBase
, {
86 if (Ext
.os
.is
.Android
) {
87 //android devices do not support the <audio> tag controls
95 title
: 'Audio Sample',
100 items
= [hiddenAudio
, styledAudio
, autoAudio
];
103 Ext
.create('Ext.tab.Panel', {