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.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?