Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web audio analyzer on webrtc for remote stream

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.

like image 627
Jeet Avatar asked Nov 12 '22 00:11

Jeet


1 Answers

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.

like image 189
xiaojxiao Avatar answered Jan 04 '23 02:01

xiaojxiao