Why autoplay attribute of audio or video element do not work in Sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Why autoplay attribute of audio or video element do not work in Sololearn?

I have been trying it with JavaScript but still the audio do not play onload.. I even tried after the alert is triggered still the audio don't and I get an error.. as play() can only be initiated with user gesture.

30th Jul 2017, 3:36 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
2 Answers
0
because it is useles on sololearn
22nd Sep 2017, 8:07 PM
Fede_26
Fede_26 - avatar
0
because audio and video element are old attribute and autoplay is new attribute in javascript.
29th Mar 2020, 3:09 PM
sahil jangid
sahil jangid - avatar