You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(subtitle): decrypt LL-HLS VTT AES parts per-part
SubtitleStreamController only decrypts AES-encrypted VTT data at full-segment
boundaries via _handleFragmentLoadComplete. When low-latency parts are in use,
each part arrives through the progress callback (_handleFragmentLoadProgress),
which the base class leaves as an empty no-op for subtitles. Encrypted parts
therefore never fire FRAG_DECRYPTED on the part path, leaving subtitle parsing
stuck and adding a segment-duration latency to encrypted VTT captions.
This change overrides _handleFragmentLoadProgress in SubtitleStreamController
to decrypt each encrypted VTT part as an independent AES-CBC stream using the
segment-level IV, and emits FRAG_DECRYPTED with the part reference so the
timeline-controller can anchor cues at part.start when appropriate. The full-
segment path is reorganised to share the same decryptPayload helper.
A 'part: Part | null' field is added to FragDecryptedData and to the two
existing FRAG_DECRYPTED emit sites (base-stream-controller init-segment path
and subtitle-stream-controller full-segment path) so consumers can distinguish
part-level decryption from segment-level decryption.
0 commit comments