Here is a description of the different steps to add QoS and active speaker information on streams. Call Stats monitoring is supported on Chrome and Firefox and will be added soon on Safari

Connect to the conference

Check our tutorial on conversation to have details about the conversation bases.


Activate call statitics monitoring and active speaker detection using following functions :

        ua.enableCallStatsMonitoring(true, {interval: 1000});
        ua.enableActiveSpeakerDetecting(true, 50);

Add event listeners for QoS statistics :

        apiRTC.addEventListener("onCallStatsUpdate", onCallStatsUpdateHandler);
        apiRTC.addEventListener("audioAmplitude", audioAmplitudeHandler);
        apiRTC.addEventListener("selectedICECandidate", selectedICECandidateHandler);

Display the information on your application

Check our sample source code to have a sample on how to display all QoS information on media streams

Define QoS options

You can define a starting and minimum video quality for your stream (bad, medium, good or excellent). If quality fall under minimum value, option "videoForbidInactive" will deactivate video until it becomes higher than minimum value.

Those preferences must be set in the publishOptions of your publish :

        var publishOptions = {};
        publishOptions.qos = {
            videoStartQuality: 'good',
            videoMinQuality: 'bad',
            videoForbidInactive: true
        connectedConversation.publish(localStream, publishOptions)
            .then(function(stream) {
                publishedStream = stream;
                console.log("publish success:" + stream);
            }).catch(function (err) {
                console.error('Conversation publish error', err);

Live Demo