Package com.castlabs.android.utils
Class TrackTypeUtils
java.lang.Object
com.castlabs.android.utils.TrackTypeUtils
Utility class for converting track types to renderer track types and vice versa.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
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
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
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
-