Since the latest Youtube update the embed code for autoplay isn’t listed in the offered options, it does appear in the iframe code but allow=”autoplay; doesn’t work. The only way I found to make it work is by doing the following.
Update 28th November 2018:
Unfortunately YouTube have made some changes yet again and now currently this is no longer working on any browser 🙁 I will try to find a way if it’s at all possible, or in the meantime if anyone else finds a way, please let me know in the comments so I can update this page and give you credit, Thank You.
Find your Youtube video ID, its usually the last set of characters of the url.
You can add the following parameters in your iframe code after your video embed url, its important that you add a ? after and do not add any spaces between the parameter codes. After your last parameter code add “ then you can add allowfullscreen & frameborder but they need to be separated by a space to work.
I’ve colour coded each of the parameters i’ve used so you can easily see what they all do further below
<iframe width=”100%” height=”600″ src=”https://www.youtube.com/embed/YOUR_VIDEO_ID?&autoplay=1&showinfo=0&vq=highres&rel=0&loop=1&playlist=YOUR_VIDEO_ID”allowfullscreen frameborder=0></iframe>
- &autoplay=1 – The video will automatically start to play when the player loads. Changing the 1 to a 0 or removing will revert back to default press play before start.
- &showinfo=0 – The player Will not display information like the video title and uploader before the video starts playing. Changing the 0 to a 1 or removing will revert back to default showing titles
- &vq=highres – This forces the video to play at its highest quality setting. (Though I don’t think this works anymore and Youtube seems to only automatically default to what your bandwidth can sustain, but I just leave it in anyway in the hope they’ll eventually add it back and it’ll play in 4k)
- &rel=0 – Whether the player should show related videos when playback of the video is paused or at the end. Changing the 0 to a 1 or removing will revert back to default and show the related video thumbnails.
- &loop=1&playlist=YOUR_VIDEO_ID – This will cause the player to play the video again and again.
- allowfullscreen – After your final parameter use ” then simply type this code
- &fs=0 – Add amongst the parameters to remove the Fullscreen button altogether.
- frameborder=0 – After your final parameter use ” then simply type this code. Changing the 0 to a 1 will add a border.
- Controls=0 – The player controls at the bottom of the screen do not display in the player. Changing the 0 to a 1 or removing will revert back to default and the controls will return.
- Spacebar or [k]: Play / Pause
- Arrow Left: Jump back 5 seconds in the current video
- Arrow Right: Jump ahead 5 seconds in the current video
- Arrow Up: Volume up
- Arrow Down: Volume Down
- [F]: Toggle full-screen display
- [J]: Jump back 10 seconds in the current video
- [L]: Jump ahead 10 seconds in the current video
- [M]: Mute or unmute the video
- [0-9]: Jump to a point in the video. 0 jumps to the beginning of the video, 1 jumps to the point 10% into the video, 2 jumps to the point 20% into the video, and so forth.
If you found this helpful, please like and follow my social pages
youtube https://wwwyoutube.com/watch?v=UceaB4D0jpo&w=560&h=315
I put this on my Page,but doesn’t work!
The easiest way to put it on your own site is to use the videos share button, then select embed and copy the iframe code into your sites raw html text editor. You can then add the extra instructions in the iframe code.
This does not work. Chrome still blocks the autoplay
Your right, it was fine a month ago. It seems youtube have recently changed something. It’s no longer working on Edge or firefox either 🙁
Well I’m glad to find this post since today is the first time I’ve ever tried such a thing and the auto play code wasn’t working. Yes, I’d love to hear if anyone figures it out… or maybe I should just download a plugin that will do it….
Actually, it wasn’t playing in my sidebar but it started playing on my post…. maybe just took a few seconds?