02-18-2011 05:30 AM
I'm developing an application which have an option to play video from using http i successfully play the video but i cant give default volume control to the player. Please can any one tell me how to give default volume control for my player..
Thanks in advance,
Solved! Go to Solution.
02-20-2011 11:59 PM
I'm using video streaming in my application and successfully stream my video from the server and play it. but i cant able to control the volume i need to use the default media player volume(right side button UP & DOWN button in device). how can i access these volume button through my application.
02-21-2011 01:43 AM
First you have to get the VolumeControl from the Player object.
VolumeControl volC = (VolumeControl) player.getControl("VolumeControl");
Then Implement the KeyListener and in KeyDown method check for the Volume Key.
public boolean keyDown(int keycode, int time)
if (volC != null)
int key = Keypad.key(keycode);
if (key == Keypad.KEY_VOLUME_UP)
volC.setLevel(volC.getLevel() + 10);
else if (key == Keypad.KEY_VOLUME_DOWN)
volC.setLevel(volC.getLevel() - 10);
02-21-2011 01:43 AM - edited 02-21-2011 01:47 AM
Alternatively you could use a key injection to attain the buttons functionality but I would also agree with the poster above.