Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendition report is not used when switching #3572

Closed
4 of 5 tasks
kanongil opened this issue Mar 5, 2021 · 3 comments · Fixed by #5124
Closed
4 of 5 tasks

Rendition report is not used when switching #3572

kanongil opened this issue Mar 5, 2021 · 3 comments · Fixed by #5124

Comments

@kanongil
Copy link
Contributor

kanongil commented Mar 5, 2021

The feature in #3125 does not seems to work.

What version of Hls.js are you using?

master / c5698be.

What browser and OS are you using?

macOS Chrome

Test stream:

https://stream.sob.m-dn.net/live/sb1-ll/index.m3u8

Checklist

  • The stream has correct Access-Control-Allow-Origin headers (CORS)
  • There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

  1. Play the stream.
  2. Change the level.

Expected behavior

Request the new level playlist using blocking playlist request using the msn and part info from the rendition report.

Actual behavior

Request the new level playlist without msn & part params, followed by another request with msn & part.

@robwalch
Copy link
Collaborator

robwalch commented Mar 5, 2021

Please provide more details on how you are changing the level.

Rendition reports are only used when these conditions are met:

  • the other level has never loaded
  • the current playlist response was from a blocking playlist request

Have a look at switchParams in the source and when testing.

@robwalch robwalch added the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Mar 5, 2021
@kanongil
Copy link
Contributor Author

kanongil commented Mar 6, 2021

It appears that this is because it fails to actually match the URI here:

if (uri === playlistUri.substr(-uri.length)) {

The current logic only works if the media playlists are all in the same url location, or are absolute urls.

Eg. it fails for the stream I linked, where it can contain reports like these:

#EXT-X-RENDITION-REPORT:URI="../vNG7t017KgCd93d8y3HxGjR/stream.m3u8",LAST-MSN=329899,LAST-PART=2
#EXT-X-RENDITION-REPORT:URI="../v2-2y65rygQ0kZW3a5-WWyJ/stream.m3u8",LAST-MSN=329899,LAST-PART=2
#EXT-X-RENDITION-REPORT:URI="../vwj1H8QkVzPcbycrRtI1EJw/stream.m3u8",LAST-MSN=329899,LAST-PART=2
#EXT-X-RENDITION-REPORT:URI="../vL2LFCVuQXAXxUgh4c12Ilh/stream.m3u8",LAST-MSN=329899,LAST-PART=2
#EXT-X-RENDITION-REPORT:URI="../v8Ew9fFqC0AEwfHoR5PS1cF/stream.m3u8",LAST-MSN=329899,LAST-PART=2

@kanongil
Copy link
Contributor Author

kanongil commented Mar 6, 2021

This actually uncovers another issue, which is that hls.js just ignores the apparently missing report, and trudges ahead anyway. I would expect some kind of warning / error, and possibly a downgrade to non-low-latency streaming.

After all, valid rendition reports are a required component of low-latency streams: https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#appendix-B.1

Each Media Playlist contains one EXT-X-RENDITION-REPORT tag for
each Media Playlist (Rendition) in the Master Playlist, except for
the Media Playlist to which the EXT-X-RENDITION-REPORT tag is
being added, and Playlists that contain the EXT-X-I-FRAMES-ONLY
tag.

@robwalch robwalch added Bug Confirmed and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Dec 21, 2022
@robwalch robwalch modified the milestones: 1.5.0, 1.3.0 Dec 21, 2022
robwalch added a commit that referenced this issue Dec 21, 2022
robwalch added a commit that referenced this issue Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants