Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PlaybackConfig

Config to determine the initial playback state of the Player.

All options passed in this config, will be considered as the starting state of the player, therefore no events will be triggered signaling a potential change compared to the player default logic.

Example:

playback : {
  autoplay: false,
  muted: false,
  audioLanguage: ['en', 'es', 'de'],
  subtitleLanguage: 'en',
  preferredTech: [{
    player: 'html5',
    streaming: 'dash'
  }, {
    player: 'native',
    streaming: 'hls'
  }]
}

Hierarchy

  • PlaybackConfig

Index

Properties

Optional audioCodecPriority

audioCodecPriority: string[]

Specify the priority of audi codecs. If more than one audio codec is available this order will be respected while finding a codec which is supported by the current browser. If there is a codec which is not in this priority list, it will be tried only if none of this list are available / supported Default is ['ec-3', 'mp4a.a6', 'ac-3', 'mp4a.a5', 'mp4a.40']

since

7.6

Optional audioLanguage

audioLanguage: string | string[]

Defines one or more audio languages which should be used in the specified order on start up.

Optional autoplay

autoplay: undefined | false | true

Whether the player starts playing after loading a source or not (false, default). Note that unmuted autoplay is blocked on several browsers, check for {@link Events.Warning} with code WarningCode.PLAYBACK_COULD_NOT_BE_STARTED for detecting the blocking.

Optional isForcedSubtitle

isForcedSubtitle: undefined | function

Determines if the subtitle should be selected by the player per default and kept in sync with the selected audio language. The subtitle will not appear in PlayerSubtitlesAPI.list and can't be deactivated or activated through the API.

Per default subtitle tracks with forced=true will be selected. In case of DASH these are subtitles with the role forced_subtitle and in case of HLS subtitles with the attribute FORCED=YES.

Optional muted

muted: undefined | false | true

Whether the sound is muted on startup or not (false, default).

Optional playsInline

playsInline: undefined | false | true

Whether to add the playsinline attribute to the video element or not. This stops videos immediately going fullscreen after starting playback on iOS for example. Default is true.

Optional preferredTech

preferredTech: PreferredTechnology[]

An array of objects to specify the player and streaming technology order to use. If the first is supported, this technologies are used. If not, the second is tried etc.

Player technologies:

  • html5 refers to the MediaSource Extension (MSE) based JavaScript player
  • native refers to the browser’s native capabilities are being used, e.g. playing back HLS in Safari on iOS

Currently supported combinations:

{ player: 'html5', streaming: 'dash'}
{ player: 'html5', streaming: 'hls'}
{ player: 'html5', streaming: 'smooth'}
{ player: 'native', streaming: 'hls'}
{ player: 'native', streaming: 'progressive'}

Example:

preferredTech : [{
  player: 'html5',
  streaming: 'dash'
}, {
  player: 'native',
  streaming: 'hls'
}]

Optional seeking

seeking: undefined | false | true

Whether to allow seeking or not. Default is true.

Optional subtitleLanguage

subtitleLanguage: string | string[]

Defines one or more subtitle languages which should be used in the specified order on start up.

Optional timeShift

timeShift: undefined | false | true

Enables time shift / DVR for live streams. Default is true (enabled). If time shift is disabled (set to false), the timeline (scrub bar) will not be shown any more.

Optional videoCodecPriority

videoCodecPriority: string[]

Specify the priority of video codecs for this source. If more than one video codec is available this order will be respected while finding a codec which is supported by the current browser. If there is a codec which is not in this priority list, it will be tried only if none of this list are available / supported Default is ['av1', 'hevc', 'hvc', 'vp9', 'avc']

since

7.6

Optional volume

volume: undefined | number

Defines the volume level of the player when started for the first time. Default value is 100.

Generated using TypeDoc