08-04-2010 11:18 AM
I am new to blackberry development and have ran into an issue that has stumped me for quite some time. My app provides a couple of buttons that are linked to a server that is streaming live video via rtsp. I have the video playing well, but the only thing is that there is no controls (for play/pause, or volume). On the blackberry, when I go to the browser and enter the URL, it plays the video and you can pause the video and everything normally. Here is the section for playing the video:
videoPlayer = Manager.createPlayer(path);
vc = (VideoControl)videoPlayer.getControl("VideoControl
Field videoField = (Field)vc.initDisplayMode(VideoControl.USE_GUI_PRI
I have tried several other variations of using the videoControl (found in other post) but with no success. I know this might be a simple no brainer, but I am a noob and im stumped. The main thing I need to add is a way for the user to pause the video. Volume isn't a big deal. Is there a way to get this working?
Also, are there any disadvantages to just invoking the browser to play the video? Or is that really the easier and best way? Thanks for any help.
08-04-2010 05:27 PM
Just wanted to bump this thread. I have a deadline coming soon and I need to get this figured out so I can move on. Also I'm not sure if it really matters what device I'm testing on, but I have been using the BlackBerry 9550.
How long does it usually take to get the signature keys from BlackBerry. I filled out the form online yesterday (August 3rd) and still haven't heard nothing back from them. I purchased the keys incase I can't figure this videoControl out, atleast I'll be able to invoke the browser. Thanks again for any help you can provide.
08-04-2010 05:44 PM - edited 08-04-2010 05:48 PM
I just looked over it, and I'm not seeing anything that would help my situation. My code looks alot like the "initializeCamera" method in the example.
Does it matter that I'm streaming video from a server, rather than using the phones camera? Is this something you have used before? Ive looked at alot of example online the past day or so and my code looks very similar to everyone elses. I bet its probably something simple that I'm just missing but I can't figure it out. Thanks for the reply.
08-05-2010 12:49 PM
Does anybody have any other ideas? I have been looking at the embededmediademo and have it working like that, but I need a way to lock the orientation of the screen. The only way I have found to do that is by extending the MIDlet class. But since im already extending MainScreen so I need to find a way without using MIDlets. Here is the code for the orientation:
DirectionControl dc = (DirectionControl)((Controllable)Display.getDispla
y(this)).getControl("net.rim.device.api.lcdui.cont rol.DirectionControl"); int directions = DirectionControl.DIRECTION_EAST | DirectionControl.DIRECTION_WEST; dc.setAcceptableScreenDirections(directions);
This is the MIDlet method, so it is not recognizing ".getDisplay()". Anyone have any pointers for the orientation or another way of adding the controls?