Package com.castlabs.android.utils
Class TrackTypeUtils
- java.lang.Object
-
- com.castlabs.android.utils.TrackTypeUtils
-
public final class TrackTypeUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
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
@NonNull public static String getExoTrackTypeString(int trackType)
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
public static String getRendererTrackTypeString(int trackType)
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
-
-