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

ENDED event is not raised on live stream, even though #EXT-X-ENDLIST arrived and no more manifests #5777

Closed
5 tasks done
MosheMaorKaltura opened this issue Aug 29, 2023 · 3 comments · Fixed by #5778
Closed
5 tasks done
Labels
Bug Confirmed Bug report confirmed or reproduced.

Comments

@MosheMaorKaltura
Copy link

MosheMaorKaltura commented Aug 29, 2023

What version of Hls.js are you using?

1.3.5

What browser (including version) are you using?

Chrome Version 115.0.5790.170 (Official Build) (x86_64)

What OS (including version) are you using?

MacOs Ventura 13.2.1

Test stream

https://codepen.io/Semarche/full/NWeKjYE

Configuration

{}
//No special config

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Open https://codepen.io/Semarche/full/NWeKjYE on you browser
  2. Wait for live streaming to start (it start every 3 minutes and plays for 90 seconds)
  3. When no more manifests and "#EXT-X-ENDLIST" is returned in the last manifest, video will show an endless spinner
    Notice that the emitted events are monitored below.

Expected behaviour

ENDED event should be emitted.

It worked as expected up until HLSJS version 1.3.0, from that version the event is not being raised.

What actually happened?

Last event emitted is BUFFERING

Console output

None special

Chrome media internals output

No response

@MosheMaorKaltura MosheMaorKaltura added Bug Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Aug 29, 2023
@robwalch
Copy link
Collaborator

Can the issue be reproduced with the dev and or latest version of HLS.js standalone without kaltura player?

@robwalch robwalch added Confirmed Bug report confirmed or reproduced. and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Aug 29, 2023
@robwalch
Copy link
Collaborator

robwalch commented Aug 29, 2023

Hi @MosheMaorKaltura,

The issue is that your live playlist adds the endlist without adding a new segment. HLS.js only recognizes the end list when it is added with the last segment, not after:

Second to last update:

#EXTINF:10.520,
seg-115464510-s32.ts?...

Last update adds ENDLIST only. As it doesn't contain a new segment, end list is not tracked:

#EXTINF:10.520,
seg-115464510-s32.ts?...
#EXT-X-ENDLIST

HLS.js logs no changes before stall error

[log] > [level-controller]: live playlist 0 MISSED

@robwalch
Copy link
Collaborator

It's perfectly valid to update the playlist with an end list tag so I came up with a fix.

Please take a look at #5778 and let me know if you or anyone else at Kaltura can review the PR. This fix will go in v1.5.0.

If you need a patch please open a PR against the "patch/v1.4.x" branch.

semarche-kaltura pushed a commit to semarche-kaltura/hls.js that referenced this issue Aug 31, 2023
semarche-kaltura pushed a commit to semarche-kaltura/hls.js that referenced this issue Aug 31, 2023
robwalch added a commit that referenced this issue Aug 31, 2023
* Handle #EXT-X-ENDLIST appended to live playlist without new segment
* Update segment in fragment tracker when the last fragment gets `endList` added
* Do not modify old fragment reference
Fixes #5777

---------

Co-authored-by: Rob Walch <robwalch@users.noreply.github.com>
Co-authored-by: Sergey Marchenko <sergey.dnepro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed Bug report confirmed or reproduced.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants