The implementation
supports Real Time Streaming Protocol (RTSP). An RTSP player is created
using the Manager.createPlayer
method with the locator
starting with rtsp://
and ending with a supported
video file extension:
Correct locator: rtsp://somedomain/video.3gp
Incorrect locator: rtsp://somedomain/video
The following displays a valid player instance for streaming video:
Player player = Manager.createPlayer("rtsp://somelink.com/video.3gp");
The RTSP player automatically uses an existing Internet connection if one is already available.
A 3G or WiFi network connection is recommended to achieve smooth streaming.
The playable content
types can be queried dynamically by calling Manager.getSupportedContentTypes("rtsp")
.
In some cases, the dimensions of the source video cannot
be obtained for RTSP streams. In these cases, the default video display
size (32x32 pixels) is used, and VideoControl.getSourceWidth
and VideoControl.getSourceHeight
will both return
the value 32. The actual video image resolution is not affected, so
the video can be rescaled to the desired size using VideoControl.setDisplaySize
without loss in image quality.
The supported content types for RTSP are listed in section Content types.
An example of a YouTube MIDlet that uses streaming over RTSP can be found here: How_to_create_a_YouTube_player_with_Java_ME.
Streaming from an InputStream is not supported. All the data available in an InputStream is consumed into a buffer before a player is created.
Nokia Asha software platform 1.0 devices do not support streaming over RTSP.