the iframe is not working what shall i do - html

<iframe width="640" height="390" src="//www.youtube.com/watch?v=rf-ZbfUTVO0" ></iframe>
i did like this but is is not working. I tried this many time but still not working.

Well, if you want to embed any youtube video then you can click on the share button of Youtube, there you'll find the embed code just like below. I did this and it's working for me.
<iframe width="560" height="315" src="https://www.youtube.com/embed/rf-ZbfUTVO0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Related

embedded youtube video is not getting unmute while autoplaying the video

I have this iframe tag
<iframe src="https://www.youtube.com/embed/uNRGWVJ10gQ?rel=0&autoplay=1" width="560" height="315" frameborder="0" allow='autoplay' allowfullscreen></iframe>
I want to auto play the video with sound on. But i am not able to do that. The video is auto playing but in mute.
Is there any solution to do that?
Try removing amp; from the iframe source like this:-
<iframe src="https://www.youtube.com/embed/uNRGWVJ10gQ?rel=0&autoplay=1" width="560" height="315" frameborder="0" allow='autoplay' allowfullscreen></iframe>
It should be autoplaying the video with audio on.

Why doesn't this YouTube video embed properly?

When I try to embed the top video, it gives a Playback error. I feel like if it were expected behavior it would at least give a nice message explaining why . Am I doing something wrong with my code?
Bottom video works, top doesn't.
https://jsfiddle.net/ks1xhbd3/1/
<iframe width="560" height="315" src="https://www.youtube.com/embed/AHOQ5Ge0l5Easd" frameborder="0" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/lWz-46NPqdk" frameborder="0" allowfullscreen></iframe>
The video ID is wrong - remove the 'asd' from it, it doesn't belong there and you definitely typed it in accidentally.

How to remove youtube recomended videos at the end of my video?

I am trying to embed youtube video (my own) on my blog and I don't want to see recommended videos at the end, unfortunately ?rel=0 or &rel=0 doesn't work.
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/MY_VIDEO_ID?rel=0" allowfullscreen=""> </iframe>
Thanks in advance!
Try this adding end of the embedded link
?rel=0& showinfo=0
Example -
<iframe width="560" height="315" src="https://www.youtube.com/embed/ZJDMWVZta3M?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>

Youtube embed video not showing at all

Can someone help me with this code? The YouTube video isn't showing up at all.
<iframe width="420" height="315" src="https://www.youtube.com/embed/XGSy3_Czz8k"> </iframe>
Can you try this:
<iframe src="https://www.youtube.com/embed/XGSy3_Czz8k" width="420" height="315" frameborder="0" allowfullscreen></iframe>
There may be some other issue eg. server policy etc. can you provide any other info

HTML z-index does not work for youtube video

I have youtube video on page:
<iframe id='youtubeTrailer' width="560" height="315" src="//www.youtube.com/embed/0Vsy5KzsieQ" frameborder="0" allowfullscreen></iframe>
and some poster. I wrote index for img greater than for video. but it's still does not work. How can I fix it?
That's because flash mostly ignores z-index (unless wmode is set to opaque). You can follow the steps detailed here to correct it.
What the guide above details is just setting the wmode to transparent by modifying the iframe code.
<iframe id='youtubeTrailer' width="560" height="315" src="//www.youtube.com/embed/0Vsy5KzsieQ?wmode=transparent" frameborder="0" allowfullscreen></iframe>