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

fix(player): Ensure fluid works when dimensions not initially known #7023

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

mister-ben
Copy link
Contributor

Description

The video dimensions aren't necessarily known at loadedmetadata particularly with native playback on iOS. In fluid mode, the player defaults to 16:9 and does not update once the dimensions are known.

Specific Changes proposed

  • Updates player styles on resize events.
  • Fixes arguments passed to addEventedCallback so the callbacks are executed.

Fixes #6939

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

@gkatsev
Copy link
Member

gkatsev commented Jan 6, 2021

Would this cause the player to resize on rendition changes on Safari during normal playback?

@gkatsev
Copy link
Member

gkatsev commented Jan 6, 2021

Seems like it's fine?

@mister-ben
Copy link
Contributor Author

Renditions should all have the same aspect ratio.

@gkatsev
Copy link
Member

gkatsev commented Jan 6, 2021

Yeah, that's true. It's definitely legal, and I've seen one stream that does it, though, probably something we can ignore.
I was thinking that it would resize it based on the video width and height but yeah, it shouldn't.

@gkatsev gkatsev merged commit 661962c into videojs:main Jan 6, 2021
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
…ideojs#7023)

The video dimensions aren't necessarily known at loadedmetadata particularly with native playback on iOS. In fluid mode, the player defaults to 16:9 and does not update once the dimensions are known.

- Updates player styles on resize events.
- Fixes arguments passed to addEventedCallback so the callbacks are executed.

Fixes videojs#6939
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 this pull request may close these issues.

Fluid mode is not working for HLS videos on mobile Chrome, Safari
2 participants