video-dev / video-dev/hls.js

Interstitial asset scheduling accuracy

Open
#7,468 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Interstitials Revisit-at-later-release-cycle
Dominant language
TypeScript
Stars
16.9k
Forks
2.8k
Avg merge
1d 12h
Merged PRs (30d)
27

Description

Is your feature request related to a problem? Please describe.

Scheduling interstitial assets loading and playing is currently triggered by the timeupdate event of the video element, which leads to inaccurate scheduling since timeupdate event is triggered at most every few hundred ms.

For scenario such as ad replacement accuracy is critical for user experience.

Describe the solution you'd like

A solution could be to rely on the requestVideoFrameCallback() API, if available, to be frame accurate.

If requestVideoFrameCallback() API is not available, a fallback solution could be to set a timer as we are getting close to the intersitial time, without waiting for next behindhand timeupdate event.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the interstitial asset scheduling path and its video element timeupdate listener. Compare requestVideoFrameCallback support with the proposed timer fallback near interstitial times; done means scheduling is frame-accurate where supported and remains accurate when the API is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.