# Stats

The stats dictionaries of the WebRTC Statistics specification, and the report that holds them.

### *class* webrtc.models.rtc_stats.RTCStats(\*\*members)

The members every stats dictionary has, and the base of all of them.

A report holds the dictionary of the type of the stats, like [`webrtc.RTCOutboundRtpStreamStats`](#webrtc.models.rtc_stats.RTCOutboundRtpStreamStats). It holds
this base one for a type this library doesn’t model, or when a required member is missing from the stats.
Members are keyword-only. A string value that its enum lacks is kept as a plain [`str`](https://docs.python.org/3/builtins/stdtypes.html#str).

* **Parameters:**
  * **timestamp** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – When the stats were collected, in milliseconds since the Unix epoch.
  * **type** ([`webrtc.RTCStatsType`](../enums.md#webrtc.enums.RTCStatsType)) – The type of the stats, like `'outbound-rtp'`.
  * **id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Identifies the stats in its report.
* **Raises:**
  [**TypeError**](https://docs.python.org/3/builtins/exceptions.html#TypeError) – If a required member is missing, or a member is unknown.

### *class* webrtc.models.rtc_stats.RTCRtpStreamStats(\*\*members)

Stats of an RTP stream.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

* **Parameters:**
  * **ssrc** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – The SSRC of the RTP stream. See [MDN: RTCInboundRtpStreamStats/ssrc](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/ssrc).
  * **kind** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The kind of the media, `'audio'` or `'video'`. See [MDN: RTCInboundRtpStreamStats/kind](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/kind).
  * **transport_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the stats of the transport of the stream. See
    [MDN: RTCInboundRtpStreamStats/transportId](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/transportId).
  * **codec_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the stats of the codec of the stream. See
    [MDN: RTCInboundRtpStreamStats/codecId](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/codecId).

### *class* webrtc.models.rtc_stats.RTCCodecStats(\*\*members)

Stats of a codec negotiated on a transport, of type `'codec'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCCodecStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats).

* **Parameters:**
  * **payload_type** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – The RTP payload type of the codec. See [MDN: RTCCodecStats/payloadType](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats/payloadType).
  * **transport_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the stats of the transport the codec is negotiated on. See
    [MDN: RTCCodecStats/transportId](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats/transportId).
  * **mime_type** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The type and subtype of the codec, like `'audio/opus'`. See
    [MDN: RTCCodecStats/mimeType](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats/mimeType).
  * **clock_rate** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The clock rate in Hz. See [MDN: RTCCodecStats/clockRate](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats/clockRate).
  * **channels** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The number of audio channels. See [MDN: RTCCodecStats/channels](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats/channels).
  * **sdp_fmtp_line** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The parameters of the codec, as in the `a=fmtp` line of SDP. See
    [MDN: RTCCodecStats/sdpFmtpLine](https://developer.mozilla.org/en-US/docs/Web/API/RTCCodecStats/sdpFmtpLine).

### *class* webrtc.models.rtc_stats.RTCReceivedRtpStreamStats(\*\*members)

Stats of an RTP stream, as its receiver measures it.

It has the members of [`webrtc.RTCRtpStreamStats`](#webrtc.models.rtc_stats.RTCRtpStreamStats) too.

* **Parameters:**
  * **packets_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets received. See
    [MDN: RTCInboundRtpStreamStats/packetsReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/packetsReceived).
  * **packets_received_with_ect1** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets received with the ECT(1) ECN marking.
  * **packets_received_with_ce** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets received with the CE ECN marking.
  * **packets_reported_as_lost** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets reported lost in congestion control feedback.
  * **packets_reported_as_lost_but_recovered** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets reported lost that were received
    later.
  * **packets_lost** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets lost, as RTCP reports count them. See
    [MDN: RTCInboundRtpStreamStats/packetsLost](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/packetsLost).
  * **jitter** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The packet jitter in seconds. See [MDN: RTCInboundRtpStreamStats/jitter](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/jitter).

### *class* webrtc.models.rtc_stats.RTCInboundRtpStreamStats(\*\*members)

Stats of an RTP stream the connection receives, of type `'inbound-rtp'`.

It has the members of [`webrtc.RTCReceivedRtpStreamStats`](#webrtc.models.rtc_stats.RTCReceivedRtpStreamStats) too.

See [MDN: RTCInboundRtpStreamStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats).

* **Parameters:**
  * **track_identifier** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the track. See [MDN: RTCInboundRtpStreamStats/trackIdentifier](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/trackIdentifier).
  * **mid** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The media id of the transceiver. See [MDN: RTCInboundRtpStreamStats/mid](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/mid).
  * **remote_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the remote-outbound-rtp stats of the stream. See
    [MDN: RTCInboundRtpStreamStats/remoteId](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/remoteId).
  * **frames_decoded** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames decoded. See [MDN: RTCInboundRtpStreamStats/framesDecoded](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/framesDecoded).
  * **key_frames_decoded** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The key frames decoded. See
    [MDN: RTCInboundRtpStreamStats/keyFramesDecoded](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/keyFramesDecoded).
  * **frames_rendered** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames rendered.
  * **frames_dropped** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames dropped before decoding.
  * **frame_width** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The width of the last frame. See [MDN: RTCInboundRtpStreamStats/frameWidth](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/frameWidth).
  * **frame_height** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The height of the last frame. See
    [MDN: RTCInboundRtpStreamStats/frameHeight](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/frameHeight).
  * **frames_per_second** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The frames per second over the last second. See
    [MDN: RTCInboundRtpStreamStats/framesPerSecond](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/framesPerSecond).
  * **qp_sum** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The sum of the quantization parameters of the frames. See
    [MDN: RTCInboundRtpStreamStats/qpSum](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/qpSum).
  * **total_decode_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds spent decoding. See
    [MDN: RTCInboundRtpStreamStats/totalDecodeTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalDecodeTime).
  * **total_inter_frame_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds between rendered frames. See
    [MDN: RTCInboundRtpStreamStats/totalInterFrameDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalInterFrameDelay).
  * **total_squared_inter_frame_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sum of the squared seconds between rendered
    frames. See [MDN: RTCInboundRtpStreamStats/totalSquaredInterFrameDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalSquaredInterFrameDelay).
  * **pause_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The video pauses. See [MDN: RTCInboundRtpStreamStats/pauseCount](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/pauseCount).
  * **total_pauses_duration** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the pauses. See
    [MDN: RTCInboundRtpStreamStats/totalPausesDuration](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalPausesDuration).
  * **freeze_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The video freezes. See [MDN: RTCInboundRtpStreamStats/freezeCount](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/freezeCount).
  * **total_freezes_duration** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the freezes. See
    [MDN: RTCInboundRtpStreamStats/totalFreezesDuration](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalFreezesDuration).
  * **last_packet_received_timestamp** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – When the last packet was received, in milliseconds
    since the epoch. See [MDN: RTCInboundRtpStreamStats/lastPacketReceivedTimestamp](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/lastPacketReceivedTimestamp).
  * **header_bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes of RTP headers and padding received. See
    [MDN: RTCInboundRtpStreamStats/headerBytesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/headerBytesReceived).
  * **packets_discarded** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets the jitter buffer discarded. See
    [MDN: RTCInboundRtpStreamStats/packetsDiscarded](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/packetsDiscarded).
  * **fec_bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes of FEC payload received.
  * **fec_packets_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The FEC packets received. See
    [MDN: RTCInboundRtpStreamStats/fecPacketsReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/fecPacketsReceived).
  * **fec_packets_discarded** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The FEC packets discarded. See
    [MDN: RTCInboundRtpStreamStats/fecPacketsDiscarded](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/fecPacketsDiscarded).
  * **bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes received. See [MDN: RTCInboundRtpStreamStats/bytesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/bytesReceived).
  * **nack_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The NACK packets. See [MDN: RTCInboundRtpStreamStats/nackCount](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/nackCount).
  * **fir_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The FIR packets.
  * **pli_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The PLI packets.
  * **total_processing_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds from receiving frames or samples to decoding
    them. See [MDN: RTCInboundRtpStreamStats/totalProcessingDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalProcessingDelay).
  * **estimated_playout_timestamp** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – When the last frame or sample is estimated to play out, in
    milliseconds since the epoch. See [MDN: RTCInboundRtpStreamStats/estimatedPlayoutTimestamp](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/estimatedPlayoutTimestamp).
  * **jitter_buffer_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds frames or samples spent in the jitter buffer.
    See [MDN: RTCInboundRtpStreamStats/jitterBufferDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/jitterBufferDelay).
  * **jitter_buffer_target_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sum of the target delays of the jitter buffer, in
    seconds. See [MDN: RTCInboundRtpStreamStats/jitterBufferTargetDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/jitterBufferTargetDelay).
  * **jitter_buffer_emitted_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames or samples that left the jitter buffer. See
    [MDN: RTCInboundRtpStreamStats/jitterBufferEmittedCount](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/jitterBufferEmittedCount).
  * **jitter_buffer_minimum_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sum of the minimum delays of the jitter buffer, in
    seconds. See [MDN: RTCInboundRtpStreamStats/jitterBufferMinimumDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/jitterBufferMinimumDelay).
  * **total_samples_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The audio samples received. See
    [MDN: RTCInboundRtpStreamStats/totalSamplesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalSamplesReceived).
  * **concealed_samples** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The audio samples concealed. See
    [MDN: RTCInboundRtpStreamStats/concealedSamples](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/concealedSamples).
  * **silent_concealed_samples** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The audio samples concealed with silence. See
    [MDN: RTCInboundRtpStreamStats/silentConcealedSamples](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/silentConcealedSamples).
  * **concealment_events** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The concealment events. See
    [MDN: RTCInboundRtpStreamStats/concealmentEvents](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/concealmentEvents).
  * **inserted_samples_for_deceleration** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The audio samples inserted to slow playout down. See
    [MDN: RTCInboundRtpStreamStats/insertedSamplesForDeceleration](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/insertedSamplesForDeceleration).
  * **removed_samples_for_acceleration** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The audio samples removed to speed playout up. See
    [MDN: RTCInboundRtpStreamStats/removedSamplesForAcceleration](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/removedSamplesForAcceleration).
  * **audio_level** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The audio level, between 0 and 1. See
    [MDN: RTCInboundRtpStreamStats/audioLevel](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/audioLevel).
  * **total_audio_energy** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total audio energy. See
    [MDN: RTCInboundRtpStreamStats/totalAudioEnergy](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalAudioEnergy).
  * **total_samples_duration** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the audio samples. See
    [MDN: RTCInboundRtpStreamStats/totalSamplesDuration](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalSamplesDuration).
  * **frames_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The complete frames received. See
    [MDN: RTCInboundRtpStreamStats/framesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/framesReceived).
  * **decoder_implementation** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The decoder, like `libvpx`.
  * **playout_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the media-playout stats of the audio. See
    [MDN: RTCInboundRtpStreamStats/playoutId](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/playoutId).
  * **power_efficient_decoder** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – Whether the decoder is power efficient.
  * **frames_assembled_from_multiple_packets** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames assembled from more than one packet.
    See [MDN: RTCInboundRtpStreamStats/framesAssembledFromMultiplePackets](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/framesAssembledFromMultiplePackets).
  * **total_assembly_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds spent assembling those frames. See
    [MDN: RTCInboundRtpStreamStats/totalAssemblyTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCInboundRtpStreamStats/totalAssemblyTime).
  * **retransmitted_packets_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The retransmitted packets received.
  * **retransmitted_bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes of retransmitted payload received.
  * **rtx_ssrc** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The SSRC of the RTX stream.
  * **fec_ssrc** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The SSRC of the FEC stream.
  * **total_corruption_probability** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sum of the probabilities of video corruption.
  * **total_squared_corruption_probability** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sum of the squared probabilities of video
    corruption.
  * **corruption_measurements** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The video corruption measurements.

### *class* webrtc.models.rtc_stats.RTCRemoteInboundRtpStreamStats(\*\*members)

Stats of a stream the connection sends, as the remote peer receives it. Its type is `'remote-inbound-rtp'`.

It has the members of [`webrtc.RTCReceivedRtpStreamStats`](#webrtc.models.rtc_stats.RTCReceivedRtpStreamStats) too.

See [MDN: RTCRemoteInboundRtpStreamStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats).

* **Parameters:**
  * **local_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the outbound-rtp stats of the stream. See
    [MDN: RTCRemoteInboundRtpStreamStats/localId](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/localId).
  * **round_trip_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The last round trip time in seconds. See
    [MDN: RTCRemoteInboundRtpStreamStats/roundTripTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/roundTripTime).
  * **total_round_trip_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the round trip times. See
    [MDN: RTCRemoteInboundRtpStreamStats/totalRoundTripTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/totalRoundTripTime).
  * **fraction_lost** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The fraction of packets lost in the last RTCP report. See
    [MDN: RTCRemoteInboundRtpStreamStats/fractionLost](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/fractionLost).
  * **round_trip_time_measurements** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The round trip time measurements. See
    [MDN: RTCRemoteInboundRtpStreamStats/roundTripTimeMeasurements](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteInboundRtpStreamStats/roundTripTimeMeasurements).
  * **packets_with_bleached_ect1_marking** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets sent with ECT(1) that arrived without it.

### *class* webrtc.models.rtc_stats.RTCSentRtpStreamStats(\*\*members)

Stats of an RTP stream, as its sender measures it.

It has the members of [`webrtc.RTCRtpStreamStats`](#webrtc.models.rtc_stats.RTCRtpStreamStats) too.

* **Parameters:**
  * **packets_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets sent. See [MDN: RTCOutboundRtpStreamStats/packetsSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/packetsSent).
  * **bytes_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes sent. See [MDN: RTCOutboundRtpStreamStats/bytesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/bytesSent).

### *class* webrtc.models.rtc_stats.RTCOutboundRtpStreamStats(\*\*members)

Stats of an RTP stream the connection sends, of type `'outbound-rtp'`.

It has the members of [`webrtc.RTCSentRtpStreamStats`](#webrtc.models.rtc_stats.RTCSentRtpStreamStats) too.

See [MDN: RTCOutboundRtpStreamStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats).

* **Parameters:**
  * **mid** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The media id of the transceiver. See [MDN: RTCOutboundRtpStreamStats/mid](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/mid).
  * **media_source_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the media-source stats of the track sent. See
    [MDN: RTCOutboundRtpStreamStats/mediaSourceId](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/mediaSourceId).
  * **remote_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the remote-inbound-rtp stats of the stream. See
    [MDN: RTCOutboundRtpStreamStats/remoteId](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/remoteId).
  * **rid** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The RTP stream id of the simulcast layer. See [MDN: RTCOutboundRtpStreamStats/rid](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/rid).
  * **encoding_index** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The index of the encoding in the parameters of the sender.
  * **header_bytes_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes of RTP headers and padding sent. See
    [MDN: RTCOutboundRtpStreamStats/headerBytesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/headerBytesSent).
  * **retransmitted_packets_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets retransmitted. See
    [MDN: RTCOutboundRtpStreamStats/retransmittedPacketsSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/retransmittedPacketsSent).
  * **retransmitted_bytes_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes of payload retransmitted. See
    [MDN: RTCOutboundRtpStreamStats/retransmittedBytesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/retransmittedBytesSent).
  * **rtx_ssrc** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The SSRC of the RTX stream.
  * **target_bitrate** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The target bitrate of the encoder, in bits per second. See
    [MDN: RTCOutboundRtpStreamStats/targetBitrate](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/targetBitrate).
  * **total_encoded_bytes_target** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The sum of the target sizes of the encoded frames, in bytes.
    See [MDN: RTCOutboundRtpStreamStats/totalEncodedBytesTarget](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/totalEncodedBytesTarget).
  * **frame_width** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The width of the last frame. See
    [MDN: RTCOutboundRtpStreamStats/frameWidth](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/frameWidth).
  * **frame_height** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The height of the last frame. See
    [MDN: RTCOutboundRtpStreamStats/frameHeight](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/frameHeight).
  * **frames_per_second** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The frames per second over the last second. See
    [MDN: RTCOutboundRtpStreamStats/framesPerSecond](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/framesPerSecond).
  * **frames_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames sent. See [MDN: RTCOutboundRtpStreamStats/framesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/framesSent).
  * **huge_frames_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The huge frames sent, like key frames.
  * **frames_encoded** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames encoded. See [MDN: RTCOutboundRtpStreamStats/framesEncoded](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/framesEncoded).
  * **key_frames_encoded** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The key frames encoded. See
    [MDN: RTCOutboundRtpStreamStats/keyFramesEncoded](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/keyFramesEncoded).
  * **qp_sum** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The sum of the quantization parameters of the frames. See
    [MDN: RTCOutboundRtpStreamStats/qpSum](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/qpSum).
  * **psnr_sum** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) of [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) to [`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sums of the PSNR of the encoded frames, by
    component (`y`, `u`, `v`).
  * **psnr_measurements** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The PSNR measurements.
  * **total_encode_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds spent encoding. See
    [MDN: RTCOutboundRtpStreamStats/totalEncodeTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/totalEncodeTime).
  * **total_packet_send_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds packets waited to be sent. See
    [MDN: RTCOutboundRtpStreamStats/totalPacketSendDelay](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/totalPacketSendDelay).
  * **quality_limitation_reason** ([`webrtc.RTCQualityLimitationReason`](../enums.md#webrtc.enums.RTCQualityLimitationReason), optional) – What limits the resolution or
    frame rate the most. See [MDN: RTCOutboundRtpStreamStats/qualityLimitationReason](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/qualityLimitationReason).
  * **quality_limitation_durations** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) of [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) to [`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The seconds limited by each
    reason. See [MDN: RTCOutboundRtpStreamStats/qualityLimitationDurations](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/qualityLimitationDurations).
  * **quality_limitation_resolution_changes** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The resolution changes because of quality
    limitations.
  * **nack_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The NACK packets. See [MDN: RTCOutboundRtpStreamStats/nackCount](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/nackCount).
  * **fir_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The FIR packets.
  * **pli_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The PLI packets.
  * **encoder_implementation** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The encoder, like `libvpx`.
  * **power_efficient_encoder** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – Whether the encoder is power efficient.
  * **active** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – Whether the encoding is sent. See [MDN: RTCOutboundRtpStreamStats/active](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/active).
  * **scalability_mode** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The scalability mode, like `'L1T3'`. See
    [MDN: RTCOutboundRtpStreamStats/scalabilityMode](https://developer.mozilla.org/en-US/docs/Web/API/RTCOutboundRtpStreamStats/scalabilityMode).
  * **packets_sent_with_ect1** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets sent with the ECT(1) ECN marking.

### *class* webrtc.models.rtc_stats.RTCRemoteOutboundRtpStreamStats(\*\*members)

Stats of a stream the connection receives, as the remote peer sends it. Its type is `'remote-outbound-rtp'`.

It has the members of [`webrtc.RTCSentRtpStreamStats`](#webrtc.models.rtc_stats.RTCSentRtpStreamStats) too.

See [MDN: RTCRemoteOutboundRtpStreamStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats).

* **Parameters:**
  * **local_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the inbound-rtp stats of the stream. See
    [MDN: RTCRemoteOutboundRtpStreamStats/localId](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/localId).
  * **remote_timestamp** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – When the remote peer sent its report, in milliseconds since the
    epoch. See [MDN: RTCRemoteOutboundRtpStreamStats/remoteTimestamp](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/remoteTimestamp).
  * **reports_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The RTCP sender reports sent.
  * **round_trip_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The last round trip time in seconds.
  * **total_round_trip_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the round trip times. See
    [MDN: RTCRemoteOutboundRtpStreamStats/totalRoundTripTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/totalRoundTripTime).
  * **round_trip_time_measurements** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The round trip time measurements. See
    [MDN: RTCRemoteOutboundRtpStreamStats/roundTripTimeMeasurements](https://developer.mozilla.org/en-US/docs/Web/API/RTCRemoteOutboundRtpStreamStats/roundTripTimeMeasurements).

### *class* webrtc.models.rtc_stats.RTCMediaSourceStats(\*\*members)

Stats of a track a sender sends, of type `'media-source'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

* **Parameters:**
  * **track_identifier** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the track. See [MDN: RTCAudioSourceStats/trackIdentifier](https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats/trackIdentifier).
  * **kind** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The kind of the track, `'audio'` or `'video'`. See [MDN: RTCAudioSourceStats/kind](https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats/kind).

### *class* webrtc.models.rtc_stats.RTCAudioSourceStats(\*\*members)

Stats of an audio track a sender sends, of type `'media-source'`.

It has the members of [`webrtc.RTCMediaSourceStats`](#webrtc.models.rtc_stats.RTCMediaSourceStats) too.

See [MDN: RTCAudioSourceStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats).

* **Parameters:**
  * **audio_level** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The audio level, between 0 and 1. See
    [MDN: RTCAudioSourceStats/audioLevel](https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats/audioLevel).
  * **total_audio_energy** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total audio energy. See
    [MDN: RTCAudioSourceStats/totalAudioEnergy](https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats/totalAudioEnergy).
  * **total_samples_duration** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the audio samples. See
    [MDN: RTCAudioSourceStats/totalSamplesDuration](https://developer.mozilla.org/en-US/docs/Web/API/RTCAudioSourceStats/totalSamplesDuration).
  * **echo_return_loss** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The echo return loss in decibels.
  * **echo_return_loss_enhancement** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The echo return loss enhancement in decibels.

### *class* webrtc.models.rtc_stats.RTCVideoSourceStats(\*\*members)

Stats of a video track a sender sends, of type `'media-source'`.

It has the members of [`webrtc.RTCMediaSourceStats`](#webrtc.models.rtc_stats.RTCMediaSourceStats) too.

See [MDN: RTCVideoSourceStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCVideoSourceStats).

* **Parameters:**
  * **width** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The width of the last frame. See [MDN: RTCVideoSourceStats/width](https://developer.mozilla.org/en-US/docs/Web/API/RTCVideoSourceStats/width).
  * **height** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The height of the last frame. See [MDN: RTCVideoSourceStats/height](https://developer.mozilla.org/en-US/docs/Web/API/RTCVideoSourceStats/height).
  * **frames** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The frames from the source. See [MDN: RTCVideoSourceStats/frames](https://developer.mozilla.org/en-US/docs/Web/API/RTCVideoSourceStats/frames).
  * **frames_per_second** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The frames per second over the last second. See
    [MDN: RTCVideoSourceStats/framesPerSecond](https://developer.mozilla.org/en-US/docs/Web/API/RTCVideoSourceStats/framesPerSecond).

### *class* webrtc.models.rtc_stats.RTCAudioPlayoutStats(\*\*members)

Stats of the playout of received audio, of type `'media-playout'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

* **Parameters:**
  * **kind** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The kind of the media, `'audio'`.
  * **synthesized_samples_duration** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of samples synthesized for playout.
  * **synthesized_samples_events** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The events of synthesizing samples.
  * **total_samples_duration** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of samples played out.
  * **total_playout_delay** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The sum of the playout delays of the samples, in seconds.
  * **total_samples_count** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The samples played out.

### *class* webrtc.models.rtc_stats.RTCPeerConnectionStats(\*\*members)

Stats of the connection, of type `'peer-connection'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCPeerConnectionStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionStats).

* **Parameters:**
  * **data_channels_opened** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The data channels opened. See
    [MDN: RTCPeerConnectionStats/dataChannelsOpened](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionStats/dataChannelsOpened).
  * **data_channels_closed** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The data channels closed. See
    [MDN: RTCPeerConnectionStats/dataChannelsClosed](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionStats/dataChannelsClosed).

### *class* webrtc.models.rtc_stats.RTCDataChannelStats(\*\*members)

Stats of a data channel, of type `'data-channel'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCDataChannelStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats).

* **Parameters:**
  * **label** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The label of the channel. See [MDN: RTCDataChannelStats/label](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/label).
  * **protocol** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The subprotocol of the channel. See [MDN: RTCDataChannelStats/protocol](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/protocol).
  * **data_channel_identifier** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The id of the channel. See
    [MDN: RTCDataChannelStats/dataChannelIdentifier](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/dataChannelIdentifier).
  * **state** ([`webrtc.RTCDataChannelState`](../enums.md#webrtc.enums.RTCDataChannelState)) – The state of the channel. See [MDN: RTCDataChannelStats/state](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/state).
  * **messages_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The messages sent. See [MDN: RTCDataChannelStats/messagesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/messagesSent).
  * **bytes_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes sent. See [MDN: RTCDataChannelStats/bytesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/bytesSent).
  * **messages_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The messages received. See
    [MDN: RTCDataChannelStats/messagesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/messagesReceived).
  * **bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes received. See [MDN: RTCDataChannelStats/bytesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelStats/bytesReceived).

### *class* webrtc.models.rtc_stats.RTCTransportStats(\*\*members)

Stats of a transport, of type `'transport'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCTransportStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats).

* **Parameters:**
  * **packets_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets sent. See [MDN: RTCTransportStats/packetsSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/packetsSent).
  * **packets_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets received. See [MDN: RTCTransportStats/packetsReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/packetsReceived).
  * **bytes_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes sent. See [MDN: RTCTransportStats/bytesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/bytesSent).
  * **bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes received. See [MDN: RTCTransportStats/bytesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/bytesReceived).
  * **ice_role** ([`webrtc.RTCIceRole`](../enums.md#webrtc.enums.RTCIceRole), optional) – The ICE role. See [MDN: RTCTransportStats/iceRole](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/iceRole).
  * **ice_local_username_fragment** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The local ICE username fragment. See
    [MDN: RTCTransportStats/iceLocalUsernameFragment](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/iceLocalUsernameFragment).
  * **dtls_state** ([`webrtc.RTCDtlsTransportState`](../enums.md#webrtc.enums.RTCDtlsTransportState)) – The DTLS state. See [MDN: RTCTransportStats/dtlsState](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/dtlsState).
  * **ice_state** ([`webrtc.RTCIceTransportState`](../enums.md#webrtc.enums.RTCIceTransportState), optional) – The ICE state. See [MDN: RTCTransportStats/iceState](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/iceState).
  * **selected_candidate_pair_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the stats of the selected candidate pair. See
    [MDN: RTCTransportStats/selectedCandidatePairId](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/selectedCandidatePairId).
  * **local_certificate_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the stats of the local certificate. See
    [MDN: RTCTransportStats/localCertificateId](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/localCertificateId).
  * **remote_certificate_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the stats of the remote certificate. See
    [MDN: RTCTransportStats/remoteCertificateId](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/remoteCertificateId).
  * **tls_version** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The DTLS version, in hex. See [MDN: RTCTransportStats/tlsVersion](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/tlsVersion).
  * **dtls_cipher** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The DTLS cipher suite. See [MDN: RTCTransportStats/dtlsCipher](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/dtlsCipher).
  * **dtls_role** ([`webrtc.RTCDtlsRole`](../enums.md#webrtc.enums.RTCDtlsRole), optional) – The DTLS role. See [MDN: RTCTransportStats/dtlsRole](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/dtlsRole).
  * **srtp_cipher** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The SRTP protection profile. See [MDN: RTCTransportStats/srtpCipher](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/srtpCipher).
  * **selected_candidate_pair_changes** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The changes of the selected candidate pair. See
    [MDN: RTCTransportStats/selectedCandidatePairChanges](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransportStats/selectedCandidatePairChanges).
  * **ccfb_messages_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The congestion control feedback messages sent.
  * **ccfb_messages_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The congestion control feedback messages received.

### *class* webrtc.models.rtc_stats.RTCIceCandidateStats(\*\*members)

Stats of an ICE candidate, of type `'local-candidate'` or `'remote-candidate'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCIceCandidateStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats).

* **Parameters:**
  * **transport_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the stats of the transport of the candidate. See
    [MDN: RTCIceCandidateStats/transportId](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/transportId).
  * **address** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The address of the candidate, or [`None`](https://docs.python.org/3/builtins/constants.html#None) if it isn’t exposed. See
    [MDN: RTCIceCandidateStats/address](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/address).
  * **port** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The port. See [MDN: RTCIceCandidateStats/port](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/port).
  * **protocol** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The protocol, `'udp'` or `'tcp'`. See [MDN: RTCIceCandidateStats/protocol](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/protocol).
  * **candidate_type** ([`webrtc.RTCIceCandidateType`](../enums.md#webrtc.enums.RTCIceCandidateType)) – The type of the candidate. See
    [MDN: RTCIceCandidateStats/candidateType](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/candidateType).
  * **priority** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The priority. See [MDN: RTCIceCandidateStats/priority](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/priority).
  * **url** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The URL of the ICE server the candidate is from. See
    [MDN: RTCIceCandidateStats/url](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/url).
  * **relay_protocol** ([`webrtc.RTCIceServerTransportProtocol`](../enums.md#webrtc.enums.RTCIceServerTransportProtocol), optional) – The protocol between the client and the
    TURN server. See [MDN: RTCIceCandidateStats/relayProtocol](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/relayProtocol).
  * **foundation** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The foundation. See [MDN: RTCIceCandidateStats/foundation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/foundation).
  * **related_address** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The related address.
  * **related_port** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The related port.
  * **username_fragment** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The ICE username fragment. See
    [MDN: RTCIceCandidateStats/usernameFragment](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidateStats/usernameFragment).
  * **tcp_type** ([`webrtc.RTCIceTcpCandidateType`](../enums.md#webrtc.enums.RTCIceTcpCandidateType), optional) – The type of a TCP candidate.

### *class* webrtc.models.rtc_stats.RTCIceCandidatePairStats(\*\*members)

Stats of an ICE candidate pair, of type `'candidate-pair'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCIceCandidatePairStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats).

* **Parameters:**
  * **transport_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the stats of the transport of the pair. See
    [MDN: RTCIceCandidatePairStats/transportId](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/transportId).
  * **local_candidate_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the stats of the local candidate. See
    [MDN: RTCIceCandidatePairStats/localCandidateId](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/localCandidateId).
  * **remote_candidate_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The id of the stats of the remote candidate. See
    [MDN: RTCIceCandidatePairStats/remoteCandidateId](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/remoteCandidateId).
  * **state** ([`webrtc.RTCStatsIceCandidatePairState`](../enums.md#webrtc.enums.RTCStatsIceCandidatePairState)) – The state of the pair in the checklist. See
    [MDN: RTCIceCandidatePairStats/state](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/state).
  * **nominated** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), optional) – Whether the pair is nominated. See [MDN: RTCIceCandidatePairStats/nominated](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/nominated).
  * **packets_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets sent. See [MDN: RTCIceCandidatePairStats/packetsSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/packetsSent).
  * **packets_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets received. See
    [MDN: RTCIceCandidatePairStats/packetsReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/packetsReceived).
  * **bytes_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes sent. See [MDN: RTCIceCandidatePairStats/bytesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/bytesSent).
  * **bytes_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes received. See [MDN: RTCIceCandidatePairStats/bytesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/bytesReceived).
  * **last_packet_sent_timestamp** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – When the last packet was sent, in milliseconds since the
    epoch. See [MDN: RTCIceCandidatePairStats/lastPacketSentTimestamp](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/lastPacketSentTimestamp).
  * **last_packet_received_timestamp** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – When the last packet was received, in milliseconds
    since the epoch. See [MDN: RTCIceCandidatePairStats/lastPacketReceivedTimestamp](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/lastPacketReceivedTimestamp).
  * **total_round_trip_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The total seconds of the round trip times of STUN requests. See
    [MDN: RTCIceCandidatePairStats/totalRoundTripTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/totalRoundTripTime).
  * **current_round_trip_time** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The last round trip time of STUN requests, in seconds. See
    [MDN: RTCIceCandidatePairStats/currentRoundTripTime](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/currentRoundTripTime).
  * **available_outgoing_bitrate** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The estimated outgoing bitrate available, in bits per
    second. See [MDN: RTCIceCandidatePairStats/availableOutgoingBitrate](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/availableOutgoingBitrate).
  * **available_incoming_bitrate** ([`float`](https://docs.python.org/3/builtins/functions.html#float), optional) – The estimated incoming bitrate available, in bits per
    second. See [MDN: RTCIceCandidatePairStats/availableIncomingBitrate](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/availableIncomingBitrate).
  * **requests_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The connectivity check requests received. See
    [MDN: RTCIceCandidatePairStats/requestsReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/requestsReceived).
  * **requests_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The connectivity check requests sent. See
    [MDN: RTCIceCandidatePairStats/requestsSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/requestsSent).
  * **responses_received** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The connectivity check responses received. See
    [MDN: RTCIceCandidatePairStats/responsesReceived](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/responsesReceived).
  * **responses_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The connectivity check responses sent. See
    [MDN: RTCIceCandidatePairStats/responsesSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/responsesSent).
  * **consent_requests_sent** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The consent requests sent. See
    [MDN: RTCIceCandidatePairStats/consentRequestsSent](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/consentRequestsSent).
  * **packets_discarded_on_send** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The packets that failed to be sent. See
    [MDN: RTCIceCandidatePairStats/packetsDiscardedOnSend](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/packetsDiscardedOnSend).
  * **bytes_discarded_on_send** ([`int`](https://docs.python.org/3/builtins/functions.html#int), optional) – The bytes that failed to be sent. See
    [MDN: RTCIceCandidatePairStats/bytesDiscardedOnSend](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidatePairStats/bytesDiscardedOnSend).

### *class* webrtc.models.rtc_stats.RTCCertificateStats(\*\*members)

Stats of a certificate, of type `'certificate'`.

It has the members of [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats) too.

See [MDN: RTCCertificateStats](https://developer.mozilla.org/en-US/docs/Web/API/RTCCertificateStats).

* **Parameters:**
  * **fingerprint** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The fingerprint of the certificate. See [MDN: RTCCertificateStats/fingerprint](https://developer.mozilla.org/en-US/docs/Web/API/RTCCertificateStats/fingerprint).
  * **fingerprint_algorithm** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The hash function of the fingerprint, like `'sha-256'`. See
    [MDN: RTCCertificateStats/fingerprintAlgorithm](https://developer.mozilla.org/en-US/docs/Web/API/RTCCertificateStats/fingerprintAlgorithm).
  * **base64_certificate** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The DER of the certificate, in base64. See
    [MDN: RTCCertificateStats/base64Certificate](https://developer.mozilla.org/en-US/docs/Web/API/RTCCertificateStats/base64Certificate).
  * **issuer_certificate_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str), optional) – The id of the stats of the issuer certificate. See
    [MDN: RTCCertificateStats/issuerCertificateId](https://developer.mozilla.org/en-US/docs/Web/API/RTCCertificateStats/issuerCertificateId).

### *class* webrtc.models.rtc_stats.RTCStatsReport(stats)

The stats of a connection, a sender or a receiver, as a read-only mapping of stats ids to stats.

Each value is the dictionary of its type, like [`webrtc.RTCInboundRtpStreamStats`](#webrtc.models.rtc_stats.RTCInboundRtpStreamStats) for `'inbound-rtp'`.
The `track_identifier` of inbound RTP stats is the [`webrtc.MediaStreamTrack.id`](../interfaces/media_stream_track.md#webrtc.interfaces.media_stream_track.MediaStreamTrack.id) of the remote track, and
the `address` of a candidate is [`None`](https://docs.python.org/3/builtins/constants.html#None) when it isn’t exposed, like for peer-reflexive ones.

See [MDN: RTCStatsReport](https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport).

* **Parameters:**
  **stats** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) of [`str`](https://docs.python.org/3/builtins/stdtypes.html#str) to [`webrtc.RTCStats`](#webrtc.models.rtc_stats.RTCStats)) – The stats, by their ids.
