Constructor and Description |
---|
TvInputCallback() |
Modifier and Type | Method and Description |
---|---|
void |
onChannelRetuned(String inputId,
Uri channelUri)
This is invoked when the channel of this TvView is changed by the underlying TV input
without any
TvView.tune(java.lang.String, android.net.Uri) request. |
void |
onConnectionFailed(String inputId)
This is invoked when an error occurred while establishing a connection to the underlying
TV input.
|
void |
onContentAllowed(String inputId)
This is called when the current program content turns out to be allowed to watch since
its content rating is not blocked by parental controls.
|
void |
onContentBlocked(String inputId,
TvContentRating rating)
This is called when the current program content turns out to be not allowed to watch
since its content rating is blocked by parental controls.
|
void |
onDisconnected(String inputId)
This is invoked when the existing connection to the underlying TV input is lost.
|
void |
onEvent(String inputId,
String eventType,
Bundle eventArgs)
This is invoked when a custom event from the bound TV input is sent to this view.
|
void |
onTimeShiftStatusChanged(String inputId,
int status)
This is called when the time shift status is changed.
|
void |
onTracksChanged(String inputId,
List<TvTrackInfo> tracks)
This is called when the track information has been changed.
|
void |
onTrackSelected(String inputId,
int type,
String trackId)
This is called when there is a change on the selected tracks.
|
void |
onVideoAvailable(String inputId)
This is called when the video is available, so the TV input starts the playback.
|
void |
onVideoSizeChanged(String inputId,
int width,
int height)
This is invoked when the video size has been changed.
|
void |
onVideoUnavailable(String inputId,
int reason)
This is called when the video is not available, so the TV input stops the playback.
|
public void onConnectionFailed(String inputId)
inputId
- The ID of the TV input bound to this view.public void onDisconnected(String inputId)
inputId
- The ID of the TV input bound to this view.public void onChannelRetuned(String inputId, Uri channelUri)
TvView.tune(java.lang.String, android.net.Uri)
request.inputId
- The ID of the TV input bound to this view.channelUri
- The URI of a channel.public void onTracksChanged(String inputId, List<TvTrackInfo> tracks)
inputId
- The ID of the TV input bound to this view.tracks
- A list which includes track information.public void onTrackSelected(String inputId, int type, String trackId)
inputId
- The ID of the TV input bound to this view.type
- The type of the track selected. The type can be
TvTrackInfo.TYPE_AUDIO
, TvTrackInfo.TYPE_VIDEO
or
TvTrackInfo.TYPE_SUBTITLE
.trackId
- The ID of the track selected.public void onVideoSizeChanged(String inputId, int width, int height)
inputId
- The ID of the TV input bound to this view.width
- The width of the video.height
- The height of the video.public void onVideoAvailable(String inputId)
inputId
- The ID of the TV input bound to this view.public void onVideoUnavailable(String inputId, int reason)
inputId
- The ID of the TV input bound to this view.reason
- The reason why the TV input stopped the playback:
public void onContentAllowed(String inputId)
inputId
- The ID of the TV input bound to this view.public void onContentBlocked(String inputId, TvContentRating rating)
inputId
- The ID of the TV input bound to this view.rating
- The content rating of the blocked program.public void onEvent(String inputId, String eventType, Bundle eventArgs)
inputId
- The ID of the TV input bound to this view.eventType
- The type of the event.eventArgs
- Optional arguments of the event.public void onTimeShiftStatusChanged(String inputId, int status)
inputId
- The ID of the TV input bound to this view.status
- The current time shift status. Should be one of the followings.