4

I am creating an ios application using webRTC for video conferencing. I want to detect who is talking in the peer connection.

To be more specific,I want to detect the audio activity of the remote peer I am connected to so that I can detect the person who is currently speaking.

4

2 回答 2

3

This can be implemented by measuring the value of "audioOutputLevel" in peer-connection stats reports. The Function that will you should study is

- (void)peerConnection:(RTCPeerConnection*)peerConnection didGetStats:(NSArray*)stats
于 2017-04-23T05:07:55.230 回答
1

Check out this guide for building a sample WebRTC iOS application.

Check the section WebRTC Stats reporting

For example, audioSendInputLevel property indicates mic input level even while audio track disabled, so you can check if user is currently speaking/talking.

于 2016-08-29T10:22:43.240 回答