Best and most lightweight javascript for play sound in mobile devices

209 Views Asked by At

I want implement to my web-app sound notifications with volume control and selection of sounds. So when user will receive example message then webapp execute selected sound with currently set volume level.

Requirements:

  • No jQuery dependency
  • Lightweigt as possible
  • Compatible with all mobile browsers

I have found some javascripts:

I have not any experience with those scripts so I wanna ask if is there any better solution or which mentioned script is better? Thanks for any opinion.

2

There are 2 best solutions below

0
On BEST ANSWER

SoundJS is the best and works everywhere, but I'm biased because I work on it.

Hope that helps.

1
On

You can look at the html5 Audio tag.

You are going to find it difficult to find one solution that will work on ALL browsers.