diff --git a/internal/hls/tsfile.go b/internal/hls/tsfile.go index 25a46938..e58fcc77 100644 --- a/internal/hls/tsfile.go +++ b/internal/hls/tsfile.go @@ -90,6 +90,9 @@ func (t *tsFile) writeH264(dts time.Duration, pts time.Duration, isIDR bool, nal } } + // prepend an AUD. This is required by video.js and iOS + nalus = append([][]byte{{byte(h264.NALUTypeAccessUnitDelimiter), 240}}, nalus...) + enc, err := h264.EncodeAnnexB(nalus) if err != nil { return err