大网数据广告活动
Web 标准与前端开发

RTCInboundRtpStreamStats

· 52CE 我爱测

The **`RTCInboundRtpStreamStats`** dictionary of the WebRTC API is used to report statistics related to the receiving end of an RTP stream on the local end of the RTCPeerConnection.

WebRTC

The RTCInboundRtpStreamStats dictionary of the WebRTC API is used to report statistics related to the receiving end of an RTP stream on the local end of the RTCPeerConnection.

The statistics can be obtained by iterating the RTCStatsReport returned by RTCPeerConnection.getStats() or RTCRtpReceiver.getStats() until you find a report with the type of inbound-rtp.

Instance properties

  • RTCInboundRtpStreamStats.audioLevel
    • : A number that indicates the audio level of the received track. Undefined for video streams.
  • RTCInboundRtpStreamStats.bytesReceived
    • : A positive integer that indicates the total number of bytes that have been received so far for this media source.
  • RTCInboundRtpStreamStats.concealedSamples
    • : A positive integer that indicates the number of samples that had to be concealed because they were in packets that were lost or arrived too late to be played out. Undefined for video streams.
  • RTCInboundRtpStreamStats.concealmentEvents
    • : A positive integer that indicates the number of concealment events, where a single event is counted for all consecutive concealed samples following a non-concealed sample. Undefined for video streams.
  • RTCInboundRtpStreamStats.estimatedPlayoutTimestamp
    • : A DOMHighResTimeStamp that indicates the estimated playout time of this receiver's track.
  • RTCInboundRtpStreamStats.fecPacketsDiscarded
    • : A positive integer value that indicates the number of RTP Forward Error Correction (FEC) packets which have been received for this source, for which the error correction payload was discarded.
  • RTCInboundRtpStreamStats.fecPacketsReceived
    • : A positive integer value that indicates the total number of Forward Error Correction (FEC) packets received for this source.
  • RTCInboundRtpStreamStats.frameHeight
    • : A positive integer that indicates the height of the last decoded frame, in pixels. Undefined for audio streams and before the first frame is decoded.
  • RTCInboundRtpStreamStats.framesAssembledFromMultiplePackets
    • : A positive integer that indicates the total number of correctly decoded frames for this RTP stream that consist of more than one RTP packet. Undefined for audio streams.
  • RTCInboundRtpStreamStats.framesDecoded
    • : A long integer value that indicates the total number of frames of video which have been correctly decoded so far for this media source. This is the number of frames that would have been rendered if none were dropped. Undefined for audio streams.
  • RTCInboundRtpStreamStats.framesPerSecond
    • : A positive integer that indicates the number of frames decoded in the last second. Undefined for audio streams.
  • RTCInboundRtpStreamStats.framesReceived
    • : A positive integer that indicates the total number of complete frames received on this RTP stream. Undefined for audio streams.
  • RTCInboundRtpStreamStats.frameWidth
    • : A positive integer that indicates the width of the last decoded frame, in pixels. Undefined for audio streams and before the first frame is decoded.
  • RTCInboundRtpStreamStats.freezeCount
    • : A positive integer that indicates the total number of video freezes experienced by this receiver. Undefined for audio streams.
  • RTCInboundRtpStreamStats.headerBytesReceived
    • : A positive integer that indicates the total number of RTP header and padding bytes received for this SSRC, including retransmissions.
  • RTCInboundRtpStreamStats.insertedSamplesForDeceleration
    • : A positive integer that indicates the number of samples inserted to slow playout from the jitter buffer. Undefined for video streams.
  • RTCInboundRtpStreamStats.jitterBufferDelay
    • : A number that indicates the accumulated time that all audio samples and complete video frames have spent in the jitter buffer, in seconds.
  • RTCInboundRtpStreamStats.jitterBufferEmittedCount
    • : A positive integer indicating the total number of audio samples and/or video frames that have come out of the jitter buffer.
  • RTCInboundRtpStreamStats.jitterBufferMinimumDelay
    • : A number that indicates the minimum delay that might be achieved given only the network characteristics such as jitter and packet loss.
  • RTCInboundRtpStreamStats.jitterBufferTargetDelay
    • : A number that indicates the accumulated target jitter buffer delay.
  • RTCInboundRtpStreamStats.keyFramesDecoded
    • : A positive integer that indicates the total number of key frames successfully decoded for this RTP media stream. Undefined for audio streams.
  • RTCInboundRtpStreamStats.lastPacketReceivedTimestamp
    • : A DOMHighResTimeStamp that indicates the time at which the last packet was received for this source. The timestamp property, on the other hand, indicates the time at which the statistics object was generated.
  • RTCInboundRtpStreamStats.mid
    • : A string that uniquely identifies the pairing of source and destination of the transceiver's stream. This is the value of the corresponding RTCRtpTransceiver.mid unless that is null, in which case the statistic property is not present.
  • RTCInboundRtpStreamStats.packetsDiscarded
    • : A positive integer that indicates the total number of RTP packets discarded by the jitter buffer due to late or early-arrival.
  • RTCInboundRtpStreamStats.pauseCount
    • : A positive integer that indicates the number of video pauses experienced by this receiver. Undefined for audio streams.
  • RTCInboundRtpStreamStats.playoutId
    • : A string that identifies the corresponding RTCAudioPlayoutStats for an audio stream. Undefined for video streams.
  • RTCInboundRtpStreamStats.remoteId
    • : A string that identifies the RTCRemoteOutboundRtpStreamStats object that provides statistics for the remote peer for this same SSRC. This ID is stable across multiple calls to getStats().
  • RTCInboundRtpStreamStats.removedSamplesForAcceleration
    • : A positive integer that indicates the number of samples removed from to speed up playout from the jitter buffer. Undefined for video streams.
  • RTCInboundRtpStreamStats.silentConcealedSamples
    • : A positive integer that indicates the number of silent concealed samples. Undefined for video streams.
  • RTCInboundRtpStreamStats.totalAssemblyTime
    • : A number that indicates the total time spent assembling successfully decoded video frames that were transported in multiple RTP packets, in seconds. Undefined for audio streams.
  • RTCInboundRtpStreamStats.totalAudioEnergy
    • : A number that represents the total audio energy of the received track over the lifetime of the stats object. Undefined for video streams.
  • RTCInboundRtpStreamStats.totalDecodeTime
    • : A number that indicates the total time spent decoding frames in this stream, in seconds. Undefined for audio streams.
  • RTCInboundRtpStreamStats.totalFreezesDuration
    • : A positive number that indicates the total time that the stream has spent frozen, in seconds. Undefined for audio streams.
  • RTCInboundRtpStreamStats.totalInterFrameDelay
    • : A positive number that indicates the total time spent between consecutively rendered frames, recorded just after a frame has been rendered. Undefined for audio streams.
  • RTCInboundRtpStreamStats.totalPausesDuration
    • : A positive number that indicates the total time that the stream has spent with paused video, in seconds. Undefined for audio streams.
  • RTCInboundRtpStreamStats.totalProcessingDelay
    • : A positive number that indicates the total time spent processing audio or video samples, in seconds.
  • RTCInboundRtpStreamStats.totalSamplesDuration
    • : A positive number that indicates the total duration of all samples that have been received, in seconds. Undefined for video streams.
  • RTCInboundRtpStreamStats.totalSamplesReceived
    • : A positive integer that indicates the total number of samples received on this stream. Undefined for video streams.
  • RTCInboundRtpStreamStats.totalSquaredInterFrameDelay
    • : A positive number that indicates the sum of the square of inter-frame delays between consecutively rendered frames, recorded just after a frame has been rendered. Undefined for audio streams.
  • RTCInboundRtpStreamStats.trackIdentifier
    • : A string that provides the MediaStreamTrack.id value of the MediaStreamTrack associated with the inbound stream.

