使用javascript提高网页音量(将标签音频添加到createMediaElementSource)

时间:2018-10-21 22:22:22

标签: javascript volume audiocontext

如果我需要将视频代码量增加到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);

From this answer

但是,我如何将整个网页音频输入到createMediaSource中以增加增益?

0 个答案:

没有答案