• Resolved mvandemar

    (@mvandemar)


    I am attempting to load some videos using Fancybox, but I keep getting a “Cross-Origin Request Blocked” error. I thought that it might be the videos themselves, but I am getting it when attempting to load any external resource into Fancybox:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://smackdown.blogsblogsblogs.com/. This can be fixed by moving the resource to the same domain or enabling CORS.

    I tried editing the fancybox.php file to add this parameter to the call:

    'crossDomain': true

    But it did not help any. Suggestions?

    Thanks.

    -Michael

    https://ww.wp.xz.cn/plugins/fancybox-for-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mvandemar

    (@mvandemar)

    I just tested, by the way, and using Fancybox on it’s own (ie. not through the plugin) on a test html page, on the same domain, works fine. It has something to do with the plugin’s implementation, not with Fancybox or either domain involved.

    -Michael

    Thread Starter mvandemar

    (@mvandemar)

    I got it to work by adding the following to the “Extra Calls” tab:

    jQuery(document).ready(function() {
     jQuery(".vimeo").fancybox({
      width: 800,
      height: 600,
      type: 'iframe',
      fitToView : false
     });
    });

    And then adding the class “vimeo” to the link. Is there a reason this doesn’t work out of the box? Thanks.

    -Michael

    Hi,

    I think CrossDomain is not a recognized setting in FancyBox, but as you mentioned iframe should work fine for something like video embedding, glad to hear it worked in the end!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘"Cross-Origin Request Blocked" issue’ is closed to new replies.