Youtube Video Embed iframe shows the wrong video - javascript

I am making a website and I have to show a video on its homepage. The video exists on youtube and I need to embed it on my website.
<html>
<iframe width="560" height="315" src="https://www.youtube.com/embed/spPdelVEs_k?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</html>
Unfortunately my webpage shows a completely different video. It shows this one.
https://www.youtube.com/watch?v=7sNL0T93ItM
Does the URL convert to something different? Help me solve this problem.

Your code is fine. You just need to clear the cookies on your browser and then it should load fine for you.
This is the video your code goes to:
https://www.youtube.com/watch?v=spPdelVEs_k

Related

What is the best way to add a video upload button to my website?

What combination of services can I use to add a video upload button to my website so I can them embed them on said website.
For uploading a video you need to find a service that suits you (YouTube, Vimeo...). This will involve some research and reading through the documentations.
Embedding the video to the website you can use the iframe tag
<iframe width="560" height="315" src="your video url" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Take screenshot from iframe playing youtube

I want to take a screenshot from iframe which is playing a youtube video with a click of a button.
As a small code given below, What I want to do is, Whenever I click on the button it should take a screenshot of whatever is getting played at that particular time so that I can upload it to the server.
<iframe id="video" width="420" height="315" src="//www.youtube.com/embed/9B7te184ZpQ?rel=0" frameborder="0" allowfullscreen></iframe>
<button>Take Screenshot</button>

Display YouTube video from URL

I want to load you tube video in my php script.
I have already tried with iframe but it can not work.
I also did some research but it said that load YouTube URL with embed tag, but I want to load without embed tag.
Can you please help me?
If you need to do this within php as you say then you echo an iframe with the address of the YouTube video as https://www.youtube.com/embed/VIDEOID where VIDEOID is the part in the YouTube URL after the v?=, for example this video https://www.youtube.com/watch?v=UaaXEX-MGuk would be embedded as follows:
echo '<iframe width="560" height="315" src="https://www.youtube.com/embed/UaaXEX-MGuk" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>';
Otherwise you can just embed with HTML. Can you provide more detail if this doesn't help?
More here: https://support.google.com/youtube/answer/171780?hl=en
Sign in to your YouTube account on a computer.
On the left side of the page, select the playlist you want to embed.
Copy the playlist ID from the URL.
Modify the embed code for an individual video by doing the following:
In the place of the video ID (after "embed/"), substitute "videoseries?list=".
Then paste the playlist ID after the "=".
Paste the code into your blog or website HTML.
Example:
​<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
https://support.google.com/youtube/answer/171780?hl=en

How to show keek videos in your website using iframe

I want to show my keek video in my code using iframe. but did not get any code by google that let me know how can I integrate keek videos with site.
Thanks
Try This:
<iframe width="480" height="390" src="https://classic.keek.com/embed/22Preab" frameborder="0" allowfullscreen></iframe>
and you can find embed code from here:
Demo: http://jsfiddle.net/cxw80tux/
The button in the lower right corner that looks like a play button, right of the facebook icon, shows the embed code.

Full screen does not work on a Youtube/Viemo embedded video on my site when using chrome

On my website, I embedded a Youtube video with this simple code:
<iframe width="560" height="315" src="//player.vimeo.com/video/72625639?wmode=opaque" class="st_public_video top1" frameborder="0" allowfullscreen=""></iframe>
Site Demo can be seen here at: https://testvillage.letsventure.com/dreamon
When in Chrome and I press the full screen button on that video, the video goes full screen and again restores automatically.
However, when I use Explorer or Firefox, full screen works just fine. So obviously I'm doing something wrong. Any help would be appreciated.
You need to change the allowfullscreen="" to allowfullscreen.
I have not verified this locally. But this property behaves similar to "selected" in the "select/options".
The following is the syntax from Vimeo.
<iframe src="//player.vimeo.com/video/VIDEO_ID" width="WIDTH" height="HEIGHT" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Note the tags ebkitallowfullscreen, mozallowfullscreen, allowfullscreen.

Categories