“Guru Voluum
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Script for Mobile Audio Autoplay

Discussion in 'Programming and Scripts' started by jhernandezc, Jul 24, 2017.

  1. jhernandezc

    jhernandezc Affiliate affiliate

    10
    1
    3
    Hello everyone,

    Have you noticed that when you put the <audio> HTML tag in autoplay mode on your landing page, it doesn't automatically play the sound on mobile? That's because mobile devices doesn't allow the autoplay mode.

    However, there is a script that you could use for bypassing this issue. Howler (howlerjs.com) is the script which allows you to set the autoplay feature on mobile devices.

    Attached I'm sending the library, just link it to your landing page like you link jQuery and then use the next javascript code:

    Code:
    var sound = new Howl({
        urls: ['sound.ogg', 'sound.mp3']
    }).play();
    Use it wisely :)
     

    Attached Files:

  2. AdCombo
  3. jhernandezc

    jhernandezc Affiliate affiliate

    10
    1
    3
    I didn't receive feedback about this script beside the above one, thanks!

    Anyway, if someone on the forum has an idea about something that would like to have on the landing page or website, please share and let's see if it is possible :)
     
  4. Famerr89

    Famerr89 Affiliate affiliate

    10
    4
    1
    works fine, the author thank you very much!
     
banners