Skip to content

Instantly share code, notes, and snippets.

@asilbalaban
Created December 21, 2013 23:20
Show Gist options
  • Save asilbalaban/8076510 to your computer and use it in GitHub Desktop.
Save asilbalaban/8076510 to your computer and use it in GitHub Desktop.
JS play sound. Bot yazıyorsanız, işlemin bittiğini haber vermesi için güzel bir yöntem.
<div id="sound"></div>
<script>
playSound('music.mp3');
function playSound( url ){
document.getElementById("sound").innerHTML="<embed src='"+url+"' hidden=true autostart=true loop=false>";
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment