TvInputCallback
abstract class TvInputCallback
kotlin.Any | |
↳ | android.media.tv.TvView.TvInputCallback |
Callback used to receive various status updates on the TvView
.
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
onAitInfoUpdated(inputId: String, aitInfo: AitInfo) This is called when the AIT (Application Information Table) info has been updated. |
open Unit |
onAudioPresentationSelected(inputId: String, presentationId: Int, programId: Int) This is called when audio presentation selection has changed. |
open Unit |
onAudioPresentationsChanged(inputId: String, audioPresentations: MutableList<AudioPresentation!>) This is called when the audio presentation information has been changed. |
open Unit |
onAvailableSpeeds(inputId: String, speeds: FloatArray) This is called when time-shifting is enabled to inform the available speeds. |
open Unit |
onChannelRetuned(inputId: String!, channelUri: Uri!) This is invoked when the channel of this TvView is changed by the underlying TV input without any android. |
open Unit |
onConnectionFailed(inputId: String!) This is invoked when an error occurred while establishing a connection to the underlying TV input. |
open Unit |
onContentAllowed(inputId: String!) 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. |
open Unit |
onContentBlocked(inputId: String!, rating: TvContentRating!) 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. |
open Unit |
onCueingMessageAvailability(inputId: String, available: Boolean) This is called when cueing message becomes available or unavailable. |
open Unit |
onDisconnected(inputId: String!) This is invoked when the existing connection to the underlying TV input is lost. |
open Unit |
onSignalStrengthUpdated(inputId: String, strength: Int) This is called when signal strength is updated. |
open Unit |
onTimeShiftMode(inputId: String, mode: Int) This is called when time shift mode is set or updated. |
open Unit |
onTimeShiftStatusChanged(inputId: String!, status: Int) This is called when the time shift status is changed. |
open Unit |
onTrackSelected(inputId: String!, type: Int, trackId: String!) This is called when there is a change on the selected tracks. |
open Unit |
onTracksChanged(inputId: String!, tracks: MutableList<TvTrackInfo!>!) This is called when the track information has been changed. |
open Unit |
This is called when the session has been tuned to the given channel. |
open Unit |
onTvMessage(inputId: String, type: Int, data: Bundle) This is called when a new TV Message has been received. |
open Unit |
onVideoAvailable(inputId: String!) This is called when the video is available, so the TV input starts the playback. |
open Unit |
onVideoFreezeUpdated(inputId: String, isFrozen: Boolean) This is called when the video freeze status is updated. |
open Unit |
onVideoSizeChanged(inputId: String!, width: Int, height: Int) This is invoked when the video size has been changed. |
open Unit |
onVideoUnavailable(: String!, : Int) This is called when the video is not available, so the TV input stops the playback. |
Public constructors
TvInputCallback
TvInputCallback()
Public methods
onAitInfoUpdated
open fun onAitInfoUpdated(
inputId: String,
aitInfo: AitInfo
): Unit
This is called when the AIT (Application Information Table) info has been updated.
Parameters | |
---|---|
aitInfo |
AitInfo: The current AIT info. This value cannot be null . |
inputId |
String: This value cannot be null . |
onAudioPresentationSelected
open fun onAudioPresentationSelected(
inputId: String,
presentationId: Int,
programId: Int
): Unit
This is called when audio presentation selection has changed.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
presentationId |
Int: The ID of the audio presentation selected. |
programId |
Int: The ID of the program providing the selected audio presentation. |
onAudioPresentationsChanged
open fun onAudioPresentationsChanged(
inputId: String,
audioPresentations: MutableList<AudioPresentation!>
): Unit
This is called when the audio presentation information has been changed.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
audioPresentations |
MutableList<AudioPresentation!>: A list of updated audio presentation information. This value cannot be null . |
onAvailableSpeeds
open fun onAvailableSpeeds(
inputId: String,
speeds: FloatArray
): Unit
This is called when time-shifting is enabled to inform the available speeds.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
speeds |
FloatArray: An ordered array of playback speeds, expressed as values relative to the normal playback speed (1.0), at which the current content can be played as a time-shifted broadcast. This is an empty array if the supported playback speeds are unknown or the video/broadcast is not in time shift mode. If currently in time shift mode, this array will normally include at least the values 1.0 (normal speed) and 0.0 (paused). This value cannot be null . |
onChannelRetuned
open fun onChannelRetuned(
inputId: String!,
channelUri: Uri!
): Unit
This is invoked when the channel of this TvView is changed by the underlying TV input without any android.media.tv.TvView#tune request.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
channelUri |
Uri!: The URI of a channel. |
onConnectionFailed
open fun onConnectionFailed(inputId: String!): Unit
This is invoked when an error occurred while establishing a connection to the underlying TV input.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
onContentAllowed
open fun onContentAllowed(inputId: String!): Unit
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.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
onContentBlocked
open fun onContentBlocked(
inputId: String!,
rating: TvContentRating!
): Unit
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.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
rating |
TvContentRating!: The content rating of the blocked program. |
onCueingMessageAvailability
open fun onCueingMessageAvailability(
inputId: String,
available: Boolean
): Unit
This is called when cueing message becomes available or unavailable.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
available |
Boolean: The current availability of cueing message. true if cueing message is available; false if it becomes unavailable. |
onDisconnected
open fun onDisconnected(inputId: String!): Unit
This is invoked when the existing connection to the underlying TV input is lost.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
onSignalStrengthUpdated
open fun onSignalStrengthUpdated(
inputId: String,
strength: Int
): Unit
This is called when signal strength is updated.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
strength |
Int: The current signal strength. Value is android.media.tv.TvInputManager#SIGNAL_STRENGTH_LOST , android.media.tv.TvInputManager#SIGNAL_STRENGTH_WEAK , or android.media.tv.TvInputManager#SIGNAL_STRENGTH_STRONG |
onTimeShiftMode
open fun onTimeShiftMode(
inputId: String,
mode: Int
): Unit
This is called when time shift mode is set or updated.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
mode |
Int: The current time shift mode. The value is one of the following: TvInputManager.TIME_SHIFT_MODE_OFF , TvInputManager.TIME_SHIFT_MODE_LOCAL , TvInputManager.TIME_SHIFT_MODE_NETWORK , TvInputManager.TIME_SHIFT_MODE_AUTO . Value is android.media.tv.TvInputManager#TIME_SHIFT_MODE_OFF , android.media.tv.TvInputManager#TIME_SHIFT_MODE_LOCAL , android.media.tv.TvInputManager#TIME_SHIFT_MODE_NETWORK , or android.media.tv.TvInputManager#TIME_SHIFT_MODE_AUTO |
onTimeShiftStatusChanged
open fun onTimeShiftStatusChanged(
inputId: String!,
status: Int
): Unit
This is called when the time shift status is changed.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
status |
Int: The current time shift status. Should be one of the followings.
android.media.tv.TvInputManager#TIME_SHIFT_STATUS_UNKNOWN , android.media.tv.TvInputManager#TIME_SHIFT_STATUS_UNSUPPORTED , android.media.tv.TvInputManager#TIME_SHIFT_STATUS_UNAVAILABLE , or android.media.tv.TvInputManager#TIME_SHIFT_STATUS_AVAILABLE |
onTrackSelected
open fun onTrackSelected(
inputId: String!,
type: Int,
trackId: String!
): Unit
This is called when there is a change on the selected tracks.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
type |
Int: The type of the track selected. The type can be TvTrackInfo.TYPE_AUDIO , TvTrackInfo.TYPE_VIDEO or TvTrackInfo.TYPE_SUBTITLE . |
trackId |
String!: The ID of the track selected. |
onTracksChanged
open fun onTracksChanged(
inputId: String!,
tracks: MutableList<TvTrackInfo!>!
): Unit
This is called when the track information has been changed.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
tracks |
MutableList<TvTrackInfo!>!: A list which includes track information. |
onTuned
open fun onTuned(
inputId: String,
channelUri: Uri
): Unit
This is called when the session has been tuned to the given channel.
Parameters | |
---|---|
channelUri |
Uri: The URI of a channel. This value cannot be null . |
inputId |
String: This value cannot be null . |
onTvMessage
open fun onTvMessage(
inputId: String,
type: Int,
data: Bundle
): Unit
This is called when a new TV Message has been received.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
type |
Int: The type of message received, such as TvInputManager.TV_MESSAGE_TYPE_WATERMARK Value is android.media.tv.TvInputManager#TV_MESSAGE_TYPE_WATERMARK , android.media.tv.TvInputManager#TV_MESSAGE_TYPE_CLOSED_CAPTION , or android.media.tv.TvInputManager#TV_MESSAGE_TYPE_OTHER |
data |
Bundle: The raw data of the message. The bundle keys are: TvInputManager.TV_MESSAGE_KEY_STREAM_ID , TvInputManager.TV_MESSAGE_KEY_GROUP_ID , TvInputManager.TV_MESSAGE_KEY_SUBTYPE , TvInputManager.TV_MESSAGE_KEY_RAW_DATA . See TvInputManager.TV_MESSAGE_KEY_SUBTYPE for more information on how to parse this data. This value cannot be null . |
onVideoAvailable
open fun onVideoAvailable(inputId: String!): Unit
This is called when the video is available, so the TV input starts the playback.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
onVideoFreezeUpdated
open fun onVideoFreezeUpdated(
inputId: String,
isFrozen: Boolean
): Unit
This is called when the video freeze status is updated.
Parameters | |
---|---|
inputId |
String: The ID of the TV input bound to this view. This value cannot be null . |
isFrozen |
Boolean: Whether or not the video is currently frozen on the las |
See Also
onVideoSizeChanged
open fun onVideoSizeChanged(
inputId: String!,
width: Int,
height: Int
): Unit
This is invoked when the video size has been changed. It is also called when the first time video size information becomes available after this view is tuned to a specific channel.
Parameters | |
---|---|
inputId |
String!: The ID of the TV input bound to this view. |
width |
Int: The width of the video. |
height |
Int: The height of the video. |
onVideoUnavailable
open fun onVideoUnavailable(
: String!,
: Int
): Unit
This is called when the video is not available, so the TV input stops the playback.