mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / HLSSettings Object / maxAudioFramesDrift Property
In This Topic
    maxAudioFramesDrift Property
    In This Topic
    Description

    Audio frames drift so that the distance between consecutive audio frame remains constant.

    Default: 1

    Property type
    Read-write property
    Syntax
    Visual Basic
    Public Property maxAudioFramesDrift As Long
    Remarks

    Browsers are really strict about audio frames timings. They usually play audio frames one after the other, regardless of the timestamps advertised in the fmp4. If audio timestamps are not consistent (consecutive audio frames too close or too far from each other), audio will easily drift. hls.js is restamping audio frames so that the distance between consecutive audio frame remains constant. if the distance is larger than the max allowed drift, hls.js will either

    • drop the next audio frame if distance is too small (if next audio frame timestamp is smaller than expected time stamp - max allowed drift)
    • insert silent frames if distance is too big (next audio frame timestamp is bigger than expected timestamp + max allowed drift)

    Parameter should be an integer representing the max number of audio frames allowed to drift. keep in mind that one audio frame is 1024 audio samples (if using AAC), at 44.1 kHz, it gives 1024/44100 = 23ms

    See Also