Local-only measurements

These properties are computed locally, and are only available to the device receiving the media stream. Their primary purpose is to examine the error resiliency of the connection, as they provide information about lost packets, lost frames, and how heavily compressed the data is.

  • RTCInboundRtpStreamStats.nackCount
    • : A number that indicates the number of times the receiver notified the sender that one or more RTP packets has been lost by sending a Negative ACKnowledgement (NACK, also called "Generic NACK") packet to the sender. This value is only available to the receiver.
  • RTCInboundRtpStreamStats.qpSum
    • : A positive integer that provides the sum of the QP values for every frame decoded by this RTP receiver to date on the video track described by this statistics object. Valid only for video streams.

Statistics measured at the receiver of an RTP stream

These statistics are measured at the receiving end of an RTP stream, regardless of whether it's local or remote.

  • RTCInboundRtpStreamStats.packetsReceived
  • RTCInboundRtpStreamStats.packetsLost
    • : The total number of RTP packets lost for this synchronizing source (SSRC). Note that this can be negative, as more packets may be received than the receiver expects.
  • RTCInboundRtpStreamStats.jitter

Common RTP stream statistics

  • RTCInboundRtpStreamStats.codecId
    • : A string that uniquely identifies the object which was inspected to produce the RTCCodecStats object associated with this RTP stream.
  • RTCInboundRtpStreamStats.kind
    • : A string that indicates whether the MediaStreamTrack associated with the stream is an audio or a video track.
  • RTCInboundRtpStreamStats.ssrc
    • : The 32-bit integer that identifies the source of the RTP packets this object provides. This value is generated per the specification.
  • RTCInboundRtpStreamStats.transportId
    • : A string that uniquely identifies the object which was inspected to produce the RTCTransportStats object associated with this RTP stream.

Common instance properties

The following properties are common to all WebRTC statistics objects.

  • RTCInboundRtpStreamStats.id
    • : A string that uniquely identifies the object that is being monitored to produce this set of statistics.
  • RTCInboundRtpStreamStats.timestamp
    • : A DOMHighResTimeStamp object that indicates the time at which the sample was taken for this statistics object.
  • RTCInboundRtpStreamStats.type
    • : A string with the value "inbound-rtp", which indicates the type of statistics that the object contains.

Specifications

Browser compatibility

See also

  • RTCStatsReport

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。