0

I have to play audio on page load i have checked these links also :

How to make audio autoplay on chrome

<html>
<head>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
  <audio id="audio1" style="display:none;">
    <source src="https://ia800206.us.archive.org/16/items/SilentRingtone/silence_64kb.mp3" type="audio/mpeg">
    <embed height="50" width="100" src="https://ia800206.us.archive.org/16/items/SilentRingtone/silence_64kb.mp3">
  </audio>

  <iframe src="https://ia800206.us.archive.org/16/items/SilentRingtone/silence_64kb.mp3" allow="autoplay" style="display:none" id="iframeAudio">
  </iframe> 
</body>

I have tried with script also

<script type="text/javascript">
function play()            {
    var audio=document.getElementById('audio1');
    audio.play();
    }
    $(function() {
    play();
   }, 2300);
  </script> 

But browser is restricting it, i want to play audio with progress bar, volume button and speed is there any way i can execute this in browser without user interaction i have checked other site audio plays on there site in chrome also, Is there any third party plugin i can use to resolve this issue.

user3653474
  • 3,393
  • 6
  • 49
  • 135

1 Answers1

0

Chromium browsers do not allow autoplay in most cases.

  • but i want to play it at five seconds delay after page loads other sites i checked they are also playing it after the page loads and then second timer then audio starts playing – user3653474 Feb 03 '22 at 07:36