WordPress.org

Ready to get started?Download WordPress

Forums

WP Video Lightbox
[resolved] Fix for vimeo video shortcode and iframe (2 posts)

  1. Kunsang
    Member
    Posted 7 months ago #

    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/

  2. wptipsntricks
    Member
    Plugin Author

    Posted 7 months ago #

    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>

Reply

You must log in to post.

About this Plugin

About this Topic