Vimeo video works locally, but not on live website: Unrecognizable security error: source error with iframe
It's hard for me to understand this. I have two videos on my site that I host in vimeo. With the inline code they provide, one video will show and play and the other will play locally, but not once when I upload it to the blue host.
The console reads: Uncaught SecurityError: Failed to read contentDocument property from "HTMLIFrameElement": Blocked frame with source " http://www.example.org " from accessing frame with source " http://example.org ". Protocols, domains and ports must match.
and links to jquery.min.js.
I have found some suggestions on how to get around this using document.domain to no avail. Any help is appreciated. Thank you for your time.
source to share
From https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
http://store.company.com/dir2/other.html : Success
http://store.company.com/dir/inner/another.html : Success
https://store.company.com/secure.html : Failure - Different protocol
http://store.company.com:81/dir/etc.html : Failure - Different port
http://news.company.com/dir/other.html : Failure - Different host
The one you want to look at is the bottom line - "Failure - Other Host":
There are http://example.com
and in your explanation http://www.example.com
, which can actually be considered different hosts. So I would try to match both with www or non-www.
If that doesn't work, another solution is to use HTTP Access Control (CORS), but this can be a lot more complicated than you are willing to deal with. https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
source to share