es5/twilio/rtc/mockrtcstatsreport.js
/**
 * Create a MockRTCStatsReport wrapper around a Map of RTCStats objects. If RTCStatsReport is available
 *   natively, it will be inherited so that instanceof checks pass.
 * @constructor
 * @extends RTCStatsReport
 * @param {Map<string, RTCStats>} statsMap - A Map of RTCStats objects to wrap
 *   with a MockRTCStatsReport object.
 */
Create a MockRTCStatsReport wrapper around a Map of RTCStats objects. If RTCStatsReport is available
natively, it will be inherited so that instanceof checks pass.
@constructor
@extends RTCStatsReport
@param {Map} statsMap - A Map of RTCStats objects to wrap
with a MockRTCStatsReport object.
Create a MockRTCStatsReport wrapper around a Map of RTCStats objects . If RTCStatsReport is available natively it will be inherited so that instanceof checks pass . @constructor @extends RTCStatsReport @param { Map } statsMap - A Map of RTCStats objects to wrap with a MockRTCStatsReport object .
function MockRTCStatsReport(statsMap) {
    if (!(this instanceof MockRTCStatsReport)) {
        return new MockRTCStatsReport(statsMap);
    }
    var self = this;
    Object.defineProperties(this, {
        size: {
            enumerable: true,
            get: function () {
                return self._map.size;
            }
        },
        _map: { value: statsMap }
    });
    this[Symbol.iterator] = statsMap[Symbol.iterator];
}
function MockRTCStatsReport ( statsMap ) { if ( ! ( this instanceof MockRTCStatsReport ) ) { return new MockRTCStatsReport ( statsMap ) ; } var self = this ; Object . defineProperties ( this , { size : { enumerable : true , get : function ( ) { return self . _map . size ; } } , _map : { value : statsMap } } ) ; this [ Symbol . iterator ] = statsMap [ Symbol . iterator ] ; }
Create a MockRTCStatsReport wrapper around a Map of RTCStats objects.
Create a MockRTCStatsReport wrapper around a Map of RTCStats objects .