Player: Stream Quality panel (redesign of the Statistics popup)#1323
Player: Stream Quality panel (redesign of the Statistics popup)#1323AKnassa wants to merge 1 commit into
Conversation
Botsy
left a comment
There was a problem hiding this comment.
I reviewed and tested the changes. Overall, a clean, well-tested PR. Good call reframing raw numbers into a plain-language verdict. Pure logic extracted into streamQuality.js with solid edge-case test coverage; units consistent; conventions followed. 👍
A few non-blocking notes:
-
Cast path reads "Poor" for healthy streams. On the Chromecast sender path
bufferedisnull(vs ms on the HTML path), sobufferAheadreturns0and cast torrents score near-zero on buffer regardless of health. Regression from the old panel. Handle null-buffer or note cast as out of scope. -
keepingUp === nullscored as "not keeping up." Untildurationis known (and for live streams),keepingUpisnull, andkeepingUp ? 20 : 0docks 20 points at the moment the panel opens — healthy streams can transiently read Fair/Poor. Noted as a follow-up; flagging since it hits the primary case. -
Minor:
onCopyInfoHashdeps are[infoHash]only — missingt/toast(stale translation on mid-stream language switch; likely tripsexhaustive-deps). -
Translations: the inline
defaultValuestrings are fine as a stopgap, but we'd expect the newPLAYER_QUALITY_*/PLAYER_SIGNAL_*keys to land in a matching PR on the stremio-translations repo before merge.
Thank you for contributing!
Grade Good/Fair/Poor only when buffer runway or download-vs-bitrate is measurable; when neither is (Chromecast emits buffered null, live/unknown duration makes keepingUp null), show a neutral "Limited" state instead of scoring on peer count alone. Peers is swarm connectivity, not proof of smooth playback, so peers-only no longer yields a false Good or false Poor. - bufferAhead returns null (not 0) for non-finite input, so "unavailable" is distinct from a real zero-second buffer. - Reword verdicts to describe playback outcome, not the buffer, so the headline never contradicts a "Buffer: Not available" row on cast/live. - Fix onCopyInfoHash deps to [infoHash, t, toast] (was [infoHash]) to avoid a stale-language copy toast after a mid-stream language switch. Addresses review feedback on Stremio#1323.
kKaskak
left a comment
There was a problem hiding this comment.
- Remove tests/streamQuality.spec.js; new tests are prohibited by repo guidance.
- Replace the arbitrary quality score with objective playback signals, or document product-approved thresholds.
- Account for playback speed when calculating buffer runway and required download speed.
- Show Limited when real player buffer data is unavailable; avoid promises like “will not buffer.”
- Add all strings to stremio-translations, bump the dependency when pr merged, and remove inline English fallbacks.
- Make the new helper TypeScript and remove unrelated/refactored code.
Remove or split the info-hash copy feature into a separate PR. - Squash into concise commits without commit bodies and shorten the PR description.
- Verify web, desktop shell, Chromecast, cached/fresh torrents, multiple playback speeds, and non-English UI.
|
also for reference we have added a simple contribution guide |
7d2eb07 to
8d386fc
Compare
What this does
Replaces the in-player Statistics popup with a Stream Quality panel that answers "will this play smoothly" in plain language.
What changed
How to see it
Play a torrent stream, then open the panel from the network icon in the control bar. Try a fresh stream, a healthy stream, and a fully-cached title.
Notes for reviewers
New user-facing strings are added inline as
t('KEY', { defaultValue: '...' }). Here are the new keys that need adding to stremio-translations — I'm happy to open the matching PR there:One deliberate design choice worth calling out: the meter fills to 99% for a perfectly streaming title and only reaches 100% for a fully-downloaded (cached) one, to keep those two states visually distinct.