Apply aspect ratio from video
See original GitHub issueRelated to #145: It would be nice if you could tell the player to use the native video aspect ratio.
Once the video is available, it seems that the readonly props videoHeight
and videoWidth
should be there, and then by measuring the ReactPlayer’s parent element dimensions, the <video>
can be sized, or for smooth responsiveness the padding-top
trick could be used to force a height if the width is a css-fixed value.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Quickly Change the Aspect Ratio of a Video (Easy Way)
To set an aspect ratio of your choice, simply click on the Custom Size button, enter the width and height of your video,...
Read more >How to Change the Aspect Ratio of your Videos for Free?
Step 1: Open Animotica · Step 2: Change Your Aspect Ratio · Step 3: Apply Fit/Fill · Step 4. Save.
Read more >Change aspect ratio of videos easily | Online and Fast - Flixier
Change the aspect ratio of your videos in a few clicks. Add videos to Flixier, set the project to your desired ratio and...
Read more >How to change the aspect ratio of a video | Clipchamp Blog
To change the aspect ratio of your entire video, click on the 16:9 aspect ratio button located under the export button.
Read more >7 Quick Ways to Change Video Aspect Ratio on Windows and ...
The fastest way to resize or change the aspect ratio of a video on Windows and Mac without losing quality is using VideoProc...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the quick reply! CSS is dark magic for me, but I got something working:
@jjperezaguinaga Yeah all React fiddles made from the old base fiddle (before
react@16
came along) are now broken, as they’ve changed how the files work. The old React base jsFiddle usedreact-with-addons.js
that now does not exist in v16.Here’s an updated fiddle (note how the
fileConfig
is no longer necessary since https://github.com/CookPete/react-player/commit/b59d251b1323d97d2494bc4a7fd65a12905a4ba5).