Package com.castlabs.android.utils

# Class TrackTypeUtils

java.lang.Object
com.castlabs.android.utils.TrackTypeUtils

public final class TrackTypeUtils extends Object
Utility class for converting track types to renderer track types and vice versa.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `convertExoTrackTypeToRendererTrackType(int trackType)`
  Converts given track type to renderer track type
  `static String`
  `getExoTrackTypeString(int trackType)`
  Translates the track types to human readable strings
  `static String`
  `getRendererTrackTypeString(int trackType)`
  Translates the track types to human readable strings

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### convertExoTrackTypeToRendererTrackType

    public static int convertExoTrackTypeToRendererTrackType(int trackType)
    Converts given track type to renderer track type
    Parameters:
      `trackType` - One of the `C` `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 the `C` `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 of `PlayerController.VIDEO_RENDERER`, `PlayerController.AUDIO_RENDERER`, `PlayerController.TEXT_RENDERER` or `PlayerController.METADATA_RENDERER`
    Returns:
      String representation for the given track