-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Facebook videos not fitting properly in the container #1071
Comments
I'm also experiencing this issue. Here's another video that's problematic: https://www.facebook.com/JenniferGarner/videos/537638620452807/ |
Looks like unless you pass in a pixel value to I'm going to add config={{
facebook: {
attributes: {
'data-width': '320px',
'data-height': '180px'
}
}
}} to pin the size of the video when it is loaded by the FB SDK. I think using these attributes means players can no longer be responsive, but it's the best we can do. |
Thanks @cookpete for this fix. will test it out once. |
Is there something to make it responsive I've tried 'data-width': '100%', 'data-height': '100%' but that doesn't seem to work. Anyone an idea? |
How does the linked commit resolve this? |
Current Behavior
While trying to play Facebook Video, in a modal using react-player, it's not taking the given height of the modal and sometimes based on video either overflows or is of less width resulting in non-uniform layout. The issue i think its because of the aspect-ratio maybe in which the Facebook returns iframe.
Rest all videos from youtube, Vimeo seems to be fitting properly taking the given height and width.
Expected Behavior
I want the video to fit in the given space in modal similar to how it happens on the facebook page.
Steps to Reproduce
I have created the sandbox for it where it can be tested.
url
in this object inNewVideoModal.js
filefor 1st URL i.e youtube , it works fine, i need it to be similar for facebook links also.
for 2nd and 3rd URL from the
testUrls
array, you can see the issue. for 2nd URL the video overflow and controls are hidden. for 3rd URL the video is of lesser height than the container so extra padding at bottom can be seen.Environment
"https://www.facebook.com/airmeetcom/videos/565343767721490/"
The text was updated successfully, but these errors were encountered: