flashls icon indicating copy to clipboard operation
flashls copied to clipboard

When I seek to just before the end, PLAYBACK_COMPLETE event does not fire

Open zawao opened this issue 10 years ago • 16 comments

I seek to just before the end of the video. And the video is completed. However, PLAYBACK_COMPLETE event does not fire. Playback state stops at PLAYING_BUFFERING.

This problem occurs in the sample player. http://www.flashls.org/latest/examples/chromeless/

image

zawao avatar Jan 14 '16 03:01 zawao

Mangui, we're seeing this as well when we upgraded to 0.4.4.16. Our automated tests started failing on several of our test medias.

There appears to be a strange hitch at the end of the media that we've never noticed before. We get a series of MediaPlayerStateChange events: buffering, playing, ready, then the PLAYBACK_COMPLETE event is fired directly.

The issue is that sometimes (it seems to be when the last fragment isn't cached?) the state gets stuck on buffering and never recovers. I put in a timer to close things down when it stalls, but I'm hoping that's temporary.

Here's some of the media we're seeing the "hitch" on:

http://delivery.support.theplatform.com/pdk_qa/PDK_(VMS)/928/739/Batman_v_Superman-Dawn_of_Justice-Comic-Con_Trailer[HD]_(720p).m3u8 http://delivery.support.theplatform.com/pdk_qa/PDK_AUTOMATION/ad_FIles/xml_dam_vast_pods_M3U_AUTO_WRAPPER.xml (you might want to turn the volume down for the last one. :))

Merci beaucoup,

Daniel Niland thePlatform

dtniland avatar Jan 22 '16 19:01 dtniland

We found the same issue, where playback gets stuck on buffering, could happen during seeks in the middle of the media. We had to roll back to our prior forked version.

dtniland avatar Jan 22 '16 22:01 dtniland

Hi Daniel. Will check on monday

mangui avatar Jan 23 '16 07:01 mangui

Hi @zawao I cannot reproduce on big buck bunny http://flashls.org/flashls-0.4.4.17/examples/chromeless

mangui avatar Jan 25 '16 10:01 mangui

Hi @mangui Steps to Reproduce 1.playback start 2.seek to 5 seconds before the playback end 3.change current level to 0 (240) 4.change current level to auto 5.playback end

When the playback is finished, it may to occur values of "current level" and "load level" are different? image

nozawa-gy avatar Jan 25 '16 10:01 nozawa-gy

ok I was able to reproduce similar issue with @dtniland stream. it should also be similar to the issue faced by @zawao and @nozawa-gy it happens when bandwidth significantly changes on last fragment loading. this could happen if prior loaded segments are cached but not latest one for example. current logic in Fragment Loader is that playback complete is triggered when trying to load a new fragment, but it was triggered only if flashls was not in PTS analysis state. in that case, playback complete was never triggered .. leading to flashls staying stuck on buffering state.

this logic is there since a while (does not look like a regression) @dtniland, just curious, which release were you using prior to v0.4.4.16 ?

mangui avatar Jan 25 '16 10:01 mangui

plz recheck with latest flashls/dev, and tell me how it behaves now

mangui avatar Jan 25 '16 10:01 mangui

@mangui we had been using a fork of 0.4.2.3 or so. I'll check it today.

Thanks for the quick fix!

dtniland avatar Jan 25 '16 16:01 dtniland

Unfortunately, it looks like there is still an issue. You have fixed the issue with the last fragment -- our tests no longer hang there. But, we're also seeing the same issue in the middle of the media. Our system dynamically inserts ads from the server by creating a discontinuity. We're seeing the buffer not returning when we seek to the exact spot of this continuity. Strangely, it is only an issue on Windows Chrome -- it could have something to do with caching?

Our system can only be accessed via a token that expires in seconds so it isn't possible to give you a link to the manifest directly. I'm attaching the manifest files as they've been downloaded by the browser and hopefully you can look at them to figure out what's going on.

In this particular media, we're seeking to 114.0 seconds. In OSMF, we get a MediaPlayerStateChange of buffering, then an onSeekChange with seeking = true, then we call play(). At that point the media never goes to the the playing state. ssa_1.m3u8.txt ssa_5.m3u8.txt ssa_main.m3u8.txt

If this isn't enough to know what's going on, let me know... we'll try to work something out.

Thanks!

dtniland

dtniland avatar Jan 25 '16 23:01 dtniland

Hi @dtniland if you could provide debug/debug2 logs, that might help. or if it is a VoD playlist, you can also mirror it and share it via PM

mangui avatar Jan 26 '16 11:01 mangui

Hi @mangui My problem is resolved in the latest version. http://flashls.org/flashls-0.4.4.18/examples/chromeless/

Thanks!

zawao avatar Jan 26 '16 11:01 zawao

@mangui We have a repro that you can hit.

In http://www.flashls.org/latest/examples/osmf/StrobeMediaPlayback.html go the js console and type in:

player.setMediaResourceURL("http://demo.theplatform.com/pdk/jeremy/PDK-12854/master.m3u8");

hit the play button then in the js console:

player.seek(114.0):

We have reproed the buffering message spinning forever.

dtniland avatar Jan 26 '16 19:01 dtniland

ok will check next week

mangui avatar Jan 29 '16 23:01 mangui

thanks, @mangui.

jlacivita avatar Feb 01 '16 17:02 jlacivita

@dtniland you can recheck with latest flashls/dev, issue should be fixed

mangui avatar Feb 01 '16 18:02 mangui

@mangui, your fix worked perfectly -- we're not seeing the issue any more.

Thanks!

dtniland avatar Feb 05 '16 22:02 dtniland