//BB Code private void startPlayingVideo2(){ try { Class playerDemoClass = Class.forName("VideoScreen"); _player = javax.microedition.media.Manager.createPlayer("rtsp://stream.zoovision.com/Movies/vader_sessions.3gp"); // Realize Player _player.realize(); _player.addPlayerListener(this); // Add listener to catch Player events _player.setMediaTime(100000); _videoControl = (VideoControl) _player.getControl("VideoControl"); // Get the Player VideoControl // Initialize video display mode _videoField = (Field) _videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field"); // Set the video display size to 200 x 200 // Create a manager for the video field _videoManager = new VideoManager(); _videoManager.add(_videoField); add(_videoManager); // Set video control to visible _videoControl.setVisible(true); _player.prefetch(); //player has to prefetch before it is getting started _player.start(); // Start the Player // Set up Player volume setVolume(_currentVolume); } catch (Exception e) { } }
Connections should be fast for live straming.
I checked in device as well as simulator.It worked fine for me.9000 simulator only supported for online streaming and i checked in 8220 device also.
Youtube Videos from m.youtube.com didn't worked for me.Some links worked for me are
static video:
rtsp://stream.zoovision.com/Movies/vader_sessions.3gp
for live videostream:
rtsp://stream.zoovision.com/live.sdp
For live audio stream:
rtsp://stream.zoovision.com/fkrzv2.sdp
References:
http://supportforums.blackberry.com/t5/Java-Development/Video-Streaming-Guidence/td-p/248096/highlight/true
References:
http://supportforums.blackberry.com/t5/Java-Development/Video-Streaming-Guidence/td-p/248096/highlight/true
Have a nice day.....
No comments:
Post a Comment