Увеличение прироста громкости веб-страницы с помощью JavaScript (вкладка «Аудио» для созданияMediaElementSource) - PullRequest
0 голосов
/ 22 октября 2018

Если мне нужно увеличить громкость видео-тега до 200%, я бы добавил его в createMediaElementSource:

// create an audio context and hook up the video element as the source
var audioCtx = new AudioContext();
var source = audioCtx.createMediaElementSource(myVideoElement);

// create a gain node
var gainNode = audioCtx.createGain();
gainNode.gain.value = 2; // double the volume
source.connect(gainNode);

// connect the gain node to an output destination
gainNode.connect(audioCtx.destination);

Из этого ответа

Но тогда как мне передать всю аудиозапись веб-страницы в createMediaSource, чтобы увеличить усиление?

...