Use part duration instead of fragment duration to set start point in lowlatency mode.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
Research direction
Start by locating the targetLatency getter and the levelDetails fields shown in the issue, then trace how low-latency playlists calculate their playback start point. Confirm the RFC behavior and check the relevant low-latency tests; the work is done when the fallback calculation uses partTarget when available and retains targetduration otherwise.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
In Low-Latency mode, when there is no HOLD-BACK or PART-HOLD-BACK in playlist, hls.js will use liveSyncDurationCount * targetduration to set the start point of playback. Will it be better to use part tartget duration to compute this value, so that we can get a lower latency? And this seems to be the same way described in rfc PART-HOLD-BACK part.
Describe the solution you'd like
change:
get targetLatency(): number | null {
// ...
const { holdBack, partHoldBack, targetduration } = levelDetails;
// ....
if (
userConfig.liveSyncDuration ||
userConfig.liveSyncDurationCount ||
targetLatency === 0
) {
targetLatency =
liveSyncDuration !== undefined
? liveSyncDuration
: liveSyncDurationCount * targetduration;
}
// ...
);
}
to:
get targetLatency(): number | null {
// ...
const { holdBack, partHoldBack, partTarget, targetduration } = levelDetails;
// ....
if (
userConfig.liveSyncDuration ||
userConfig.liveSyncDurationCount ||
targetLatency === 0
) {
targetLatency =
liveSyncDuration !== undefined
? liveSyncDuration
: liveSyncDurationCount * (partTarget || targetduration);
}
// ...
);
}
Additional context
No response
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 2.8k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 27
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from video-dev/hls.js
-
Bug metadata Need sample stream Needs Triage
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
Bug Need info Needs Triage
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
cannot reproduce Need info Question
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Bug Needs Triage
Difficulty 4/5 3-5 days Newbie friendliness 55/100
All issues in video-dev/hls.js
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·