0
I have a question for Web Development
Few days ago i have created a website and wanted, when my page is open audio of youtube play automatically. But i am not able to do that. Ifame doesn't support 'autoplay' with new versions of Chrome browse(mobile or pc). But Microsoft edge works perfectly Anyone can suggest me how can i overcome this problem...
15 odpowiedzi
+ 1
Iframe is not supported in html5, so the issue may lie there... internet explorer is so slow in catching up which may be part of the reason why it still reads it...
Are you declaring <!Doctype html>
+ 6
Web browsers were moving towards stricter autoplay policies in order to improve the user experience, minimize incentives to install ad blockers, and reduce data consumption on expensive and/or constrained networks.
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Chrome, Firefox, they are all advancing to protect users; But for Edge.... 🤷♂️
+ 3
# ------------------------ Without Autoplay -------------------------------
<!DOCTYPE html>
<html>
<body>
<iframe width="420" height="345" src="https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=0">
</iframe>
</body>
</html>
# ------------------------ with autoplay ------------------------------------
<!DOCTYPE html>
<html>
<body>
<iframe width="420" height="345" src="https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1">
</iframe>
</body>
</html>
+ 1
Bro i knew this trick with
?autoplay=1..
nowadays its not works
+ 1
Okey lets wait for some other to answer.
+ 1
Youtube player API works
https://developers.google.com/youtube/iframe_api_reference
+ 1
Maybe consider getting rid of the iframe and replacing it with div tags...
+ 1
uhmm.. Iframe is fully supported and updated in html5
frame tag however is not supported. iframe and frame tags are completely different things.
+ 1
So it turns out that some browsers will only accept the autoplay tag if you also include muted in the tag.
0
can i go with html4 Lorecan de Robillard
0
Lorecan de Robillard can i overcome this problem... Plz explain... It is very very important for me
0
Okay... Thank you so much
0
Toni Isotalo give me some solutions for this matter
0
One thing is to add ”?autoplay=1” parameter at the end of the youtube url.
0
I knew this trick, but latest chrome browse is not supporting Toni Isotalo