Log in to support

Vimeo Fullscreen Embed Code Not Working

Landing Forums Themeforest Theme Support Uplift Vimeo Fullscreen Embed Code Not Working

This topic contains 12 replies, has 4 voices, and was last updated by  Taffy 4 months.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Posted in: Uplift
  • Post count: 45
    October 25, 2016 at 5:22 am #298469

    Hello Guys, I have this problem where I need to embed a vimeo video, but I can't get the fullscreen option to show up even though I already added this chunk of code to my functions.php. Any ideas on what I'm doing wrong?

    /* Vimeo Fullscreen Code
    ================================================== */
    function sf_video_vimeo( $url, $width = 640, $height = 480 ) {
    $url = str_replace( 'https://', 'http://', $url );
    $video_id = sf_get_vimeoid( $url );
    $vimeo_params = apply_filters( 'sf_vimeo_embed_params', '?title=0&byline=0&portrait=0' );

    $video_padding = ( intval( $height, 10 ) / intval( $width, 10 ) ) * 100;
    $inline_style = 'padding-bottom: ' . $video_padding . '%;';

    if ( $video_id == "" ) {
    return '<div class="sf-video-wrap">' . __( "Video not found", "swiftframework" ) . '</div>';
    }

    if ( is_ssl() ) {
    return '<div class="sf-video-wrap" style="' . $inline_style . '"><iframe itemprop="video" class="video-embed" src="https://player.vimeo.com/video/' . $video_id . $vimeo_params . '" width="' . $width . '" height="' . $height . '" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>';
    } else {
    return '<div class="sf-video-wrap" style="' . $inline_style . '"><iframe itemprop="video" class="video-embed" src="http://player.vimeo.com/video/' . $video_id . $vimeo_params . '" width="' . $width . '" height="' . $height . '" webkitallowfullscreen mozallowfullscreen allowfullscreen ></iframe></div>';
    }
    }

    Attachments:
    You must be logged in to view attached files.
    Post count: 20834
    October 26, 2016 at 8:32 am #298706

    Replies only viewable for logged in users

    Post count: 45
    October 26, 2016 at 3:48 pm #298829
    This reply has been marked as private.
    Post count: 45
    October 26, 2016 at 3:49 pm #298830

    Replies only viewable for logged in users

    Post count: 20834
    October 27, 2016 at 5:31 pm #299180
    This reply has been marked as private.
    Post count: 45
    October 27, 2016 at 5:49 pm #299190

    Replies only viewable for logged in users

    Attachments:
    You must be logged in to view attached files.
    Post count: 20834
    October 28, 2016 at 10:55 am #299298

    Replies only viewable for logged in users

    Post count: 45
    October 28, 2016 at 2:28 pm #299395

    Replies only viewable for logged in users

    Post count: 20834
    October 28, 2016 at 3:34 pm #299401

    Replies only viewable for logged in users

    Post count: 45
    November 28, 2016 at 6:33 pm #304035

    Replies only viewable for logged in users

    Post count: 20834
    November 29, 2016 at 6:37 pm #304277

    Replies only viewable for logged in users

    Post count: 15264
    November 29, 2016 at 7:48 pm #304307

    Replies only viewable for logged in users

    Post count: 261
    January 17, 2018 at 4:41 am #331545

    Replies only viewable for logged in users

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register