"Youtube.com refused to connect"
I’m at UUCC and I’ve been asked to embed a Youtube video on the UUCC.org website. I tried using the carousel’s Video URL tool to embed the video directly. However, when I publish the carousel, I get a “Youtube.com refused to connect” error. Has anyone experienced this error and how can I fix it? I’m currently working around this issue by embedding the video as an image that links to Youtube but I want to have this video play directly from our site.
We use the 1.1.3 version of the UUA theme and 4.9.10 version of Wordpress.
Comments (2)
The easiest way to embed a YouTube video in a page, blog post, or service page is just to paste the YouTube URL right into the text of the page. On http://sample.uuatheme.org/services/new-service-march-1-10-am/, I pasted on the last line of the text, and it appears as a YouTube player.
Does that work for you?
You cannot display a lot of websites inside an iFrame. Reason being that they send an “X-Frame-Options: SAMEORIGIN” response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.
I faced the same error when embed YouTube links. For example: https://www.youtube.com/watch?v=8WkuChVeL0s
I replaced watch?v= with embed/ so the valid link will be: https://www.youtube.com/embed/8WkuChVeL0s
It works well.
Try to apply the same rule on your case.
SAMEORIGIN
The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin.