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 intconvertExoTrackTypeToRendererTrackType(int trackType)Converts given track type to renderer track typestatic StringgetExoTrackTypeString(int trackType)Translates the track types to human readable stringsstatic StringgetRendererTrackTypeString(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 theCTRACK_TYPE_*constants if the data corresponds to media of a specific type.C.TRACK_TYPE_UNKNOWNotherwise.- Returns:
- The track type of the renderer, one of
PlayerController.VIDEO_RENDERER,PlayerController.AUDIO_RENDERER,PlayerController.TEXT_RENDERER,PlayerController.METADATA_RENDERERor -1
-
getExoTrackTypeString
@NonNull public static String getExoTrackTypeString(int trackType)
Translates the track types to human readable strings- Parameters:
trackType- One of theCTRACK_TYPE_*constants if the data corresponds to media of a specific type.C.TRACK_TYPE_UNKNOWNotherwise.- 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_RENDERERorPlayerController.METADATA_RENDERER- Returns:
- String representation for the given track
-
-