WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Fix for vimeo video shortcode and iframe

[Resolved] 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="http://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.

    prettyPhoto.zip

    Good Luck 🙂

    http://wordpress.org/plugins/wp-video-lightbox/

Viewing 1 replies (of 1 total)
  • Plugin Author wptipsntricks
    Participant

    @wptipsntricks

    Hi, thanks for the tweak. However, it’s not actually a bug. You are supposed to embed the video like the following:

    <a href="http://vimeo.com/13422697?width=640&height=480" rel="wp-video-lightbox" title=""><img src="http://example.com/images/thumbnails/flash-logo.jpg"/></a>

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Fix for vimeo video shortcode and iframe’ is closed to new replies.