1.

Solve : how to autoplay audio??

Answer»

How to autoplay audio, when the page is loaded?

I have tried put autoplay in the audio tag, and it didn't work.


 

and I have tried

$(document).ready(function() {
  $("#audio").get(0).play();
  $('#audio').prop("volume", 0.2);
}
then it didn't work.

Is there any other idea to autoplay audio, when the page is loaded?You can take a LOOK at this ==> Playing audio after the page loads in htmlI tested this under IE Edge and it WORKS 5/5 
And with HTA file too 

Code: [Select]<!DOCTYPE html>
<meta http-equiv="x-ua-compatible" content="ie=9">
<html>
<head>
<script>
window.onload = function AutoPlay() {
document.getElementById("my_audio").load();
document.getElementById("my_audio").play();
}
</script>
</head>
<body>
<center>
<audio id="my_audio" src="http://listen.pioneerdjradio.com:8550/stream/1/" type="audio/mpeg"></audio>
</center>
</body>
</html> Quote from: Hackoo on April 20, 2020, 02:09:17 AM

You can take a look at this ==> Playing audio after the page loads in html
The page of STACK OVERFLOW will help you. Like it helped me


Discussion

No Comment Found