New Landing How can we help? Themeforest Theme Support Dante Vimeo error: "The embed code for this video is not valid."

Tagged: , ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Dante
  • #240113
    killit
    Member
    Post count: 5

    I am trying to embed this video, https://vimeo.com/150697730, into my site portfolio at http://www.killitstudios.com/?portfolio=doritos. However, I get the error, “The embed code for this video is not valid.”

    I have tried changing the Detail Media Options as suggested in this forum post, http://www.swiftideas.com/forums/topic/undefined-vimeo-error-warning/, but that did not work.

    Any ideas what I can do to get Vimeo videos displaying in my portfolio?

    thanks!

    #240163
    killit
    Member
    Post count: 5

    So I have looked at the source code and it appears that the vimeo video ID has been stripped out.

    Although I entered the complete URL in WP back end (https://vimeo.com/150697730/), the code does not include the video ID number: <iframe itemprop=”video” src=”http://player.vimeo.com/video/?title=0&byline=0&portrait=0?wmode=transparent&#8221; width=”2000″ height=”800″>

    Not sure why this would be or how to fix. Thanks for your help.

    #240334
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try to insert the video url with HTTP just like http://vimeo.com/150697730. Hope it should help to you.
    Thanks
    Mohammad

    #240447
    killit
    Member
    Post count: 5

    Thanks, just tried that, with http://vimeo.com/150697730/ in both thumbnail options fields and in Detail Media with video chosen as the post detail type. Also tried “none” in detail media options.

    Still showing an error, and stripping the video id from the code:
    <iframe itemprop=”video” src=”http://player.vimeo.com/video/?title=0&byline=0&portrait=0?wmode=transparent&#8221; width=”2000″ height=”800″></iframe></div>

    I appreciate your help.

    #240450
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    The author of the video has disabled embeds. Click the share icon and test using the embed code: https://vimeo.com/150697730

    Thanks.

    #240948
    killit
    Member
    Post count: 5

    Thanks David, I am the author of the video and embeds are enabled. I have tried both with anyone allowing embeds, and also with killitstudios.com specifically named as the allowed embed site.

    The https://vimeo.com/150697730 is the URL I had originally embedded and reported the error on, and it does not work. Mohammed, above, suggested trying the link with just http:. I did that and get the same error.

    I just tried it again, after changing the Vimeo embeddding options back to allow anyone and get the same errror. The Vimeo ID is still being stripped out in the code:
    <div class=”sf-video-wrap”><iframe itemprop=”video” src=”http://player.vimeo.com/video/?title=0&byline=0&portrait=0?wmode=transparent&#8221; width=”2000″ height=”800″></iframe></div>

    Also probably important to note, the video will embed and appear fine using just the media embed in the post body, but not in the portfolio widget. You can see this working on the page now at http://www.killitstudios.com/?portfolio=doritos.

    Thanks again.

    #241381
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me correct admin login detail to inspect and resolve the issue.
    Thanks
    Mohammad

    #241388
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Can you activate your child theme and paste in this test into the file functions.php:

    	if ( ! function_exists( 'sf_get_vimeoid' ) ) {
    	function sf_get_vimeoid( $url ) {
    		// http://www.patricktalmadge.com/2011/12/17/regex-vimeo-parser/
    	    $regex = '~
    		            # Match Vimeo link and embed code
    		            (?:<iframe [^>]*src=")?     # If iframe match up to first quote of src
    		            (?:                         # Group vimeo url
    		                https?:\/\/             # Either http or https
    		                (?:[\w]+\.)*            # Optional subdomains
    		                vimeo\.com              # Match vimeo.com
    		                (?:[\/\w]*\/videos?)?   # Optional video sub directory this handles groups links also
    		                \/                      # Slash before Id
    		                ([0-9]+)                # $1: VIDEO_ID is numeric
    		                [^\s]*                  # Not a space
    		            )                           # End group
    		            "?                          # Match end quote if part of src
    		            (?:[^>]*></iframe>)?        # Match the end of the iframe
    		            (?:<p>.*</p>)?              # Match any title information stuff
    		            ~ix';
    	
    	    preg_match( $regex, $url, $matches );
    	
    	    $vimeo_ID_fallback = substr( $url, strrpos( $url, '/' ) + 1 );
    	
    	    if ( isset( $matches[1] ) ) {
    	        return $matches[1];
    	    } else {
    	        return $vimeo_ID_fallback;
    	    }
    	}
    }
    
    if ( ! function_exists( 'sf_video_vimeo' ) ) {
        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 post-media">' . __( "Video not found", "swiftframework" ) . '</div>';
            }
    
            if ( is_ssl() ) {
    			return '<div class="sf-video-wrap"><iframe itemprop="video" src="https://player.vimeo.com/video/'. $video_id .'?title=0&byline=0&portrait=0?wmode=transparent" width="'. $width .'" height="'. $height .'"></iframe></div>';
            } else {
    			return '<div class="sf-video-wrap"><iframe itemprop="video" src="http://player.vimeo.com/video/'. $video_id .'?title=0&byline=0&portrait=0?wmode=transparent" width="'. $width .'" height="'. $height .'"></iframe></div>';
            }
        }
    }

    Thanks.

    #242361
    killit
    Member
    Post count: 5

    Somehow child theme didn’t get uploaded but I will do and let you know. Thanks.

    #242393
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Let us know your feedback.
    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 the following item
Login and Registration Log in · Register