new MockRTCStatsReport(statsMap)
Create a MockRTCStatsReport wrapper around a Map of RTCStats objects. If RTCStatsReport is available
natively, it will be inherited so that instanceof checks pass.
Parameters:
| Name | Type | Description |
|---|---|---|
statsMap |
Map.<string, RTCStats> | A Map of RTCStats objects to wrap with a MockRTCStatsReport object. |
- Source:
Extends
- RTCStatsReport
Methods
(static) fromArray(array) → {MockRTCStatsReport}
Convert an array of RTCStats objects into a mock RTCStatsReport object.
Parameters:
| Name | Type | Description |
|---|---|---|
array |
Array.<RTCStats> |
- Source:
Returns:
- Type
- MockRTCStatsReport
(static) fromRTCStatsResponse(statsResponse) → {MockRTCStatsReport}
Convert a legacy RTCStatsResponse object into a mock RTCStatsReport object.
Parameters:
| Name | Type | Description |
|---|---|---|
statsResponse |
RTCStatsResponse | An RTCStatsResponse object returned by the legacy getStats(callback) method in Chrome. |
- Source:
Returns:
A mock RTCStatsReport object.
- Type
- MockRTCStatsReport