Below my audio code, it is ok when you open just 1 page, but I need to use the dalay function for all wordpress pages. In this mode the audio starts in every page in 10 minutes after the firt autoplay.

 $audio_code =

        '<div style="display: none;">' .
        '  <audio autoplay id="war_soundy_audio_player" >' .
        '<audio autoplay controls="controls" onloadeddata="var audioPlayer = this; setTimeout(function() { audioPlayer.play(); }, 10*60*1000)">' .
        '      <source id="war_soundy_audio_player_source" src="' . $audio_file_url . '" type="' . $audio_type . '">' .
        '  </audio>' .
        '</div>';

Read more here: Audio html5 playing every page


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: