When playing a video in a loop, the video resolution keep changing
What version of Hls.js are you using?
1.5.13
What browser (including version) are you using?
Brave (Windows and Android), Chrome (Windows and Android)
What OS (including version) are you using?
Windows and Android
Test stream
No response
Configuration
{
capLevelOnFPSDrop: true
}
Additional player setup steps
No response
Checklist
- [X] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
- [X] The issue occurs in the stable client (latest release) on https://hlsjs.video-dev.org/demo and not just on my page
- [X] The issue occurs in the latest client (main branch) on https://hlsjs-dev.video-dev.org/demo and not just on my page
- [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
Steps to reproduce
- Select
FDR - CDN packaged, 4s segments, 180p - 1080pfrom the videos select box in the demo page (any of them) - Set the "loop" attribute on the video to "true" (I wrote this in the console:
document.getElementsByTagName("video")[0].loop = true;) - Add a resize event on the video:
document.getElementsByTagName("video")[0].addEventListener("resize", (e) => { console.log(e, e.target.videoWidth, e.target.videoHeight) });
Expected behaviour
The video starts at 640 x 360, it adapts to 1920 x 1080 and when it starts over because of loop=true it should start again at 1920 x 1080
What actually happened?
Each iteration the video starts at 640x360 and then jumps at 1920 x 1080
Console output
Not sure what you want here :(
Chrome media internals output
No response
A side note, I couldn't reproduce this issue with the first video in the list, the big buck bunny. On my project, the issue reproduces also on Safari iOS, where I am not using hls.js since streaming is natively supported.
Duplicates #4553
- #4553
Thank you, I haven't found this issue at search. I will try to flush backbuffer. However, I wonder why I can reproduce with the second video and not with the first one.