Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PlaybackConfig

Example:

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

Hierarchy

  • PlaybackConfig

Index

Properties

Optional audioCodecPriority

audioCodecPriority: string[]

Currently only supported for DASH Streams. 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 subtitle languages which should be used the specified order on start up.

Optional autoplay

autoplay: boolean

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.ON_WARNING} with code WarningMessages.5008 for detecting the blocking.

Optional muted

muted: boolean

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

Optional playsInline

playsInline: boolean

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
  • flash refers to the Flash fallback
  • 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: 'flash', streaming: 'dash'}
{ player: 'flash', streaming: 'hls'}
{ player: 'flash', streaming: 'smooth'}
{ player: 'native-flash', streaming: 'hls'}
{ player: 'native', streaming: 'progressive'}

Example:

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

Optional restoreUserSettings

restoreUserSettings: boolean

Save & restore behavior of user settings like volume, muted, selected language etc. if set to true. Default is false.

Optional seeking

seeking: boolean

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: boolean

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[]

Currently only supported for DASH Streams. 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: number

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

Generated using TypeDoc