We are creating a audio video application which using webRTC. The problem is we are not able to show the stream spectrum for remote but for local we are able to.
// setup a analyzer
var analyser = audioCtx.createAnalyser();
analyser.smoothingTimeConstant = 0.0;
analyser.fftSize = 1024;
// get the average for the first channel
var array = new Uint8Array(analyser.frequencyBinCount);
analyser.getByteFrequencyData(array);
var average = getAverageVolume(array);
For local stream we are getting the frequency values inside the array, but for remote stream we are getting zero values inside the array.
If any help, will be greatly appreciated.
A similar issue is described here https://code.google.com/p/chromium/issues/detail?id=241543
Seems like we don't have any specific solution due to browser's issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With