alignedSegmentSeekThresholdMs

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.