Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
171
rated 0 times [  172] [ 1]  / answers: 1 / hits: 21001  / 7 Years ago, thu, february 16, 2017, 12:00:00

I need to make a facebook video embed responsive, since facebook has a fixed size, however it does not adapt to the size of the screen.



When I put auto in the width of facebook, depending on the video it leaves the height much larger than normal, as shown below (leaves the height at 1100, being normal of it is 770)



https://developers.facebook.com/docs/plugins/embedded-video-player/?prefill_href=https%3A%2F%2Fwww.facebook.com%2Frobertdowneyjr%2Fvideos%2F665148873653581%2F#configurator



Because multiple videos of different sizes will be included, it is not possible to leave a fixed size on some external div.


More From » html

 Answers
10

Now Facebook supports responsive video embed



<script async defer src=https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2></script>
<div class=fb-video
data-href=https://www.facebook.com/watch/?v=10155278547321729
data-width=auto
data-show-captions=false>
</div>



[#58919] Tuesday, February 14, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
keana

Total Points: 452
Total Questions: 97
Total Answers: 81

Location: Barbados
Member since Sun, Nov 27, 2022
1 Year ago
;