• I m Using Oceanwp Theme Maria Template On My WordPress Website I Using A Custom Plugin to Embed Video Of Facebook & YouTube

    Here Is the Code Of Plugin I m using to Embed video of FB & YouTube but Videos Of Facebook are being displayed In different irregular sizes and videos of YouTube are being Displayed in Standard Size for both desktop & mobile Version

    // Check which platform's video URL is found
    
    if (!empty($facebook_matches)) {
    // Facebook embed logic
    $video_code = $facebook_matches[1];
    $embed_code = '<iframe src="https://www.facebook.com/plugins/video.php?height=500&href=https%3A%2F%2Fwww.facebook.com%2Fmusichd.net%2Fvideos%2F' . esc_html($video_code) . '%2F&show_text=false&width=600" width="600" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>'; } 
    elseif (!empty($youtube_matches)) {
            // YouTube embed logic
            $video_code = $youtube_matches[1];
    $embed_code = '<iframe width="600" height="600" src="https://www.youtube.com/embed/' . esc_html($video_code) . '" frameborder="0" allowfullscreen></iframe>';
        }
    Here

    This Might not be Theme Related Issue but iframe Is being created of same size still videos of Facebook are of different sizes leaving a blank between frame and next content below it

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello @pank6119,
    Thank you for reaching out,

    Please get in touch with your third-party plugin author.
    Maybe they have a solution that we are not aware of.

    Best Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Can’t I Get Standard Size for Facebook Embeded Video Iframe’ is closed to new replies.