Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var audio = new Audio("alarm.wav");
- audio.play();
- document.write('<audio id="player" src="alarm.wav" >');
- document.getElementById('player').play();
- {
- "name": "Alarm",
- "version": "1.0.0",
- "icons": {"64": "icon64.png"},
- "permissions": [
- "http://site1/",
- "http://site2/"
- ],
- "content_scripts": [
- {
- "matches": ["http://site1/", "http://site2/"],
- "js": ["myscript.js"],
- "run_at": "document_end"
- }
- ],
- "manifest_version": 2
- }
- var myAudio = new Audio();
- myAudio.src = "alarm.mp3";
- myAudio.play();
- var myAudio = new Audio(); // create the audio object
- myAudio.src = "path/to/file.mp3"; // assign the audio file to its src
- myAudio.play(); // play the music
Add Comment
Please, Sign In to add comment