Autoplay audio on exit pop up

3 replies
How do I embed autoplay audio on exit pop up?
#audio #autoplay #exit #pop
  • Profile picture of the author Artur Golisz
    You can use HTML and JavaScript

    https://developer.mozilla.org/en-US/...udio_and_video

    Code:
    document.getElementById('yourAudioTag').play();
    Signature
    Need help with programming (WordPress, PHP, jQuery and more) ? Just send me PM.
    {{ DiscussionBoard.errors[9205036].message }}
    • Profile picture of the author RobinInTexas
      I can't think of a better way to alienate people than making noise without their permission, especially people who might be browsing at work.
      Signature

      Robin



      ...Even if you're on the right track, you'll get run over if you just set there.
      {{ DiscussionBoard.errors[9205754].message }}
  • Profile picture of the author jigney
    I hope you already placed an audio on the page, And than on the close function of your popup,
    You can simple fire a .play() function with the respected ID or CLASS which you had added in your AUDIO tag.
    {{ DiscussionBoard.errors[9223260].message }}

Trending Topics