com.aliyun.player.nativeclass

## Class TrackInfo

- java.lang.Object
- - com.aliyun.player.nativeclass.TrackInfo

-     public class TrackInfo
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TrackInfo.Type` Track types
    `static class` | `TrackInfo.VideoHDRType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `audioChannels`
    `java.lang.String` | `audioLang`
    `int` | `audioSampleFormat`
    `int` | `audioSampleRate`
    `static int` | `AUTO_SELECT_INDEX` The index of automatic bitrate switchover.
    `java.lang.String` | `description`
    `int` | `index`
    `TrackInfo.Type` | `mType`
    `java.lang.String` | `subtitleLang`
    `int` | `videoBitrate`
    `TrackInfo.VideoHDRType` | `videoHDRType`
    `int` | `videoHeight`
    `int` | `videoWidth`
    `java.lang.String` | `vodDefinition`
    `long` | `vodFileSize`
    `java.lang.String` | `vodFormat`
    `java.lang.String` | `vodPlayUrl`
    `java.lang.String` | `vodWaterMarkPlayUrl`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrackInfo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAudioChannels()` Query the number of channels of the audio stream.
    `java.lang.String` | `getAudioLang()` Query the language of the audio stream.
    `int` | `getAudioSampleFormat()` Query the sampling format of the audio stream.
    `int` | `getAudioSampleRate()` Query the sampling rate of the audio stream.
    `java.lang.String` | `getDescription()` Query the description of the stream.
    `int` | `getIndex()` Query the index of the stream.
    `java.lang.String` | `getSubtitleLang()` Query the language of the subtitle stream.
    `TrackInfo.Type` | `getType()` Query the type of the stream.
    `int` | `getVideoBitrate()` Query the bitrate of the video stream.
    `int` | `getVideoHDRType()`
    `int` | `getVideoHeight()` Query the height of the video stream.
    `int` | `getVideoWidth()` Query the width of the video stream.
    `java.lang.String` | `getVodDefinition()` Query the definition of the VOD stream.
    `long` | `getVodFileSize()` Query the size of the VOD file.
    `java.lang.String` | `getVodFormat()` Query the format of the media.
    `java.lang.String` | `getVodPlayUrl()` Query the playback URL.
    `java.lang.String` | `getVodWaterMarkPlayUrl()` Query the playback URL of the media with a watermark added.
    `void` | `setVideoHDRType(int type)`

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

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

- - ### Field Detail

    - #### AUTO_SELECT_INDEX

          public static final int AUTO_SELECT_INDEX

      The index of automatic bitrate switchover. When this index is specified, the media is automatically switched among multiple bitrates.
      See Also:
        Constant Field Values

    - #### index

          public int index

    - #### mType

          public TrackInfo.Type mType

    - #### description

          public java.lang.String description

    - #### videoBitrate

          public int videoBitrate

    - #### videoWidth

          public int videoWidth

    - #### videoHeight

          public int videoHeight

    - #### videoHDRType

          public TrackInfo.VideoHDRType videoHDRType

    - #### audioLang

          public java.lang.String audioLang

    - #### audioChannels

          public int audioChannels

    - #### audioSampleRate

          public int audioSampleRate

    - #### audioSampleFormat

          public int audioSampleFormat

    - #### subtitleLang

          public java.lang.String subtitleLang

    - #### vodDefinition

          public java.lang.String vodDefinition

    - #### vodFileSize

          public long vodFileSize

    - #### vodPlayUrl

          public java.lang.String vodPlayUrl

    - #### vodWaterMarkPlayUrl

          public java.lang.String vodWaterMarkPlayUrl

    - #### vodFormat

          public java.lang.String vodFormat

  - ### Constructor Detail

    - #### TrackInfo

          public TrackInfo()

  - ### Method Detail

    - #### setVideoHDRType

          public void setVideoHDRType(int type)

    - #### getVideoHDRType

          public int getVideoHDRType()

    - #### getVodPlayUrl

          public java.lang.String getVodPlayUrl()

      Query the playback URL. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VOD`, this value is valid.
      Returns:
        The playback URL.

    - #### getVodFormat

          public java.lang.String getVodFormat()

      Query the format of the media. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VOD`, this value is valid.
      Returns:
        The format of the media.

    - #### getVodWaterMarkPlayUrl

          public java.lang.String getVodWaterMarkPlayUrl()

      Query the playback URL of the media with a watermark added. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VOD`, this value is valid.
      Returns:
        The playback URL of the media with a watermark added.

    - #### getIndex

          public int getIndex()

      Query the index of the stream.
      Returns:
        The index of the stream.

    - #### getType

          public TrackInfo.Type getType()

      Query the type of the stream.
      Returns:
        The type of the stream.

    - #### getVideoBitrate

          public int getVideoBitrate()

      Query the bitrate of the video stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VIDEO`, this value is valid.
      Returns:
        The bitrate of the video stream.

    - #### getVideoWidth

          public int getVideoWidth()

      Query the width of the video stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VIDEO`, this value is valid.
      Returns:
        The width of the video stream.

    - #### getVideoHeight

          public int getVideoHeight()

      Query the height of the video stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VIDEO`, this value is valid.
      Returns:
        The height of the video stream.

    - #### getAudioLang

          public java.lang.String getAudioLang()

      Query the language of the audio stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_AUDIO`, this value is valid.
      Returns:
        The language of the audio stream.

    - #### getAudioChannels

          public int getAudioChannels()

      Query the number of channels of the audio stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_AUDIO`, this value is valid.
      Returns:
        The number of channels of the audio stream.

    - #### getAudioSampleRate

          public int getAudioSampleRate()

      Query the sampling rate of the audio stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_AUDIO`, this value is valid.
      Returns:
        The sampling rate of the audio stream.

    - #### getAudioSampleFormat

          public int getAudioSampleFormat()

      Query the sampling format of the audio stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_AUDIO`, this value is valid.
      Returns:
        The sampling format of the audio stream.

    - #### getSubtitleLang

          public java.lang.String getSubtitleLang()

      Query the language of the subtitle stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_SUBTITLE`, this value is valid.
      Returns:
        The language of the subtitle stream.

    - #### getDescription

          public java.lang.String getDescription()

      Query the description of the stream.
      Returns:
        The stream description.

    - #### getVodDefinition

          public java.lang.String getVodDefinition()

      Query the definition of the VOD stream. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VOD`, this value is valid.
      Returns:
        The definition of the VOD stream.

    - #### getVodFileSize

          public long getVodFileSize()

      Query the size of the VOD file. Note: Only when `getType()` = `TrackInfo.Type.TYPE_VOD`, this value is valid.
      Returns:
        The size of the VOD file.