Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AdaptationConfig

Example:

adaptation : {
  desktop: {
    bitrates: {
      minSelectableAudioBitrate: '128kbps',
      maxSelectableAudioBitrate: '320kbps',
      minSelectableVideoBitrate: '900kbps',
      maxSelectableVideoBitrate: Infinity
    }
  },
  mobile: {
    bitrates: {
      minSelectableAudioBitrate: 0,
      maxSelectableAudioBitrate: '256000bps',
      minSelectableVideoBitrate: 0,
      maxSelectableVideoBitrate: '2.5mbps'
    }
  }
}

Hierarchy

Index

Properties

Optional bitrates

Lower and upper bitrate boundaries to limit qualities.

Optional disableDownloadCancelling

disableDownloadCancelling: boolean

The player automatically cancels requests if it takes too long and retries in a lower quality (default, false). This behavior can be disabled by setting this option to true.

Optional exclude

exclude: boolean

Specifies whether representations that must not be switched to should be removed when parsing the manifest or not. Default is false.

Optional limitToPlayerSize

limitToPlayerSize: boolean

Limits the automatically selected quality to the player size, so the player won't select quality levels with a higher resolution than the video element. This is disabled (false) per default.

Optional maxStartupBitrate

maxStartupBitrate: Bitrate

The maximum bitrate the player should start playback with. Has no effect if startupBitrate is used.

Optional onAudioAdaptation

onAudioAdaptation: function

A callback function to customize the player's adaptation logic that is called before the player tries to download a new audio segment.

Example:

var conf = {
  ...
  adaptation: {
    desktop: {
      onAudioAdaptation: function(data) {
        // Do your custom logic
        return newRepresentationId;
      }
    },
    mobile: {
      onAudioAdaptation: function(data) {
        // Do your custom logic
        return newRepresentationId;
      }
    },
  }
};
param

An object carrying the suggested attribute, holding the suggested representation/quality ID the player would select

returns

A valid representation/quality ID which the player should use, based on your custom logic (either data.suggested to switch to the player's suggested quality, or a AudioQuality.id)

see

PlayerAPI.getAvailableAudioQualities to get a list of all available audio qualities

Type declaration

Optional onVideoAdaptation

onVideoAdaptation: function

A callback function to customize the player's adaptation logic that is called before the player tries to download a new video segment.

Example:

var conf = {
  ...
  adaptation: {
    desktop: {
      onVideoAdaptation: function(data) {
        // Do your custom logic
        return newRepresentationId;
      }
    },
    mobile: {
      onVideoAdaptation: function(data) {
        // Do your custom logic
        return newRepresentationId;
      }
    },
  }
};

To simply restrict video qualities to the current video player size, use limitToPlayerSize.

param

An object carrying the suggested attribute, holding the suggested representation/quality ID the player would select

returns

A valid representation/quality ID which the player should use, based on your custom logic (either data.suggested to switch to the player's suggested quality, or a VideoQuality.id)

see

PlayerAPI.getAvailableVideoQualities to get a list of all available video qualities

Type declaration

Optional preload

preload: boolean

Specifies whether the player preloads the content (default: true for VOD, false for live streams) or not.

Optional resolution

resolution: object

Lower and upper resolution boundaries. Use "0" for no limitation for minimum selectable width/height and "Infinity" for no limitation for maximum selectable width/height.

Type declaration

Optional startupBitrate

startupBitrate: Bitrate

The bitrate the player should start playback with. If this option doesn’t exist in the configuration, the player will try to find the best startup bitrate automatically.

Generated using TypeDoc