New Landing How can we help? Themeforest Theme Support Uplift Play fullscreen video button not working correctly

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Uplift
  • #286396
    mhote
    Member
    Post count: 394

    Can’t figure out why the fullscreen video play button isn’t working on homepage (above fold)

    It shows an error with the image and won’t play the video ‘playback error’

    Current code is below and login provided:

    [sf_fullscreenvideo type=“icon-button” btntext=“” imageurl=“www.youtube.com/watch?v=gpjGuMf_GPg” videourl=“www.youtube.com/watch?v=gpjGuMf_GPg” extraclass=“”]

    #286397
    David Martin – Support
    Moderator
    Post count: 20834

    Test this, all your quote marks were wrong: [sf_fullscreenvideo type="icon-button" btntext="" imageurl="www.youtube.com/watch?v=gpjGuMf_GPg" videourl="www.youtube.com/watch?v=gpjGuMf_GPg" extraclass=""]

    #286450
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #286497
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

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

    add_filter( 'sf_youtube_embed_params', '?showinfo=0&controls=1&modestbranding=1&rel=0' );

    Thanks
    Mohammad

    #286501
    mhote
    Member
    Post count: 394
    This reply has been marked as private.
    #286513
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code:-

     function sf_video_youtube( $url, $width = 640, $height = 480 ) {
                preg_match( '/[\\?\\&]v=([^\\?\\&]+)/', $url, $video_id );
                $youtube_params = apply_filters( 'sf_youtube_embed_params', '?showinfo=0&controls=1&modestbranding=1&rel=0' );
    
                $video_padding = ( intval( $height, 10 ) / intval( $width, 10 ) ) * 100;
                $inline_style  = 'padding-bottom: ' . $video_padding . '%;';
    
                if ( is_ssl() ) {
                    return '<div class="sf-video-wrap" style="' . $inline_style . '"><iframe itemprop="video" class="video-embed" src="https://www.youtube.com/embed/' . $video_id[1] . $youtube_params . '" width="' . $width . '" height="' . $height . '" allowfullscreen></iframe></div>';
                } else {
                    return '<div class="sf-video-wrap" style="' . $inline_style . '"><iframe itemprop="video" class="video-embed" src="http://www.youtube.com/embed/' . $video_id[1] . $youtube_params . '" width="' . $width . '" height="' . $height . '" allowfullscreen></iframe></div>';
                }
            }

    Thanks
    Mohammad

    #287351
    mhote
    Member
    Post count: 394

    Hello,
    After adding the above code at child theme’s funcitons.php file, the whole website goes blank. I juse see white page. Please check this.

    #287355
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Just roll back the changes and install WPIDE plugin to inspect.
    Thanks
    Mohammad

    #288769
    mhote
    Member
    Post count: 394

    resolved

    #288793
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Glad 🙂 to help you.
    Thanks
    Mohammad

Viewing 10 posts - 1 through 10 (of 10 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