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
Detect ended stream based on #EXT-X-ENDLIST #2288
Comments
The const video = document.querySelector('video');
video.addEventListener('stalled', (event) => {
console.log('ended');
}); |
You can't rely on the 'stalled' event with MSE.
The 'ended' event on the media element should be triggered if we are calling endOfStream() on the MediaSource. Maybe this isn't happening currently.
On 27 Jun 2019, at 16:12, Tomohiro IKEDA <notifications@github.com<mailto:notifications@github.com>> wrote:
The HTMLVideoElement#stalled event is fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
const video = document.querySelector('video');
video.addEventListener('stalled', (event) => {
console.log('ended');
});
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#2288?email_source=notifications&email_token=AAY34WJK4HDMECPTOUE3BVDP4TDD7A5CNFSM4H32RS72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXH2YY#issuecomment-506363235>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAY34WNCK7Q32NO2Y5U2PVLP4TDD7ANCNFSM4H32RS7Q>.
|
Correct me,
|
I don't think it should be fired in the second case, but don't have a laptop to check at the moment
On 28 Jun 2019, at 04:39, Meirza Arson <notifications@github.com<mailto:notifications@github.com>> wrote:
Correct me, ended event produce 2 possibilities:
1. Video was over
2. data is not available (due to lack of connection)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#2288?email_source=notifications&email_token=AAY34WJ6XI536RNMQHVD6EDP4V2VHA5CNFSM4H32RS72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYY4LIQ#issuecomment-506578338>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAY34WPL7JN5ZLPRYSGZKJDP4V2VHANCNFSM4H32RS7Q>.
|
I think you're right @tjenkinson . So i made script below:
I tested the video running m3u8 with Thanks for the discussion @tjenkinson @Korilakkuma. |
We have an |
Hi @moonbrv, The latest release includes some changes that should have improved handling of Please file a new Bug Report as this issue was closed over a year ago. Please include all the details required to reproduce your issue - hlsjs config, stream properties, etc... ( I have a guess that if your playlist update that adds EXT-X-ENDLIST does not also add a new segment, then EOS is never added because all appending was done in LIVE mode rather than VOD mode. That might not be the problem but something we can look into as part of a new issue. ) |
What do you want to do with Hls.js?
Detect if the stream has been ended based on #EXT-X-ENDLIST in m3u8 file
What have you tried so far?
I've been output all Events with console, but there are no Events fired when the stream has ended.
The text was updated successfully, but these errors were encountered: