Hi there,
is it possible to open up the BB media player with a specified video from a user program?
If so does anyone know how?
If not does anyone know how to get the javax.microedition.media.Player to fit into my just a section of my screen? In my program I have a list of videos which I can play using the Player. I open them in a new screen and i've tried to add stop/close functionality through the menu.
Here's the code i've used for that:
Code:
try
{
_videoPlayer = Manager.createPlayer(c.LocalPath);
_videoPlayer.realize();
_videoPlayer.prefetch();
//_videoControl = (VideoControl) _videoPlayer.getControl("javax.microedition.media.control.VideoControl");
//_videoField = (Field) _videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
//_videoControl.setVisible(true);
//add(_videoField);
_videoPlayer.start();
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
The commented out stuff doesn't work. I followed page 52 of the BB Java Development 4.3.0 pdf which suggested the above and it complains that "GUI primitive type not supported" when it reaches the second commented out line.
If I run it with those lines commented out the video runs fine but it's seems the video runs on top of the screen as the menu appears behind it (can select the menu items but not see them).
Any idea what's wrong with it?
Cheers.