Hi,
Is it possible to play audio when the user lands on my lander for mobile?
If so, can you point me or give an example code of how to do that?
Thanks!
Dvir
be sure to host your audiofiles on CDN
then:
<audio autoplay="autoplay" preload>
<source src="YOUR CDN LINK HERE/SOUND.mp3" type="audio/mpeg" />
</audio>
holy sh1t it's that simple?! I had no idea.
Thank you constantin!
Now just need to be creative about what to play, mmm
That code above will work but only on certain phones.
Some models have auto playing audio disabled on the browser so nothing can be done there.
also think about loading speed of your page. If browser waits to open .mp3 file and then render page it will terrifically slow page loading speed
you have to test you LP with limited bandwidth before going to production mode.
Bump. Is there any alternative to this method? So it would be possible to play audio on Androids? Thanks
Found an alternative:
http://goldfirestudios.com/blog/104/...script-Library
Works perfect in Android and desktop. Didn´t test it in iphone, but it should work.
Regards,
Pablo.
Sure, copy and paste that just before the </body>, and ensure you have at least an audio file of the type mp3 or ogg in the folder. Once it works and an "loop: true," and it should loop.
Hope that helps!