Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Vimeo error: "The embed code for this video is not valid."
New Landing › How can we help? › Themeforest Theme Support › Dante › Vimeo error: "The embed code for this video is not valid."
- This topic has 9 replies, 3 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Dante
-
January 13, 2016 at 4:51 pm #240113
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!
January 13, 2016 at 8:31 pm #240163So 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” width=”2000″ height=”800″>
Not sure why this would be or how to fix. Thanks for your help.
January 14, 2016 at 10:57 am #240334Hi,
Please try to insert the video url with HTTP just like http://vimeo.com/150697730. Hope it should help to you.
Thanks
MohammadJanuary 14, 2016 at 2:36 pm #240447Thanks, 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” width=”2000″ height=”800″></iframe></div>I appreciate your help.
January 14, 2016 at 2:46 pm #240450Hi,
The author of the video has disabled embeds. Click the share icon and test using the embed code: https://vimeo.com/150697730
Thanks.
January 15, 2016 at 8:09 pm #240948Thanks 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” 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.
January 18, 2016 at 2:22 pm #241381Hi,
Please provide me correct admin login detail to inspect and resolve the issue.
Thanks
MohammadJanuary 18, 2016 at 2:41 pm #241388Hi,
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.
January 20, 2016 at 8:59 pm #242361Somehow child theme didn’t get uploaded but I will do and let you know. Thanks.
January 21, 2016 at 3:13 am #242393Hi,
Let us know your feedback.
Thanks
Mohammad -
Posted in: Dante
You must be logged in and have valid license to reply to this topic.