play audio javascript
var audio = new Audio("folder_name/audio_file.mp3");
audio.play();var audio = new Audio('audio_file.mp3');
audio.play();var bMusic = new Audio('welcome1.mp3')
bMusic.play()var audio = new Audio('audio.mp3');
audio.play();<script>
function play() {
var audio = new Audio('https://interactive-examples.mdn.mozilla.net/media/examples/t-rex-roar.mp3');
audio.play();
}
</script>
<button onclick-"play();">PLAY MY AUDIO</button>//play audio with from html audio element:
document.getElementById('myAudioTagID').play();
//play audio with out html audio tag
var myAudio = new Audio('my_great_song.mp3');
myAudio.play();
Also in JavaScript:
- how to select the first div in jQuery
- javascript generate 3 numbers 1 - 49
- page reload timeout
- how to write a json in r
- click anchor tag using jquery
- how to swap two elements in an array js
- vue v-for object
- javascript return value from async function site:stackoverflow.com
- js random quine number
- react fun tion
- expressjs swagger yaml
- c# get json object from the immediate window?
- how to get img dimensions from remote url js
- hide checkbox jquery
- get params from route vuejs
- showing difference between dates in minutes js
- shadow in react native
- javascript ceiling
- target all element besides the clicked one
- angularjs find and update object in array
- node updaten
- javascript regex Zero or one occurrence
- refresh page on button click jquery
- event listener on parent not on childjavascript