audioTrackCount property

int audioTrackCount

Gets audio track count from current MediaSource

Implementation

int get audioTrackCount {
  int count = PlayerFFI.getAudioTrackCount(id);
  // for some reason this value returns 0 when no tracks exists
  // and 2 or more if there's 1 or more audio tracks for this [MediaSource].
  return count > 1 ? count - 1 : count;
}