getAvailableAudioBitrates

Description

The different bitrates available for the current audio track in bits per seconds.

Note for multi-Period contents:

This method will only return the available audio bitrates of the Period that is currently playing.

In DirectFile mode (see loadVideo options), this method returns an empty array.

Syntax

const bitrates = player.getAvailableAudioBitrates();
  • return value Array.<Number>: the available audio bitrates for the current track of the current Period.

Example

const audioBitrates = player.getAvailableAudioBitrates();
if (audioBitrates.length) {
  console.log(
    "The current audio is available in the following bitrates",
    audioBitrates.join(", ")
  );
}
Page List