Skip to content

dash VOD in Firefox: loading animation appears on ended #1156

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

Closed
phloxic opened this issue Jul 2, 2021 · 6 comments · Fixed by videojs/video.js#7311
Closed

dash VOD in Firefox: loading animation appears on ended #1156

phloxic opened this issue Jul 2, 2021 · 6 comments · Fixed by videojs/video.js#7311

Comments

@phloxic
Copy link
Contributor

phloxic commented Jul 2, 2021

Description

When playing a VOD dash stream created by gpac in Firefox (on Mac, did not test other platforms) the loading spinner appears when the video ends.
Minimal sample page here using latest videojs 7.14.0

This happens with all profiles gpac offers.

Sources

Is a certain source or a certain segment affected? please provide a public (accessible over the internet) link to it below.
2 sample streams:
https://d12zt1n3pd4xhr.cloudfront.net/dev/lshtrailer-d2-nosub.mpd (full profile)
https://d12zt1n3pd4xhr.cloudfront.net/dev/lshtrailer-od-nosub.mpd (onDemand profile)

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. In Firefox go to sample page or try one of the streams on the test page
  2. Play or scrub until end
  3. Loading spinner appears

Results

Expected

The loading spinner should not appear on ended, the player should not be in waiting state then.

Error output

There is no error.

Additional Information

Dirty workaround:

player.on('ended', function () {
  player.removeClass('vjs-waiting');
})

videojs-http-streaming version

what version of videojs-http-streaming does this occur with?
all I tried up to videojs-http-streaming 2.9.1

videojs version

what version of videojs does this occur with?
tested latest over ca. year up to video.js 7.14.0

Browsers

what browsers are affected? please include browser and version for each

  • Firefox (Mac) tested over a long time, several versions up to 89.02.

Platforms

what platforms are affected? please include operating system and version or device and version for each

  • Mac OS X, tested over a long time, several versions up to 10.14.6.

Other Plugins

are any other videojs plugins being used on the page?

  • no

Other JavaScript

are you using any other javascript libraries or frameworks on the page?

  • no
@gkatsev
Copy link
Member

gkatsev commented Jul 2, 2021

Can confirm, weird. Wonder what the difference is.

@phloxic
Copy link
Contributor Author

phloxic commented Jul 3, 2021

Just tried one of the streams without audio: no problem.
I strongly suspect aac padding (my favorite evil ;-)); the audio track being slightly longer. The audio is AAC_HE, encoded by fdk, and it has relatively long delays. - vhs has no trouble with the HLS versions of the streams, at least not when they segmented by mediafilesegmenter.

FWIW, dash.js seems to be able to handle the ending of those streams, they also pass the dash-if conformance test.

@gkatsev
Copy link
Member

gkatsev commented Jul 3, 2021

I strongly suspect aac padding

oh-no

@phloxic
Copy link
Contributor Author

phloxic commented Jul 4, 2021

2 well-behaved examples with AAC_HEv1 encoded by afconvert ("iTunes" cli):

Well, that's me sorted ... until I turn a corner and bang my head against this yet again.

@gkatsev
Copy link
Member

gkatsev commented Jul 6, 2021

Looking at the order of events, the waiting event appears right before ended, so, I think having Video.js remove the spinner on ended makes sense.

@phloxic
Copy link
Contributor Author

phloxic commented Jul 6, 2021

Certainly the most solid way to divert any blame from videojs ;-) ... I'm actually serious, after I experimented some more, cue can of worms, brittleness etc. Whereas so far I don't see an issue when simply removing the vjs-waiting class on ended explicitly (famous last words).

gkatsev added a commit to videojs/video.js that referenced this issue Jul 6, 2021
If we've ended, there's no point in having the loading spinner. In
addition, there are cases where we get a waiting event immediately
before ended, and this works around that.

Fixes videojs/http-streaming#1156
gkatsev added a commit to videojs/video.js that referenced this issue Jul 6, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
If we've ended, there's no point in having the loading spinner. In
addition, there are cases where we get a waiting event immediately
before ended, and this works around that.

Fixes videojs/http-streaming#1156
edirub pushed a commit to edirub/video.js that referenced this issue Jun 8, 2023
If we've ended, there's no point in having the loading spinner. In
addition, there are cases where we get a waiting event immediately
before ended, and this works around that.

Fixes videojs/http-streaming#1156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants