Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

HLS video doesn't fire 'ended' event #111

Closed
saverchenkov opened this issue Jul 11, 2014 · 2 comments · Fixed by #114
Closed

HLS video doesn't fire 'ended' event #111

saverchenkov opened this issue Jul 11, 2014 · 2 comments · Fixed by #114

Comments

@saverchenkov
Copy link

Hi Guys,
I have a playlist with variable durations of each segment. Each segment's duration is reported in seconds to a 10th decimal point precision, but there is obviously a rounding error. When HLS plugin plays this movie it is not able to detect the end of the movie. Safari and iOS are both able to correctly play this playlist.

#EXTM3U
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:11
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.9,
video-hls-3500-0.ts
#EXTINF:9.9,
video-hls-3500-1.ts
#EXTINF:9.9,
video-hls-3500-2.ts
#EXTINF:9.9,
video-hls-3500-3.ts
#EXTINF:9.6,
video-hls-3500-4.ts
#EXTINF:9.7,
video-hls-3500-5.ts
#EXTINF:9.9,
video-hls-3500-6.ts
#EXTINF:9.8,
video-hls-3500-7.ts
#EXTINF:9.9,
video-hls-3500-8.ts
#EXTINF:7.7,
video-hls-3500-9.ts
#EXT-X-ENDLIST

https://s3-us-west-2.amazonaws.com/udropr-content-dev/user-0Sergey/test13/video-hls-3500/playlist-3500.m3u8

Thank you!

@thenewguy
Copy link

I am encountering this issue as well. Here is a sample playlist

#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXTINF:9.075744,
http://foo.bar/path/to/98d2a607938600000.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600001.ts
#EXTINF:9.009,
http://foo.bar/path/to/98d2a607938600002.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600003.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600004.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600005.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600006.ts
#EXTINF:9.009,
http://foo.bar/path/to/98d2a607938600007.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600008.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600009.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600010.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600011.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600012.ts
#EXTINF:9.009,
http://foo.bar/path/to/98d2a607938600013.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600014.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600015.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600016.ts
#EXTINF:9.009011,
http://foo.bar/path/to/98d2a607938600017.ts
#EXTINF:4.162367,
http://foo.bar/path/to/98d2a607938600018.ts
#EXT-X-ENDLIST

It is hosted locally right now so I shortened excessively long paths. If needed, I can post it somewhere. The playlist plays and ends correctly via videojs on my android phone (galaxy note 3). I get a loading spinner when playback stops on Chrome on my desktop.

dmlap added a commit that referenced this issue Jul 13, 2014
When the last segment in a playlist is appended, call endOfStream. There was an off-by-one error calculating when the final segment was delivered. Mock out endOfStream for test cases so exceptions aren't thrown. For #111. This commit stops the spinner from showing up when a video has finished but hitting play again to restart the video is not currently working.
@heff heff closed this as completed in #114 Jul 15, 2014
@cdhowie
Copy link

cdhowie commented Feb 15, 2016

This problem seems to have recurred in 1.3.5 (possibly prior versions) and still remains in 1.3.7. I will open a new issue referencing this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants