iframe: Not able to run youtube videos on my html page - html

I am new to HTML and when I am trying to embed a youtube video in my html page using iframe tag, then it is getting embedded very well. Please see code below:
<iframe width="420" height="320" src="https://youtube.com/embed/FiMl6n64bTg"></iframe>
But when i am trying to run that video in my html page then it is showing
The video contains content from multi screen media. It is restricted from playback in certain sites. Watch on Youtube..
How can i run youtube video in my html page without this error/issue.
Thanks in advance!!!!

Try this
<iframe title="YouTube video player" class="youtube-player" type="text/html"
width="420" height="320" src="https://youtube.com/embed/FiMl6n64bTg"
frameborder="0" allowFullScreen></iframe>

Related

How to get the actual video link of a vimeo video to put inside of a <video> tag?

Here is the link in the Vimeo iframe:
<iframe
title="vimeo-player"
src="https://player.vimeo.com/video/348628277"
width="640"
height="360"
frameborder="0"
></iframe>
The above works.
But the below does not work:
<video src="https://player.vimeo.com/video/348628277" autoPlay="true" loop />
It does not work because the link is to the webpage, not the video. How do I get the URL to the video then?
You can use some of the third-party websites to get the mp4 links of different video qualities, like :
https://en.savefrom.net/11-how-to-download-vimeo-video
https://www.savethevideo.com/vimeo-downloader

Youtube Video not showing in a web page when embed using iframe?

I want to embed a Youtube video on my website. I have tried the following code but it does show the video or any controllers:
<iframe width="400" height="300"
src="https://www.youtube.com/watch?v=z-QgsXkYqjc"
frameborder="1"
allowfullscreen></iframe>
Anyone know what I am doing wrong?
Much appreciated.
Change the src to this:
src="https://www.youtube.com/embed/z-QgsXkYqjc"

Embed videos from Youtube, Vimeo, etc

I want to embed videos on my site, but I don't want to keep videos on my server. I want something like an iframe, but I want to be capable to use links from any source, not just from youtube or vimeo. What can I do?
<iframe width="560" height="349" src="https://www.youtube.com/embed/FM7MFYoylVs?enablejsapi=1&playsinline=1&controls=0" frameborder="0" allowfullscreen id="video"></iframe>
Here is what i've tried but that's not what I need.:(
I think iframe should be your best choice, But as iframe is not what you need , you can also have a look at object
<html>
<body>
<iframe src="http://www.youtube.com/embed/W7qWa52k-nE"
width="560" height="315" frameborder="0" allowfullscreen></iframe>
<object data="http://www.youtube.com/embed/W7qWa52k-nE"
width="560" height="315"></object>
<object data="http://player.vimeo.com/video/214414572"
width="561" height="316" frameborder="0" webkitAllowFullScreen mozallowfullscreen
allowFullScreen></object>
</body>
</html>
support to vimeo videos depents on the target as vimeo videos are flash. so if you display a vimeo video using iframe or object then as long as device is supported, it will show the video
It is possible to have your own iframe and then embed the required iframe or src as required.
So you would have a MASTER iframe that when loaded will hold the youtube iframe inside. And you can do the same with each option that you are requiring. Just set your iframe size to match the others.

html : iframe not showing content in html

I want to show a youtube video in html 4. For that, I am using iframe. But the content of iframe is not showing.
<iframe frameborder="1" width="420" height="345" src="https://www.youtube.com/watch?v=C8kSrkz8Hz8"></iframe>
FYI: I am using Firefox 29.0 and Chrome 35.0. Both browsers are showing the same result.
Change your src with //www.youtube.com/embed/C8kSrkz8Hz8
your code shoud look like this
<iframe frameborder="1" width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8"></iframe>
Find code under each video on youtoube at Share menu.
When you try to put the whole YouTube page into an iframe, it sends a HTTP header called X-Frame-Options with the SAMEORIGIN value, which tells the browser, that the page can only be displayed in a frame on the same origin as the page itself.
You should use the provided embed code (you can find it below every YouTube video), which is also an iframe, but with a different URL. It will only show the player.
In this case, the embed code would be:
<iframe width="560" height="315" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
replace you Iframe with this one. this works for you.
<iframe width="640" height="390" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="0" allowfullscreen></iframe>
missing attributes are: frameborder="0", allowfullscreen
You should change the youtube URL to remove the "s" so it looks like this:
<iframe width="420" height="345" src="//www.youtube.com/embed/C8kSrkz8Hz8" frameborder="1" allowfullscreen></iframe>
You should also be able to embed a youtube video from the page. Please see the screenshot attached:
I tried it this way and worked for me. Changing your src="https://www.youtube.com/embed/C8kSrkz8Hz8"
following the other parameters.

The youtube video is not loading in the my local webpage

I have taken the following iframe code for the youtube video from the youtube itself.
<iframe width=”560? height=”315? src=”http://www.youtube.com/embed/V3oJR5IAMxM” frameborder=”0? allowfullscreen></iframe>
But when i try to embed this video on simple web-page inside a div element. I can see the you-tube player in the web page.But the video is not loading in my webpage. But the same video is playing for me in youtube.
Can someone tell what might be the problem,..
Is the problem with a code or with the browser, i am using mozilla 13.
HiTbmBizz,
Try this instead,
<iframe width="640" height="360" src="http://www.youtube.com/embed/V3oJR5IAMxM?feature=player_embedded" frameborder="0" allowfullscreen></iframe>
Worked for me in HTMLSandbox if you want to test.
Let me know how it goes.