02-15-2012 06:56 AM
Hi,
I am developing an application which contains video play, below is my code
final Player player = Manager.createPlayer(connectionUrl);
player.realize();
if ((control = (VideoControl) player.getControl("VideoControl")) != null) {
control.initDisplayMode(VideoControl.USE_DIRECT_V
flag = true;
control.setDisplayFullScreen(true);
control.setVisible(true);
player.prefetch();
player.start();
}
and am developing two seperate builds one for touch & another one for non-touch. This same code is working fine in non-touch simulators and non-touch device 9780 bold.
But when I tested this in touch it just plays the voice and instead of video it just shows a blank page and I have a timer bar in the bottom its also moving.
& to make sure instead of the above coding I just called
Browser.getDefaultSession().displayPage(connection
Can anyone help me to resolve this?
Thanks.
03-08-2012 03:54 AM
Anyone help me?
03-08-2012 04:14 AM
Hii ,
Can you try this One!!
_player = Manager.createPlayer(video.getURL());
if(_player!=null){
_player.realize();
VideoControl videoControl = (VideoControl) _player
.getControl("VideoControl");
Field field = (Field) videoControl.initDisplayMode(
VideoControl.USE_GUI_PRIMITIVE,
"net.rim.device.api.ui.Field");
field.setPadding(PADDING, PADDING, PADDING, PADDING);
videoControl.setDisplayLocation(PADDING, PADDING);
videoControl.setDisplaySize(videoWidth, videoHeight);
videoControl.setVisible(true);
03-09-2012 01:56 AM
No
Field field = (Field) control.initDisplayMode(VideoControl.USE_GUI_PRIMI
this one is also not working..
When I create the player using the video from SDCard like
Player player = javax.microedition.media.Manager.createPlayer("fil
Both the
USE_DIRECT_VIDEO with canvas and USE_GUI_PRIMITIVE with field both are working but when I create the player by
Player player = Manager.createPlayer(connectionStringUrl);
There is a blank screen and the video is not coming but I can hear the audio and the timer bar is moving and this is only for touch simulator and touch device the same code works fine in non-touch simulator and device...
Also I have separately hit the video play url which I've given as input from browser the video plays very well.
What is wrong with the code? Anyone help me??