»
EnglishFrenchVietnamese

Print - Playing Sound Files - JavaScriptBank.com

Full version: jsB@nk » Multimedia » Sound » Playing Sound Files
URL: https://www.javascriptbank.com/playing-sound-files.html

Playing Sound Files © JavaScriptBank.comThis has to be the easiest way a play a sound file, and you get to use JavaScript! Browse to your sound file and play it.

Full version: jsB@nk » Multimedia » Sound » Playing Sound Files
URL: https://www.javascriptbank.com/playing-sound-files.html



JavaScript
<script>function play(){  sound1.src=source.value  sound2.src=source.value}function stop(){  sound1.src=""  sound2.src=""}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<input id="source" type="file" style="width: 600px;"><br><input onclick="play()" value="play" type="button" style=""><input onclick="stop();stoptimer();" value="stop" type="button" style=""><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->