New Landing How can we help? Themeforest Theme Support Joyn Vimeo embed fullscreen button missing

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Joyn
  • #258857
    simondm
    Member
    Post count: 9

    When I add a video from Vimeo as a portfolio item in Joyn, the fullscreen button doesn’t appear. I’ve activated it in the embeds settings on vimeo.
    I’ve searched the forum here but nothing worked for me, also found this on vimeo’s forums: https://vimeo.com/forums/help/topic:277610

    Any idea why it won’t appear? I’ve checked the JS code and these 3 elements are present: webkitallowfullscreen mozallowfullscreen allowfullscreen

    Is there a simple way to solve this? Any custom JS to add in the theme options?

    Thanks

    #258885
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    
    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>';
    }
    }

    Thanks
    Mohammad

    #258997
    simondm
    Member
    Post count: 9

    Awesome, thanks Mohammad!

    #259008
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Glad 🙂 to help you.
    Thanks
    Mohammad

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

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

License required for one of the following items
Login and Registration Log in · Register