How can I do that, so whenever a user clicks a link we play a sound? Using javascript and jquery here.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- Can we recover audio from MFCC coefficients?
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
Following code might help you to play sound in a web page using javascript only. You can see further details at http://sourcecodemania.com/playing-sound-javascript-flash-player/
New emerger... seems to be compatible with IE, Gecko browsers and iPhone so far...
http://www.jplayer.org/
Found something like that:
JavaScript Sound Manager:
http://www.schillmania.com/projects/soundmanager2/
Using the html5 audio tag and jquery:
Code from here.
In my implementation I added the audio embed directly into the HTML without jquery append.
https://github.com/admsev/jquery-play-sound
$.playSound('http://example.org/sound.mp3');