Reputation: 6148
<iframe id="video" src="https://www.facebook.com/video/embed?video_id=10151798532949501" height="360" width="480" frameborder="0"></iframe>
<a href="http://vimeo.com/73449305" target="video">Test</a>
I have this code and it does not work. Am I doing something wrong?
Upvotes: 1
Views: 117
Reputation: 300
The link for the vimeo video is not correct, to get the right link look at the embedded code under the "Share" option in vimeo. In this case, the link is: http://player.vimeo.com/video/73449305
so replace it with the following:
<iframe name="video" src="https://www.facebook.com/video/embed?video_id=10151798532949501" height="360" width="480" frameborder="0"></iframe>
<a href="//player.vimeo.com/video/73449305?title=0&byline=0&portrait=0&color=ffffff" target="video">Test</a>
Edit: As pointed out by Pietu1998, iframe name should be set to video for it to properly work in Firefox.
Upvotes: 2
Reputation: 1043
Can you just try changing the src with JavaScript?
HTML:
<iframe src="https://www.facebook.com/video/embed?video_id=10151798532949501"></iframe>
<a href="#" onclick="changeVideo('http://vimeo.com/73449305');">Test</a>
JavaScript
function changeVideo(loc) {
document.getElementById['videoframe'].src = loc;
}
By the way some sites do not allow you to open them in iframe (security reasons - clickjacking) (the html way you did it)
Hope this helps :)
Upvotes: 0