dash.js
dash.js copied to clipboard
Manual quality index is not respected when switching period
Environment
- [X] The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/
- [X] The stream has correct Access-Control-Allow-Origin headers (CORS)
- [X] There are no network errors such as 404s in the browser console when trying to play the stream
- [x] The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ
- [X] The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: Provided privately due to DRM restrictions.
- Dash.js version: v4.7.0
- Browser name/version: Potentially any MSE compliant browser but tested on latest Chrome.
- OS name/version: macOS
Steps to reproduce
- Disable ABR.
- Load a multi period asset and manually set a
qualityIndex
fromplayer.getBitrateInfoListFor('video')
for the lowest bitrate (412x232 in my tests) - Wait until the next period starts playback, the
qualityIndex
now received fromplayer.getQualityFor('video')
is back at the highest bitrate (1920x1080 in my tests).
Observed behavior
See above.
Expected behavior
Player should respect a previously, manually set, qualityIndex
when moving from one period to another. Ideally, if no exact match can be found (by bitrate or resolution I suppose), a period could start a different representation matching the closest.
Notes from a discussion with @dsilhavy: the throughput is checked again before selecting the quality for the new period. Instead we should select a similar quality to the one from the previous period.
Reworked ABR logic in v5, should be tested against https://reference.dashif.org/dash.js/v5/samples/dash-if-reference-player/index.html
This was addressed in #4544