Hi friends!
I m trying to play a video in my blackberry default player but my code doesnt work. Here is my code:
HttpConnection connection = (HttpConnection) Connector.open(url+"; deviceside=true",Connector.READ_WRITE, true);
if (connection != null) {
InputStream input = null;
try {
input = connection.openInputStream();
player = Manager.createPlayer(input,"video/3gpp");
player.realize();
//Create a new VideoControl.
videoControl = (VideoControl)player.getControl("VideoControl");
//Initialize the video mode using a Field.
videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
//Set the video control to be visible.
videoControl.setVisible(true);
} catch (IOException e) {
System.out.println("IOException: " + e);
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
}
}//end if
}
}//end if
Thanks and Regards Mintu Nandi