Support

Account

Home Forums Front-end Issues oEmbed Facebook video: data-width="0"

Solving

oEmbed Facebook video: data-width="0"

  • Using the oEmbed field with Facebook video, the backend fetches the data and displays the video in the module but when used on the front end, the video does not display. I think I’ve narrowed it down to the main div (.fb-video) picking up a value of “0” for the data-width attribute. Interestingly, when used in the default WYSIWYG editor, the oEmbed works and displays the video at the default width and height. Youtube, Vimeo and other oEmbed sources work as expected.

    Non-working example here -> http://moontidemedia.com/perseverance-and-play/

  • The first thing you should try is seeing if some other plugin is causing a conflict by deactivating them. If you can’t find a conflict then you should submit a new support ticket https://support.advancedcustomfields.com/new-ticket/

  • Just in case anyone else finds this:

    After some back and forth and testing with Elliot, the 5.5.8 release fixed this.

    One note about the responsive side of things, though. You have to set the embed width in the field settings to your desktop container width even with the responsive video wrapper code applied. Unlike other oEmbed sources, like Youtube, etc… that will go to 100% when the page loads when wrapped in the responsive styles no matter what width is specified in the settings, the Facebook embed requires the correct embed width, but once that is set the responsive styles will work for lower breakpoints.

  • hi in a post I create a video field with acf embed to embed a video from facebook but does not take me the full width of the container.

    code single.php

    <div class=”video-container”>
    <?php echo get_field(‘video_content’) ; ?>
    </div>

    css code

    .video-container {
    position: relative;
    padding-bottom: 45.25%; /* 16:9 */
    padding-top: 25px;
    height: 0;
    margin-bottom:20px;
    }
    .video-container iframe{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    }

    someone knows how to solve
    thank you

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘oEmbed Facebook video: data-width="0"’ is closed to new replies.