There are many question like this in stackoverflow but without answer that is why I am asking this question . This is showing only text not html iframe inside table td
<!DOCTYPE html> <html> <head></head> <body> <iframe width="1280" height="609" src="https://www.youtube.com/embed/VOoGQIBj9_Y" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </body> </html>
my code - this is working fine in w3schools but not here
Your code is working fine. Try only adding code withing iframe tag instead of whole HTML code.
<iframe width="1280" height="609" src="https://www.youtube.com/embed/VOoGQIBj9_Y" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Related
I am unable to get this (https://youtu.be/gnRxUDOJ-M0) youtube video to play in my browser even though I have another video that is working as intended. I'm not seeing what I am missing?
https://thepowerhousemethod.org/nextsteps.html
Working
<iframe width="560" height="315" src="https://youtu.be/gnRxUDOJ-M0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Not Working
<iframe width="560" height="315" src="https://www.youtube.com/embed/X0wNGbjmU4w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Use the embed URL from Youtube and paste to .html page
I can add a YouTube video to a survey like this
This uses embed code like this:
<iframe width="560" height="315" src="https://www.youtube.com/embed/9QiE-M1LrZk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
But when I replace the src with a link to my own video
<iframe width="560" height="315" src="link_to_my_mp4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
It doesn't work (the video is not displayed on the survey).
Is there a way to achieve this?
(The reason I want to use videos on my own server is that I don't want people to have to watch ads on YouTube).
Thanks.
I have some videos that are embedded on my webpage from YouTube. The thing is I am using the below-attached code to make it responsive (via bootstrap). It's good on mobile and tablets but on desktops and laptops is coming out to be very huge. When I could not solve the problem then I did not use YouTube embed and switched to the HTML5 video tag. In that, the responsive problem was solved by width:100% and height auto but the videos were not loading and kept on buffering. So, I again switched to YouTube embed so that at least the video loads but it's not really responsive (not on laptops, desktops). Also attaching the link for the webpage where the videos are embedded.
Code-
<div class="container">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/kq7CdSf7ocA?rel=0" title="YouTube video
player" frameborder="0" allow="accelerometer; autoplay; clipboard-write;
encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
You can try setting a max-width on the iframe.
-- Video not loading in snippet ... Fiddle
.container {
display: flex;
justify-content: center;
}
iframe {
max-width: 900px;
max-height: 400px;
}
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<div class="container">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/kq7CdSf7ocA?rel=0" title="YouTube video
player" frameborder="0" allow="accelerometer; autoplay; clipboard-write;
encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
I am trying (and failing) to make an embedded youtube video autoplay
Here is the code:
<iframe width="560" height="315"
src="https://www.youtube.com/embed/jH1RNk8954Q"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
is there a way to make this autoplay? If so please could I have it.
In HTML and CSS by the way
Have a look at https://developers.google.com/youtube/player_parameters?hl=en
Sample there for autoplay:
<iframe id="ytplayer" type="text/html" width="640" height="360"
src="https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&origin=http://example.com"
frameborder="0"></iframe>
I have this code in my html file and it is not working, is there any mistake?
<iframe class="video" src="
https://www.youtube.com/playlist?list=PLugGnSaLgr_1zb5n91s6okPtwm0MfgFD1?controls=0&showinfo=0&rel=0&autoplay=0&loop=0&mute=1&cc_lang_pref=en&cc_load_policy=1" frameborder="0" allowfullscreen></iframe>
Try this snippet
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLugGnSaLgr_1zb5n91s6okPtwm0MfgFD1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>