Skip to content

implemented rtp, lb, dl, pb, tpb , ttfb and ttlb#6

Draft
cotid-qualabs wants to merge 54 commits into
masterfrom
issue/cmcdv2-bitrate-keys
Draft

implemented rtp, lb, dl, pb, tpb , ttfb and ttlb#6
cotid-qualabs wants to merge 54 commits into
masterfrom
issue/cmcdv2-bitrate-keys

Conversation

@cotid-qualabs

@cotid-qualabs cotid-qualabs commented Jun 4, 2026

Copy link
Copy Markdown

This PR will...

Complete the implementation of several CMCD v2 request and response keys in CMCDController that were previously missing.

  • rtp (Requested Throughput): segment bitrate × rtpSafetyFactor (default 5), rounded to nearest 100 kbps
  • lb (Lowest Bitrate): lowest bitrate within the current maxAutoLevel range
  • pb (Playhead Bitrate): bitrate of the level currently at the playhead, tracked via FRAG_CHANGED
  • tpb (Top Playhead Bitrate): bitrate of the highest level allowed by maxAutoLevel
  • dl (Deadline): buffer length divided by playback rate, rounded to nearest 100 ms
  • ttfb / ttlb: derived from fragment loader response timing by wrapping the onSuccess callback to call reporter.recordResponseReceived()

Adds a new config option rtpSafetyFactor (default: 5) to let operators tune the headroom multiplier used for rtp.

Why is this Pull Request needed?

These keys are part of the CMCD v2 spec and were previously missing. Without them, CDN servers cannot use CMCD v2 signals to make informed caching and bitrate decisions.

Are there any points in the code the reviewer needs to double check?

  • The playheadLevel tracking relies on FRAG_CHANGED — verify this is the right event to determine which level is currently at the playhead vs. being buffered ahead.
  • tpb uses hls.maxAutoLevel, which may return -1 when unconstrained; the code guards this but worth a second look.
  • The onSuccess wrapper in the fragment loader spreads callbacks — verify there are no edge cases where this wrapping could affect existing loader error handling.

Resolves issues:

N/A

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@cotid-qualabs cotid-qualabs changed the title implemented rtp, lb, dl, pb, ttfb and ttlb implemented rtp, lb, dl, pb, tpb , ttfb and ttlb Jun 5, 2026
cotid-qualabs and others added 23 commits June 4, 2026 22:31
Adds `cmcd.reporterCallback` config option, enabling custom key and custom event reporting for CMCD v2.
…r-149.x

Update dependency chromedriver to v149
Co-authored-by: Rob Walch <robwalch@users.noreply.github.com>
…ideo-dev#7900)

* Treat un-demuxable fragments as a gap to prevent infinite reloading

When AES-128 media is served without an #EXT-X-KEY tag, the demuxer probe fails and transmuxer.error is set, so the existing gap guard (which only fires when transmuxer.error is null) never marks the fragment as a gap. The error controller then retries and switches levels indefinitely, reloading the same undecodable segment every ~180-200ms. Mark fragments that fail to demux as a gap (when alternate levels exist) so playback advances instead; with a single level the error is left to escalate to fatal after retries.

* refactor: extract named booleans in gap guard for readability

* Gap-skip only behind the live edge so last-fragment errors escalate to fatal

---------

Authored-by: 배홍준[Media Player Tech] <hongjun.bae@navercorp.com>
…en `autoStartLoad` is `false`

Fix start on jagged audio/video segment boundaries before interstitial break
…7905)

* Support EXT-X-MEDIA-SEQUENCE declaration after EXT-X-SKIP

* Use prevFrag to detect a Media Segment preceding EXT-X-MEDIA-SEQUENCE

---------

Authored-by: 배홍준[Media Player Tech] <hongjun.bae@navercorp.com>
…r-149.x

Update dependency chromedriver to v149.0.1
renovate Bot and others added 25 commits June 22, 2026 07:02
…r-149.x

Update dependency chromedriver to v149.0.3
…ore-vulnerability

Update dependency @babel/core to v7.29.6 [SECURITY]
…r-149.x

Update dependency chromedriver to v149.0.4
* Fix remuxing of encrypted I-Frame segments
* Use end-of-stream to force rendering of appended I-Frame
Fixes regression introduced in dev with video-dev#7522 that only loaded current and next subtitle segment
* Fix midroll buffering and playback progression from preroll at live edge
Fixes video-dev#7912

* Fix live midroll interstitial resumption (low-latency and short primary breaks)
video-dev#7912

* Fix appendInPlace stall handling
video-dev#7912

* Replace `advanceInPlace` with `hls.startLoad`

* Fix live midroll interstitial resumption (low-latency and short primary breaks)
- Ensure seek to start on midroll join
- Prevent lastCurrentTime > startPosition lock-in before segments are parsed
- Improve live primary resumption estimate at end of interstitial playback
Resolves video-dev#7912
)

* docs: add Streamfizz to "They use HLS.js in production!"

Streamfizz (https://streamfizz.fr) is a French B2B video platform that
uses hls.js in production for HLS playback in its video player.

---------

Authored-by: Geoffrey Signorato <geoffrey.signorato@webcastor.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants