getAvailableVideoBitrates

Description

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

Note for multi-Period contents:

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

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

Syntax

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

Example

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