i am facing difficulty in autoplay an audio in chrome/firefox browser on webpage load, it is working perfectly fine on microsoft edge/ Internet explorer witht the HTML5 Tag , but not working with chrome /mozilla, can anyone help me out?
Asked
Active
Viewed 104 times
0
-
1https://stackoverflow.com/questions/50490304/how-to-make-audio-autoplay-on-chrome – Mostafa Rahmati Jul 07 '20 at 11:11
-
1Does this answer your question? [How to make audio autoplay on chrome](https://stackoverflow.com/questions/50490304/how-to-make-audio-autoplay-on-chrome) – Suresh Mangs Jul 07 '20 at 11:13
-
Do you get any error on Chrome/Mozilla console? – Shardul Birje Jul 07 '20 at 11:14
-
@ShardulBirje Yes, Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. – Ameer Hamza Khan Jul 07 '20 at 12:07
-
@Ameer Hamza Khan refer this https://stackoverflow.com/questions/49930680/how-to-handle-uncaught-in-promise-domexception-play-failed-because-the-use – Shardul Birje Jul 08 '20 at 04:28
1 Answers
0
Try this out:
<video autoplay>
<source src="movie.mp4" type="video/mp4">
</video>

Emmanuel Odo
- 1
- 1