Open jieyun-yang opened 11 years ago
High volume can produce sound noise on some audio devices. The value may not be significant if audio device volume is controlled externally.
HTMLAudioElement.volume = 0.9;
HTMLAudioElement.play();
The GainNode
is a simple element that lets us control the volume of the audio that’s coming into to it.
var context = new webkitAudioContext(),
var sineWave = context.createOscillator();
// Declare gain node
var gainNode = context.createGainNode();
// Connect sine wave to gain node
sineWave.connect(gainNode);
// Connect gain node to speakers
gainNode.connect(context.destination);
// Play sine wave
sineWave.noteOn(0);
gainNode.gain.value = 0.9;
There is a demo to control volume using GainNode
. Open it on your localhost.
Usage of headphone is preferred instead of using default (built-in) audio output devices coming with notebooks. Otherwise; recommend users to try software like this.
Another question, how to set the width and height? The default value of width:height is 1:1, how to change it?
Hi Muaz, I'm having error with the code 'var sineWave = context.createOscillator();'
I tried to check if my browser(FF V30.0) supports webkitAudioContext(), and it doesn't.
Please help.
Thanks,
You can try prefix-less AudioContext
object. E.g.
var context = new AudioContext();
var sineWave = context.createOscillator();
Hi Muaz, thanks for the reply :). I fixed the problem yesterday by adding 'muted' to the 'video' element and when playing, I set it to false (videoElement.muted = false) and also set it to true when recording to fix the feedback when doing another recording.
Right now this video recorder (got from your repo WebRTC-Experiment/RecordRTC/RecordRTC-to-Nodejs) only works on Firefox and I'm working on a separate program for Chrome which I found from your repo also and I'm having problem with saving the recorded message to the server. Maybe there's a way I can make it work on Chrome by adding some codes to existing program?
Thanks again
I run socketio-over-node.js video conference on my mac, when I set the volumn a little bit high, the noise is too loud. Is there any way to reduce it?THX