UIController

public abstract classUIControllerextendsObject

Base class for implementing a UI controller that receives media status updates from the cast receiver. This can be subclassed to implement custom controls such as "thumb up" button when using UIMediaControllerto implement your media playback UI.

Public Constructor Summary

Public Method Summary

void
onMediaStatusUpdated()
Called when there is an updatedMediaStatus on the RemoteMediaClient.
void
onSendingRemoteMediaRequest()
Called when there is a outgoing remote media request on the RemoteMediaClient.
void
onSessionConnected(CastSession castSession)
Called when aCastSession is connected.
void
onSessionEnded()
Called when aCastSession is ended.

Protected Method Summary

RemoteMediaClient
getRemoteMediaClient()
Returns the managed RemoteMediaClientof the current activeCastSession, if any.

Inherited Method Summary

Public Constructors

publicUIController()

Public Methods

public voidonMediaStatusUpdated()

Called when there is an updatedMediaStatus on the RemoteMediaClient.

public voidonSendingRemoteMediaRequest()

Called when there is a outgoing remote media request on the RemoteMediaClient.

public voidonSessionConnected(CastSession castSession)

Called when aCastSession is connected. Subclass must call through to super when overriding this method. getRemoteMediaClient()will return the managed RemoteMediaClientafter this method is called.

public voidonSessionEnded()

Called when aCastSession is ended. Subclass must call through to super when overriding this method. getRemoteMediaClient()will returnnullafter this method is called.

Protected Methods

protectedRemoteMediaClient getRemoteMediaClient()

Returns the managed RemoteMediaClientof the current activeCastSession, if any.