Fix for vimeo video shortcode and iframe
-
Version 1.6.2 & latest chrome (31.0.1650.57) macos 10.9
Today I tried to embed a vimeo with the shortcode and with an iframe link.
<a href="https://player.vimeo.com/video/######?iframe=true&width=960&height=540" rel="wp-video-lightbox"><img src="..." /></a>
Both methods didnt work. The shortcode was linking to the vimeo page and the iframe link opened the fullscreen player on vimeo.com. I had an js error in the console:
jquery.prettyPhoto.js... Uncaught TypeError: Cannot read property ‘2’ of null
So I checked the the file and searched for vimeo. I found a regexp for the vimeo uri which was different from my vimeo uri. On line 484:
var t = /http(s?):\/\/(www\.)?vimeo.com\/(\d+)/;
I changed it to:
var t = /http(s?):\/\/(www\.)?player.vimeo.com\/video\/(\d+)/;
And everything worked like magic ??
I minified the file again and uploaded it if someone needs it.
Good Luck ??
- The topic ‘Fix for vimeo video shortcode and iframe’ is closed to new replies.