-
Notifications
You must be signed in to change notification settings - Fork 43
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 aspect ratio video box size in Safari #1383
Conversation
This pull request is deployed at test.editor.opencast.org/1383/2024-06-10_08-46-54/ . |
Well, good to know that more than 2 videos are also supported, let me fix that. |
This pull request is deployed at test.editor.opencast.org/1383/2024-06-10_11-02-10/ . |
This pull request is deployed at test.editor.opencast.org/1383/2024-06-10_11-08-43/ . |
Late to the game, but this works for me, Safari shows the same size Chrome and Firefox display. Thanks, Farbod! |
Great, with my pleasure. |
This PR fixes #1382
Problem
The problem is simply the lack of support in Safari that it could not recognize and allocate height based on aspect ratio.
The reason behind it, is because Safari support for aspect ratio was introduced in v15, and it is far behind the other browsers.
Solution
In order to tackle that, this PR just introduces a wrapper around the React video player, by allowing it to have the height of 100% set for each video! That means now the height is not more a burden on browser to calculate based on aspect ratio!
The wrapper on the other hand is responsible to occupy the width and height designed for this section and let the video just take up the space it needs!
NOTE: it not only works for dual video, but the single video is covered too!
To test