fix(hls): keep ad-filtered segments out of DRM key state

This commit is contained in:
imSp4rky
2026-08-19 14:39:09 -06:00
parent 29d0828c33
commit 4177cb2267
3 changed files with 11 additions and 5 deletions
+3
View File
@@ -346,6 +346,9 @@ A typical `get_tracks` therefore looks like fetching the manifest text with
### Segment-filtering hooks
- **HLS**: set `track.OnSegmentFilter(segment)` to drop unwanted segments (ads/bumpers).
A dropped segment is invisible to the whole download: its `EXT-X-KEY` and its
`EXT-X-DISCONTINUITY` are ignored, so a clear ad break inside encrypted content does
not disturb decryption.
- **DASH**: pass a `period_filter` callable to `to_tracks` to drop whole periods.
Caching-breadth periods some services emit and non-`content` segment types are dropped automatically.