Audio frames drift so that the distance between consecutive audio frame remains constant.
Default: 1
Audio frames drift so that the distance between consecutive audio frame remains constant.
Default: 1
Visual Basic |
---|
Public Property maxAudioFramesDrift As Long |
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
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