es5/twilio/rtc/mockrtcstatsreport.js
/**
 * @param {RTCLegacyStatsReport} report
 * @param {boolean} isInbound - Whether to create an inbound stats object, or outbound.
 * @returns {RTCRTPStreamStats}
 */
@param {RTCLegacyStatsReport} report
@param {boolean} isInbound - Whether to create an inbound stats object, or outbound.
@param { RTCLegacyStatsReport } report @param { boolean } isInbound - Whether to create an inbound stats object or outbound .
function createRTCRTPStreamStats(report, isInbound) {
    return {
        id: report.id,
        timestamp: Date.parse(report.timestamp),
        ssrc: report.stat('ssrc'),
        associateStatsId: undefined,
        isRemote: undefined,
        mediaType: report.stat('mediaType'),
        trackId: "track-" + report.id,
        transportId: report.stat('transportId'),
        codecId: "codec-" + report.id,
        firCount: isInbound
            ? getInt(report, 'googFirsSent')
            : undefined,
        pliCount: isInbound
            ? getInt(report, 'googPlisSent')
            : getInt(report, 'googPlisReceived'),
        nackCount: isInbound
            ? getInt(report, 'googNacksSent')
            : getInt(report, 'googNacksReceived'),
        sliCount: undefined,
        qpSum: getInt(report, 'qpSum')
    };
}
function createRTCRTPStreamStats ( report , isInbound ) { return { id : report . id , timestamp : Date . parse ( report . timestamp ) , ssrc : report . stat ( 'ssrc' ) , associateStatsId : undefined , isRemote : undefined , mediaType : report . stat ( 'mediaType' ) , trackId : "track-" + report . id , transportId : report . stat ( 'transportId' ) , codecId : "codec-" + report . id , firCount : isInbound ? getInt ( report , 'googFirsSent' ) : undefined , pliCount : isInbound ? getInt ( report , 'googPlisSent' ) : getInt ( report , 'googPlisReceived' ) , nackCount : isInbound ? getInt ( report , 'googNacksSent' ) : getInt ( report , 'googNacksReceived' ) , sliCount : undefined , qpSum : getInt ( report , 'qpSum' ) } ; }
@param {RTCLegacyStatsReport} report
 @param {boolean} isInbound - Whether to create an inbound stats object, or outbound.
@param { RTCLegacyStatsReport } report @param { boolean } isInbound - Whether to create an inbound stats object or outbound .