Playing wordpress tutorial videos as (portfolio) lightbox pop up

I tried linking the videos to an image in my portfolio page but every time I click on the image, the pop up would say request unsuccessful. It's giving me this error message:

XMLHttpRequest cannot load Origin is not allowed by Access-Control-Allow-Origin.

I have already added the website on the list but it's still denying access to it. I tried linking a youtube video and it worked.

Does it only work as an embed? Any thoughts?

Please see attached images.


  • aecnu
    • WP Unicorn

    Greetings supergoyong,

    Thank you for this great question and bringing this significant issue to our attention.

    Does it only work as an embed?

    That is correct that it only works as an embed and in combination with the registered domain in the API.

    I am sorry to be the bearer of this news but it is the correct answer.

    I would tell you how to get around it by copying the videos and setting them up how you like, but I have been forbidden from this practice after I became part of the staff. (Hint, hint)

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

  • supergoyong
    • Site Builder, Child of Zeus

    Thanks for the response. I guess I only have two options, to just embed the videos or download the videos and host it myself. The second option is a bit impractical right now since it will eat my bandwidth. Embed then :slight_smile:

    Thanks again!

  • supergoyong
    • Site Builder, Child of Zeus

    Actually I was able to find a way to make it work.

    What I did is that I used the iframe code and wrapped it with the lightbox code. The iframe code still stays within the page but being displayed on a lightbox.

    The implementation will be different depending on the theme you're using but the shortcode below should give you an idea on how i did it

    [lightbox title="Add An Image From Media Library" width="480px" height="325px" href="" iframe="true"] image [/lightbox]

    See the screenshot :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.