Package com.castlabs.android.utils
Class TrackTypeUtils
java.lang.Object
com.castlabs.android.utils.TrackTypeUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
convertExoTrackTypeToRendererTrackType
(int trackType) Converts given track type to renderer track typestatic String
getExoTrackTypeString
(int trackType) Translates the track types to human readable stringsstatic String
getRendererTrackTypeString
(int trackType) Translates the track types to human readable strings
-
Method Details
-
convertExoTrackTypeToRendererTrackType
public static int convertExoTrackTypeToRendererTrackType(int trackType) Converts given track type to renderer track type- Parameters:
trackType
- One of theC
TRACK_TYPE_*
constants if the data corresponds to media of a specific type.C.TRACK_TYPE_UNKNOWN
otherwise.- Returns:
- The track type of the renderer, one of
PlayerController.VIDEO_RENDERER
,PlayerController.AUDIO_RENDERER
,PlayerController.TEXT_RENDERER
,PlayerController.METADATA_RENDERER
or -1
-
getExoTrackTypeString
Translates the track types to human readable strings- Parameters:
trackType
- One of theC
TRACK_TYPE_*
constants if the data corresponds to media of a specific type.C.TRACK_TYPE_UNKNOWN
otherwise.- Returns:
- String of the specified track type
-
getRendererTrackTypeString
Translates the track types to human readable strings- Parameters:
trackType
- The track type, one ofPlayerController.VIDEO_RENDERER
,PlayerController.AUDIO_RENDERER
,PlayerController.TEXT_RENDERER
orPlayerController.METADATA_RENDERER
- Returns:
- String representation for the given track
-