How to autoplay embedded YouTube videos in 2023

preview_player
Показать описание
Welcome to Building on Wordpress! In todays tutorial we are going to answer the recurring question: "How do I create an autoplay for my embedded YouTube videos?"

We'll keep things simple and to the point and cover the basics on how to autoplay embedded YouTube videos in 2023 using nothing more than the built-in YouTube iframe video embed code html and some nifty little url parameters.

Autoplaying videos on page load can be a super useful feature in certain scenarios, as it helps to grab the viewer's attention and engage them from the moment they land on your page.

However, due to recent updates in YouTube's policies, autoplay is no longer a default option for embedded videos – but we've got a solution.

Video autoplay is as simple as leveraging the youtube embedded player, specify your "src" url parameters for youtube autoplay and other useful features, make sure your video also has mute set to "1" and your you're in business.

YouTube Parameters

▶️ Autoplay Control: autoplay=1

🔇 Video Player Mute: mute=1

🕓 Start Playing Time: start=12345 (in seconds)

What does this look like put together?

And there you have it. Embed and Autoplay Youtube Videos simply and easily.
Рекомендации по теме
Комментарии
Автор

It worked perfectly. Thanks for this information.

syndicationexpress
Автор

just at the time i needed it, you are awesome bro, keep it up ❤

echo
Автор

For God's sake, that works marvels! Mr. Donnelly, I am so grateful to you for your kind help. Liked, subscribed and thanked. What else?

mxchfzl
Автор

I was tryna do a rickroll but this broke me

nguyenthaibaofplhcm
Автор

Thanks, it also works with short videos.
Quick question: how do I restart the video at the beginning when it reaches the end?

jeromehervouet
Автор

Thanks for this video! I have a question. How can I loop youtube viedo??

Lina-klgb
Автор

I am trying to rickroll someone and this helped, but it doesn't count if it's muted is there any possible way to fix this?

AndevOG
Автор

Does this work with embedded songs from spotify or apple music? 🤔

dozhadeville
Автор

Thanks. That was very helpful but its still not playing my playlist. Just plays one song then it stops. I'm attempting to embed music videos.

beverlybattle
Автор

If you add &mute=0 it will autoplay unmuted. it worked for my use but i cant say ive tesed it on all platforms.

BigG
Автор

Great video. To make sure I understand correctly you can only autostart by muting the video? I am trying to put my video link into a QR code so that when the link is scanned my video will autostart. Is there a way to do that? Also can you put the embedded script into a QR code?

globalluxurytravel
Автор

is there any way to set autoplay quality?

krystianciarkowski
Автор

Great video! However, even adding those commands to the embed code, my YouTube live stream STILL won't autoplay on our Google Site. We're using Google Sites because we had students build the page for our school science dept. Any other suggestions? Thanks!

StreamAdmin-prmi
Автор

great! how about stop video play when out viewport

rozhkoaleks
Автор

Is it legal to embed someone else's youtube videos on our website?

ruchikathilakarathne
Автор

A man explains in 4 minutes, as someone would explain in an hour. Thank you very much, can there be a tutorial on how to hide the menu and play icon from Youtube for autoplay video please?❤

durgutovicjasmin
Автор

I don't have the embed option when I click share?! Help! I really want to be able to auto mute videos but I have to embed by using the link and the youtube option in wordpress so can't change the coding. Am I doing something wrong? TIA

StylishEatsandTreats
Автор

when this video autoplay in website, but this view didn't count in youtube. How can i fixed it?

rajibthebutterfly
Автор

How about preventing "related videos" showing up at the end of the video.

larrybradshaw
Автор

this needs javascript enabled on the browser, most browsers have this disabled by default. right?

akoemm