1

I have below code to embed video. but it is not working. Any suggestions?

<!DOCTYPE html>
<html>
<body>

<iframe src="https://vimeo.com/63534746"></iframe>

</body>
</html>
2
  • The Embed code for that specific video, found when you click the share button is: <iframe src="https://player.vimeo.com/video/63534746?color=ffffff" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/63534746">Light Bikes</a> from <a href="https://vimeo.com/ericcorriel">Eric Corriel</a> on <a href="https://vimeo.com">Vimeo</a>.</p> Commented Apr 1, 2015 at 17:41
  • add height and with to your iframe
    – Lucifer
    Commented Mar 29, 2024 at 6:30

2 Answers 2

2

The error you get back in the console is Refused to display 'https://vimeo.com/63534746' in a frame because it set 'X-Frame-Options' to 'sameorigin'. so Vimeo is blocking you from doing what you are trying to do.

There are three possible values for X-Frame-Options:

DENY - The page cannot be displayed in a frame, regardless of the site attempting to do so.

SAMEORIGIN - The page can only be displayed in a frame on the same origin as the page itself.

ALLOW-FROM uri - The page can only be displayed in a frame on the specified origin.

Instead of embedding that whole page, you can use the embed code provided by Vimeo (found by clicking the 'Share' button).

<iframe src="https://player.vimeo.com/video/63534746?color=ffffff" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p>
    <a href="https://vimeo.com/63534746">Light Bikes</a> from <a href="https://vimeo.com/ericcorriel">Eric Corriel</a> on <a href="https://vimeo.com">Vimeo</a>.
</p>
2

The link you used leads to the video's page, not to the video "embedding" page. You can use the "share" feature of the site to get the right iframe code:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.