Last active
November 1, 2017 01:22
-
-
Save Nicknyr/8b2e806798a54cd0996f3ae45f913b8e to your computer and use it in GitHub Desktop.
Javascript: Function that uses Audio() to play a sound
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Uses Audio() to play an mp3 | |
function sound() { | |
var audio = new Audio(); | |
audio.src = "url to mp3"; | |
audio.play(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment