Answers for "how to control the volume of a audio in javascript"

1

play an audio at a specific volume in javascript

var music = new audio({
    loop: true,
    volume: 1,
    src: ['music.mp3']
})

//or 

var music = new Audio('music.mp3');
music.loop = true;
music.volume = 0.2;
Posted by: Guest on August-10-2021
0

js audio volume

//sets volume to 20%
var vid = document.getElementById("myVideo");
vid.volume = 0.2;
Posted by: Guest on March-27-2021

Code answers related to "how to control the volume of a audio in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language