net.rim.device.api.media.control
Interface RtspContentControl

All Superinterfaces:
Control

public interface RtspContentControl
extends Control

RtspContentControl provides access to the fast content switching feature supported by RTSP stream servers. It can only be obtained from a call to javax.microedition.media.Player#getControl() on a Player that is created to play RTSP content.

Since:
BlackBerry API 7.0.0

Method Summary
 void switchStreamToUrl(String url)
          Switches the Player controlled by this object to start playing new RTSP content.
 



Method Detail

switchStreamToUrl

void switchStreamToUrl(String url)
                       throws MediaException
Switches the Player controlled by this object to start playing new RTSP content. This method can be called as many times as needed but if called quickly, only the last call will be honored and previous calls may be ignored.

This method may only be called from the PREFETCHED or STARTED state.

If this method completes successfully, the Player will automatically transition to the STARTED state regardless of the previous state of the Player before the call is made.

A MediaException is thrown if switching to the given url cannot proceed. In this case the Player will remain in the same state it was in before the call to this method was made, either PREFETCHED or STARTED.

If no Exception is thrown it may still be possible that the switch request will still fail (for example, if the content requested is not found on the server). In this case a PlayerListener.ERROR event will occur and the Player will then transition to the REALIZED state. If this occurs then restarting the Player will attempt to restart the Player with the new 'switched' url.

Parameters:
url - the new url to switch to.
Throws:
MediaException - if switching to the given url fails. The Player will remain in it's current state.
IllegalStateException - if the Player is not in the PREFETCHED or STARTED state.
IllegalArgumentException - if url is null or if it does not start with "rtsp://". The Player will remain in it's current state.
UnsupportedOperationException - if the current connected RTSP server does not support fast content switching. The Player will remain in it's current state.
Since:
BlackBerry API 7.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal