Options
All
  • Public
  • Public/Protected
  • All
Menu

Options used when instantiating new SyncMediaAudioRenderer instances.

Hierarchy

  • ISyncMediaAudioRendererOptions

Index

Properties

Optional alignedSegmentSeekThresholdMs

alignedSegmentSeekThresholdMs?: number

This option controls how the SyncMediaAudioRenderer should treat gaps between two consecutive segments. If you hear many clicks, and cutoff words when playing back the audio in the publication, try increasing the value of this option.

We say that 2 segments are aligned when a segment's start offset is equal to the previous segment's end offset. In some publications, consecutive segments are not perfectly aligned, meaning that the SyncMediaAudioRenderer needs to decide if it should perform a seek or not.

For example, lets say this option has been set to 500ms and we have 2 consecutive audio segments defined as:

S1:

  • startMs: 1000ms
  • endMs: 3000ms S2:
  • startMs: 3400ms
  • endMs: 7000ms

When the SyncMediaAudioRenderer reaches end of segment S1 at offset 3000 ms, there is a 400 ms gap until the start offset of segment S2. Since the gap between S1 and S2 is smaller than the value defined by this option, the SyncMediaAudioRenderer will not seek to the start of segment S2, but instead continue playing the audio until segment S2 has been reached.

In some publications with bad audio synchronization data, you may need to set this option as high as 2000 to have correct playback.

int
default

500

Optional audioElementPoolSize

audioElementPoolSize?: number

Sync Media Player manages a pool of Audio elements and listens on pointer events to setup the elements in a way that will allow continuous playback across audio files. This is done to reduce probability of the Sync Media Player getting paused during playback due to browser auto-play policy.

int
default

10

Optional enableBlobUrls

enableBlobUrls?: boolean

This option controls how resource data should be loaded when the audio renderer cannot stream a resource.

If this option is true, audio renderer create blob: URLs for resources. If this option is false, audio renderer create data: URLs for resources. If this option is null, audio renderer decides how to create URLs for resource.

default

null

Optional enableMediaStreaming

enableMediaStreaming?: boolean

If streaming of audio and video using the Media Source Extensions API (MSE) should be used. See https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API

If set to true, audio and video will be streamed if:

  • The Media Source Extensions API is available in the browser.
  • The media resource is encoded in a format supported by the browser and the ReadingSystemEngine.

Due to some issues with media streaming on iPadOs, media streaming will not be available on that platform.

default

false

Generated using TypeDoc