PDA

View Full Version : Volume slider in iPhone not working - help!



tanjuGMX
5 Dec 2010, 4:05 PM
I'm building a custom volume slider for a MP3 player. This works fine in Chrome browser. Unfortunately, this does not work on an actual iPhone. On an iPhone the volume slider is simply ignored.

Is there a better way to address this than with the media.dom.volume as outlined in the code below? Or is there no way to control the iPhone volume with HTML5?




volumeSlider = new Ext.form.Slider({
value: 0.99,
maxValue: 1,
listeners: {

dragend: function(c){
mp3Player.media.dom.volume = volumeSlider.getValue();
},
drag: function(c){
mp3Player.media.dom.volume = volumeSlider.getValue();
}
}
});
mp3Player = new Ext.Audio({
url : http://3208.nyc2.soundclick.com/freemp3/beatkings+mywayftmarkabyshodown.mp3
});

tanjuGMX
15 Dec 2010, 6:42 PM
Anyone?

ferchotobon
20 Dec 2010, 4:06 PM
Anyone?

tanjuGMX
26 Dec 2010, 11:38 AM
Hehe, ferchotobon, it seems I'm not the only one with this head-scratcher? If someone has a suggestion or work-around solution it'd be highly appreciated!

VinylFox
27 Dec 2010, 5:50 AM
The Safari developer guide states that on iOS devices, volume is not able to be controlled via JavaScript.

Safari HTML5 Audio and Video Guide (http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-DontLinkElementID_15)