首页 > 解决方案 > 如何在 Firefox 中获取 webrtc 抖动缓冲区?

问题描述

我正在使用 webrtc peerconnection.getstats 来获取各种参数来检查 Firefox 中的通话质量。我想获取抖动缓冲区参数,但它没有在 getstats 响应中公开(但它在 chrome 中可用)。缓冲区也显示在 about:webrtc 页面中:

火狐统计

有没有办法在 Firefox 中获得这个抖动缓冲区?

编辑:添加代码

var pc = rtcPeerConnection;(for representation coding done elsewhere)
pc.getStats().then( function (stats) {
    for (var [key, res] of stats) {
        if( res.type == "outboundrtp" || res.type == "inboundrtp" && !res.isRemote ) {
            //expecting jitte-buffer here 
            //other params like packetslost, jitter are available here
        }
    }
}

标签: firefoxwebrtcrtcpeerconnection

解决方案


推荐阅读