WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
190349
Web Audio getByteFrequencyData fails in the context of a WebRTC call with G.711 codec
https://bugs.webkit.org/show_bug.cgi?id=190349
Summary
Web Audio getByteFrequencyData fails in the context of a WebRTC call with G.7...
Philippe Sultan
Reported
2018-10-08 08:49:40 PDT
Created
attachment 351777
[details]
Diff that removes all audio codecs from SDP but PCMA / PCMU, computes FFT frequencies root mean square (RMS) When you configure a WebRTC PeerConnection to use G.711 only (PCMU or PCMA), using any of the Web Audio API functions that compute FFT frequency coefficients on the remote stream does nothing. Web Audio API functions are : - getByteFrequencyData() - getByteTimeDomainData() - getFloatFrequencyData() - getFloatTimeDomainData() The following test page shows the problem :
https://codepen.io/phsultan/pen/PybLQr
With Chrome or Firefox, if you click Start then Call, the right pane will display both frequency + time domain charts in real time for the remote stream, thus giving an view of the signal power for the narrowband G.711 codec. If you try the same with Safari, you would not see any activity on the right pane, and the JavaScript console shows that any array filled with the Web Audio API functions are filled with zero values. The same test made with Opus works ok with Safari too, as shown in
https://webrtc.github.io/samples/src/content/peerconnection/webaudio-output/
. The above Codepen is based on the corresponding Github repo at
https://github.com/webrtc/samples/tree/gh-pages/src/content/peerconnection/webaudio-output
(diff attached).
Attachments
Diff that removes all audio codecs from SDP but PCMA / PCMU, computes FFT frequencies root mean square (RMS)
(2.62 KB, text/plain)
2018-10-08 08:49 PDT
,
Philippe Sultan
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-10-08 08:53:33 PDT
<
rdar://problem/45089523
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug