OBSERVERTC / Reference

Monitor fields and exact calculations

Inspect field calculations and serialization against a pinned implementation.

This generated reference covers Client Monitor 4.9.1, not the latest release. Use it to investigate the documented implementation baseline; check versions and compatibility before applying a formula to another version.

For a guided explanation, start with Metrics and missing values. The raw Markdown inventory remains available for download and agent use.

Generated from the TypeScript AST, not from README lists. Stable 4.9.1 is the main inventory. Schema membership alone is NOT a provenance test: attachments, identity, context, adapter reconstruction and detector outputs are distinct. Each assignment links to its full enclosing implementation; read its guards before using the expression. Assignments are an index, not a promise that every field is refreshed every tick.

ClientMonitor

Source

Public field / getterType or declarationSource
samplingSchemaVersionpublic static readonly samplingSchemaVersion = schemaVersion;L63
createdAtpublic readonly createdAt = Date.now();L64
mappedPeerConnectionspublic readonly mappedPeerConnections = new Map<string, PeerConnectionMonitor>();L66
mappedExtensionStatsMonitorspublic readonly mappedExtensionStatsMonitors = new Map<string, ExtensionStatsMonitor>();L67
detectorsDetectorsL68
clientEventPayloadProviderpublic readonly clientEventPayloadProvider = new ClientEventPayloadProvider();L69
extensionStatsProviderspublic readonly extensionStatsProviders = new Set<ExtensionStatProvider>();L70
activeIssuesIssueRegistryL77
slicedWindowSlicedWindow<
ClientWindowValues,
Record<keyof ClientWindowConfig[’numberOfSamples’], SliceConfig>
>L84
scoreCalculatorScoreCalculatorL89
loggerLoggerL90
closedpublic closed = false;L91
lastSampledAtpublic lastSampledAt = 0;L92
lastCollectingStatsAtpublic lastCollectingStatsAt = 0;L93
cpuPerformanceAlertOnpublic cpuPerformanceAlertOn = false;L95
cpuUtilizationnumberL102
activeTabpublic activeTab = true;L110
sendingAudioBitratepublic sendingAudioBitrate = -1;L112
sendingVideoBitratepublic sendingVideoBitrate = -1;L113
receivingAudioBitratepublic receivingAudioBitrate = -1;L114
receivingVideoBitratepublic receivingVideoBitrate = -1;L115
totalAvailableIncomingBitratepublic totalAvailableIncomingBitrate = -1;L116
totalAvailableOutgoingBitratepublic totalAvailableOutgoingBitrate = -1;L117
avgRttInSecpublic avgRttInSec = -1;L119
scorepublic score = 5.0;L120
scoreReasonsRecord<string, number>L121
durationOfCollectingStatsInMspublic durationOfCollectingStatsInMs = 0;L136
configAppliedClientMonitorConfig<AppData>L137
attachmentsRecord<string, unknown>L144
clientIdpublic get clientId() { return this.config.clientId; }L498
callIdpublic get callId() { return this.config.callId; }L503
appDataAppDataL508
uptimeInMspublic get uptimeInMs() {L521
browserpublic get browser() {L546
peerConnectionspublic get peerConnections() {L1076
codecspublic get codecs() {L1080
inboundRtpspublic get inboundRtps() {L1084
outboundRtpspublic get outboundRtps() {L1088
remoteInboundRtpspublic get remoteInboundRtps() {L1092
remoteOutboundRtpspublic get remoteOutboundRtps() {L1096
mediaSourcespublic get mediaSources() {L1100
mediaPlayoutspublic get mediaPlayouts() {L1104
dataChannelspublic get dataChannels() {L1108
iceCandidatePairspublic get iceCandidatePairs() {L1112
iceCandidatespublic get iceCandidates() {L1116
iceTransportspublic get iceTransports() {L1120
certificatespublic get certificates() {L1124
tracksTrackMonitor[]L1128

Assignment and formula index

  • logger L152: this.logger = monitorConfig.logger ?? createLogger()
  • config L165: this.config = { ...monitorConfig, collectingPeriodInMs: monitorConfig.collectingPeriodInMs ?? 5000, samplingPeriodInMs: monitorConfig.samplingPeriodInMs ?? 5000, integrateNavigatorMediaDevices: monitorConfig.integrateNavigatorMediaDevices ?? true, watchTabVisibility: monitorConfig.watchTabVisibility ?? true, addClientJointEventOnCreated: monitorConfig.addClientJointEventOnCreated ?? true, addClientLeftEventOnClose: monitorConfig.addClientLeftEventOnClose ?? true, // The slices are counted in values, not milliseconds, so that a slice asked for N // values holds N at any collecting period and is readable at any cadence. What varies // is the stretch those values span: N values span N-1 intervals, so at the default // 5000ms period a slice of 2 covers 5s and one of 4 covers 15s. 'maxAllowedGapInMs' // tolerates a couple of late or missed collections and treats anything longer as a // blackout worth starting again after. outboundTrackWindow: monitorConfig.outboundTrackWindow ?? { numberOfSamples: { detection: 3, recovery: 3, }, maxAllowedGapInMs: collectingPeriodInMs * 4, }, inboundTrackWindow: monitorConfig.inboundTrackWindow ?? { numberOfSamples: { detection: 3, recovery: 3, flowDetection: 4, flowRecovery: 3, }, maxAllowedGapInMs: collectingPeriodInMs * 4, }, peerConnectionWindow: monitorConfig.peerConnectionWindow ?? { numberOfSamples: { detection: 3, recovery: 3, }, maxAllowedGapInMs: collectingPeriodInMs * 4, }, clientWindow: monitorConfig.clientWindow ?? { numberOfSamples: { detection: 3, recovery: 3, }, maxAllowedGapInMs: collectingPeriodInMs * 4, }, // Detector defaults, one entry per detector, grouped as in // 'ClientMonitorConfig' so the two files read side by side. // Connectivity — layer 1: reachability. iceReachabilityDetector: detectorDefault(monitorConfig.iceReachabilityDetector, { thresholdInMs: 6000, }), // Layer 2 — traversal. Telemetry, nothing to tune. iceTraversalDetector: detectorDefault(monitorConfig.iceTraversalDetector, {}), // Layer 3 — path establishment: slow, then demonstrably failed. icePathEstablishmentDetector: detectorDefault(monitorConfig.icePathEstablishmentDetector, { thresholdInMs: 5000, createEvent: true, }), iceEstablishmentFailedDetector: detectorDefault(monitorConfig.iceEstablishmentFailedDetector, { thresholdInMs: 15000, }), // Layer 4 — secure transport. 'failed' is terminal, so no threshold. dtlsHandshakeFailedDetector: detectorDefault(monitorConfig.dtlsHandshakeFailedDetector, {}), dtlsHandshakeStalledDetector: detectorDefault(monitorConfig.dtlsHandshakeStalledDetector, { stalledThresholdInMs: 6000, }), // Layer 5 — path continuity: down, finished, delivering nothing, // or never settling. iceDisconnectedDetector: detectorDefault(monitorConfig.iceDisconnectedDetector, { disconnectedThresholdInMs: 5000, }), iceConnectionFailedDetector: detectorDefault(monitorConfig.iceConnectionFailedDetector, {}), iceTransportStalledDetector: detectorDefault(monitorConfig.iceTransportStalledDetector, { transportStallThresholdInMs: 5000, }), unstableIcePathDetector: detectorDefault(monitorConfig.unstableIcePathDetector, { pathSwitchWindowInMs: 30000, pathSwitchThreshold: 3, }), // Connectivity telemetry. Recommendation thresholds sit wider than // the issue thresholds beside them, on purpose. iceRestartDetector: detectorDefault(monitorConfig.iceRestartDetector, { createEvent: true, }), iceRestartRecommendationDetector: detectorDefault(monitorConfig.iceRestartRecommendationDetector, { createEvent: true, iceRestartRecommendationThresholdInMs: 10000, iceRestartRecommendationCooldownInMs: 15000, restartRecommendationThresholdInMs: 10000, restartRecommendationCooldownInMs: 15000, }), // Transport Quality — the properties of a working path. These // thresholds are starting points, meant to be tuned against a fleet. // Deprecated, on by default so integrations built against the 'congestion' event keep // working. Set to 'null' once nothing depends on it. congestionDetector: detectorDefault(monitorConfig.congestionDetector, { sensitivity: 'medium' as const, }), uplinkCongestionDetector: detectorDefault(monitorConfig.uplinkCongestionDetector, { minSeverity: 0.65, // Four times the connection's own median pacer delay tops the scale. pacerBloatingSaturatesAt: 4, }), downlinkCongestionDetector: detectorDefault(monitorConfig.downlinkCongestionDetector, { minSeverity: 0.65, // Four times the connection's own median jitter buffer delay tops the scale. bufferBloatingSaturatesAt: 4, }), transportDelayDetector: detectorDefault(monitorConfig.transportDelayDetector, { // ~300ms round trip is where turn-taking starts to break down. thresholdInMs: 300, recoveryThresholdInMs: 200, // The sustain lives in 'peerConnectionWindow', not here. }), transportLossDetector: detectorDefault(monitorConfig.transportLossDetector, { threshold: 0.05, recoveryThreshold: 0.01, durationInMs: 6000, }), blockedStunRequestsDetector: detectorDefault(monitorConfig.blockedStunRequestsDetector, { responseReceivedTimeoutInMs: 10000, requestsSentTimeoutInMs: 10000, }), blockedOutboundMediaDetector: detectorDefault(monitorConfig.blockedOutboundMediaDetector, { thresholdInMs: 10000, }), // Defaults to 'null': its premise fails wherever rtcp-mux is in // force, which is every browser. See 'ClientMonitorConfig'. blockedInboundMediaDetector: detectorDefault(monitorConfig.blockedInboundMediaDetector, null), // Pipeline Disruption — the send chain, from the capture device to // the wire. captureSourceLostDetector: detectorDefault(monitorConfig.captureSourceLostDetector, { createEvent: true, }), silentAudioSourceDetector: detectorDefault(monitorConfig.silentAudioSourceDetector, { silenceThresholdInMs: 60000, silenceRmsThreshold: 0.0001, recoveryRmsThreshold: 0.0003, }), videoCaptureBottleneckDetector: detectorDefault(monitorConfig.videoCaptureBottleneckDetector, { produceDegradationThreshold: 0.2, }), encoderBottleneckDetector: detectorDefault(monitorConfig.encoderBottleneckDetector, { encodeDegradationThreshold: 0.3, }), rtpSenderStalledDetector: detectorDefault(monitorConfig.rtpSenderStalledDetector, { thresholdInMs: 4000, }), dryOutboundTrackDetector: detectorDefault(monitorConfig.dryOutboundTrackDetector, { thresholdInMs: 5000, }), // Pipeline Disruption — the receive chain, from the transport to the // renderer. transportDemuxStalledDetector: detectorDefault(monitorConfig.transportDemuxStalledDetector, { thresholdInMs: 4000, minTransportReceiveBitrateBps: 20000, }), dryInboundTrackDetector: detectorDefault(monitorConfig.dryInboundTrackDetector, { thresholdInMs: 5000, }), frameAssemblyStalledDetector: detectorDefault(monitorConfig.frameAssemblyStalledDetector, { thresholdInMs: 3000, minPacketsReceived: 20, }), decoderBottleneckDetector: detectorDefault(monitorConfig.decoderBottleneckDetector, { // 0.1 is the old decodeFpsRatioThreshold of 0.9, read as a shortfall. decodeDegradationThreshold: 0.1, minReceivedFps: 5, }), decoderPerformanceDetector: detectorDefault(monitorConfig.decoderPerformanceDetector, { decodeTimeBudgetRatio: 0.8, minFramesReceived: 10, quietLossThreshold: 0.02, minConsecutiveTicks: 2, }), stuckDecoderDetector: detectorDefault(monitorConfig.stuckDecoderDetector, { thresholdInMs: 4000, rttMultiplier: 15, minBitrate: 10000, minPliCount: 2, }), playoutDiscrepancyDetector: detectorDefault(monitorConfig.playoutDiscrepancyDetector, { lowSkewRatio: 0.1, highSkewRatio: 0.25, minFramesReceived: 10, }), // Pipeline Disruption — the repair loop beside the receive chain, and // the machine behind both chains. videoRecoveryFailedDetector: detectorDefault(monitorConfig.videoRecoveryFailedDetector, { recoveryFailedThresholdInMs: 5000, recoveryFailedMinPliCount: 2, }), cpuPerformanceDetector: detectorDefault(monitorConfig.cpuPerformanceDetector, { utilizationThreshold: 0.5, recoveryThreshold: 0.4, }), // Perceived Quality — how the picture and the sound come across. pixelatedVideoDetector: detectorDefault(monitorConfig.pixelatedVideoDetector, { // Fractions of the codec's own quantizer scale, so one pair covers every codec. // 0.62 is a mean quantizer of 79 on VP8 and 32 on H.264, either of which is // visibly coarse; 0.52 is 66 and 27, which is not. Starting points to calibrate // against a fleet, not findings. threshold: 0.62, recoveryThreshold: 0.52, durationInMs: 8000, }), inboundVideoFlowStateDetector: detectorDefault(monitorConfig.inboundVideoFlowStateDetector, { frozenAfterInMs: 2000, minFreezeCountForChoppy: 2, // The stretch both verdicts are measured over is the track's shared window, not a // duration here: see 'inboundTrackWindow'. }), inventedSpeechDetector: detectorDefault(monitorConfig.inventedSpeechDetector, { // Share of concealed audio tolerated before it counts against the budget. allowedInventedRatio: 0.05, // Invented audio beyond the allowance, in ms, that opens the issue. raiseAfterInventedMs: 400, }), audioPlayoutSynthesisDetector: detectorDefault(monitorConfig.audioPlayoutSynthesisDetector, { // A share of what was played, not a duration per collection. The previous // 'minSynthesizedSamplesDuration: 0' reported on every tick that concealed anything // at all, and its unit was seconds while the config documented milliseconds. synthesizedRatioThreshold: 0.05, createEvent: true, }), // Raise at the acceptability limits, resolve back inside the // detectability ones; audio behind video is forgiven further. avDesyncPlayoutDetector: detectorDefault(monitorConfig.avDesyncPlayoutDetector, { audioAheadRaiseInMs: 90, audioAheadResolveInMs: 45, audioBehindRaiseInMs: 185, audioBehindResolveInMs: 125, sustainForInMs: 3000, }), jitterBufferStressDetector: detectorDefault(monitorConfig.jitterBufferStressDetector, { targetDelayThresholdInMs: 200, timeStretchThreshold: 0.02, minConsecutiveTicks: 2, // Severity scale only, and absolute rather than relative to the thresholds above: // a second of buffering makes conversation impossible, and a seventh of the samples // warped is badly distorted speech. The thresholds land near 0.16 on that scale. unbearableTargetDelayInMs: 1000, unbearableTimeStretchRate: 0.15, }), // Telemetry — facts about the session, not faults. captureTrackMutedDetector: detectorDefault(monitorConfig.captureTrackMutedDetector, { createEvent: true, }), codecChangeDetector: detectorDefault(monitorConfig.codecChangeDetector, { createEvent: true, }), videoResolutionChangeDetector: detectorDefault(monitorConfig.videoResolutionChangeDetector, { createEvent: true, }), simulcastLayerDetector: detectorDefault(monitorConfig.simulcastLayerDetector, { createEvent: true, }), statsGapDetector: detectorDefault(monitorConfig.statsGapDetector, { gapRatioThreshold: 2, minGapInMs: 5000, createEvent: true, }), bufferingEventsForSamples: monitorConfig.bufferingEventsForSamples ?? false, bufferClientSamplesUntilSubscriber: monitorConfig.bufferClientSamplesUntilSubscriber ?? false, sendResolvedIssuesToServer: monitorConfig.sendResolvedIssuesToServer ?? true, sendScoreReasonsToServer: monitorConfig.sendScoreReasonsToServer ?? true, sendIceTransportMetadataOnChangeOnly: monitorConfig.sendIceTransportMetadataOnChangeOnly ?? true, appData: monitorConfig.appData ?? {} as AppData, }
  • slicedWindow L437: this.slicedWindow = new SlicedWindow({ maxAllowedGapInMs: this.config.clientWindow.maxAllowedGapInMs, totals: { totalVideoEncodeTimeInMs: null, totalVideoDecodeTimeInMs: null, }, slices: { detection: { numberOfSamples: this.config.clientWindow.numberOfSamples.detection, }, recovery: { numberOfSamples: this.config.clientWindow.numberOfSamples.recovery, offset: this.config.clientWindow.numberOfSamples.detection, }, }, })
  • scoreCalculator L455: this.scoreCalculator = new DefaultScoreCalculator(this)
  • activeIssues L482: this.activeIssues = new IssueRegistry({ notify: (issue) => this.addIssue(issue), raise: (input) => this._raiseIssue(input), update: (input) => this._updateIssue(input), resolve: (input) => this._resolveIssue(input), })
  • detectors L489: this.detectors = new Detectors()
  • config.clientId L500: this.config.clientId = clientId
  • config.callId L505: this.config.callId = callId
  • config.appData L509: this.config.appData = appData
  • closed L580: this.closed = true
  • lastCollectingStatsAt L617: this.lastCollectingStatsAt = Date.now()
  • sendingAudioBitrate L640: this.sendingAudioBitrate = this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.sendingAudioBitrate ?? 0), 0)
  • sendingVideoBitrate L641: this.sendingVideoBitrate = this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.sendingVideoBitrate ?? 0), 0)
  • receivingAudioBitrate L642: this.receivingAudioBitrate = this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.receivingAudioBitrate ?? 0), 0)
  • receivingVideoBitrate L643: this.receivingVideoBitrate = this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.receivingVideoBitrate ?? 0), 0)
  • totalAvailableIncomingBitrate L644: this.totalAvailableIncomingBitrate = this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.totalAvailableIncomingBitrate ?? 0), 0)
  • totalAvailableOutgoingBitrate L645: this.totalAvailableOutgoingBitrate = this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.totalAvailableOutgoingBitrate ?? 0), 0)
  • avgRttInSec L647: this.avgRttInSec = 0 < this.peerConnections.length ? this.peerConnections.reduce((acc, peerConnection) => acc + (peerConnection.avgRttInSec ?? 0), 0) / this.peerConnections.length : -1
  • durationOfCollectingStatsInMs L650: this.durationOfCollectingStatsInMs = Date.now() - this.lastCollectingStatsAt
  • score L729: this.score = score
  • scoreReasons L730: this.scoreReasons = ownReasons
  • lastSampledAt L764: this.lastSampledAt = timestamp
  • config.collectingPeriodInMs L1200: this.config.collectingPeriodInMs = collectingPeriodInMs
  • config.samplingPeriodInMs L1214: this.config.samplingPeriodInMs = samplingPeriodInMs

Exact wire projection

public createSample(): ClientSample | undefined {
        if (this.closed) return;

        const clientSample: ClientSample = {
            clientId: this.clientId,
            timestamp: Date.now(),
            callId: this.callId,
            attachments: this.attachments,
            peerConnections: this.peerConnections.map(peerConnection => peerConnection.createSample()),
            clientEvents: this._clientEvents,
            clientMetaItems: this._clientMetaItems,
            clientIssues: this._clientIssues,
            extensionStats: this._extensionStats,
            score: this.score,
            // The client's own reasons only; the aggregate lives on the 'score' event.
            scoreReasons: sampledScoreReasons(this.scoreReasons, this.config.sendScoreReasonsToServer),
        };
        this._clientEvents = [];
        this._clientMetaItems = [];
        this._clientIssues = [];
        this._extensionStats = [];

        const timestamp = Date.now();
        if (!clientSample) {
            return;
        }
        this.lastSampledAt = timestamp;

        if (this._bufferedClientSamples) {
            if (this.listenerCount('sample-created') === 0) {
                this._bufferedClientSamples.push(clientSample);
            } else {
                this._flushBufferedClientSamples();
            }
        }

        this.emit('sample-created', {
            clientMonitor: this,
            sample: clientSample
        });

        return clientSample;
    }

CertificateMonitor

Source

Public field / getterType or declarationSource
timestampnumberL7
idstringL8
fingerprintstring / undefinedL9
fingerprintAlgorithmstring / undefinedL10
base64Certificatestring / undefinedL11
issuerCertificateIdstring / undefinedL12
attachmentsRecord<string, unknown> / undefinedL17
appDataRecord<string, unknown> / undefinedL22
visitedbooleanL35

Assignment and formula index

  • id L28: this.id = options.id
  • timestamp L29: this.timestamp = options.timestamp

Exact wire projection

public createSample(): CertificateStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			fingerprint: this.fingerprint,
			fingerprintAlgorithm: this.fingerprintAlgorithm,
			base64Certificate: this.base64Certificate,
			issuerCertificateId: this.issuerCertificateId,
			attachments: this.attachments,
		};
	}

CodecMonitor

Source

Public field / getterType or declarationSource
timestampnumberL7
idstringL8
payloadTypenumberL9
transportIdstringL10
mimeTypestringL11
clockRatenumber / undefinedL12
channelsnumber / undefinedL13
sdpFmtpLinestring / undefinedL14
attachmentsRecord<string, unknown> / undefinedL19
appDataRecord<string, unknown> / undefinedL24
visitedbooleanL37

Assignment and formula index

  • id L30: this.id = options.id
  • timestamp L31: this.timestamp = options.timestamp
  • mimeType L32: this.mimeType = options.mimeType

Exact wire projection

public createSample(): CodecStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			payloadType: this.payloadType,
			transportId: this.transportId,
			mimeType: this.mimeType,
			clockRate: this.clockRate,
			channels: this.channels,
			sdpFmtpLine: this.sdpFmtpLine,
			attachments: this.attachments,
		};
	}

DataChannelMonitor

Source

Public field / getterType or declarationSource
timestampnumberL8
idstringL9
labelstring / undefinedL10
protocolstring / undefinedL11
dataChannelIdentifiernumber / undefinedL12
statestring / undefinedL13
messagesSentnumber / undefinedL14
bytesSentnumber / undefinedL15
messagesReceivednumber / undefinedL16
bytesReceivednumber / undefinedL17
deltaBytesSentnumber / undefinedL19
deltaBytesReceivednumber / undefinedL20
sendingBitratenumber / undefinedL22
receivingBitratenumber / undefinedL23
attachmentsRecord<string, unknown> / undefinedL25
appDataRecord<string, unknown> / undefinedL27
visitedbooleanL45

Assignment and formula index

  • id L33: this.id = options.id
  • timestamp L34: this.timestamp = options.timestamp
  • deltaBytesReceived L63: this.deltaBytesReceived = positiveDelta(stats.bytesReceived, this.bytesReceived)
  • deltaBytesSent L64: this.deltaBytesSent = positiveDelta(stats.bytesSent, this.bytesSent)
  • sendingBitrate L67: this.sendingBitrate = Math.max(0, this.deltaBytesSent * 8 / elapsedInSec)
  • receivingBitrate L71: this.receivingBitrate = Math.max(0, this.deltaBytesReceived * 8 / elapsedInSec)

Exact wire projection

public createSample(): DataChannelStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			label: this.label,
			protocol: this.protocol,
			dataChannelIdentifier: this.dataChannelIdentifier,
			state: this.state,
			messagesSent: this.messagesSent,
			bytesSent: this.bytesSent,
			messagesReceived: this.messagesReceived,
			bytesReceived: this.bytesReceived,
			attachments: this.attachments,
		};
	}

ExtensionStatsMonitor

Source

Public field / getterType or declarationSource
visitedpublic visited = true;L17
payloadRecord<string, unknown>L20
timestamppublic timestamp = Date.now();L23

Assignment and formula index

  • visited L34: this.visited = true
  • payload L35: this.payload = payload
  • timestamp L36: this.timestamp = Date.now()

IceCandidateMonitor

Source

Public field / getterType or declarationSource
timestampnumberL15
idstringL16
transportIdstring / undefinedL17
addressstring / undefinedL18
portnumber / undefinedL19
protocolstring / undefinedL20
candidateTypestring / undefinedL21
prioritynumber / undefinedL22
urlstring / undefinedL23
relayProtocolstring / undefinedL24
foundationstring / undefinedL25
relatedAddressstring / undefinedL26
relatedPortnumber / undefinedL27
usernameFragmentstring / undefinedL28
tcpTypestring / undefinedL29
direction’local’ / ‘remote’L32
attachmentsRecord<string, unknown> / undefinedL35
appDataRecord<string, unknown> / undefinedL37
visitedbooleanL49
isRelaybooleanL80
turnTransportIceRelayProtocol / undefinedL85
turnServerstring / undefinedL100
addressFamilyIceAddressFamily / undefinedL108

Assignment and formula index

  • id L43: this.id = options.id
  • timestamp L44: this.timestamp = options.timestamp

Exact wire projection

public createSample(): IceCandidateStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			transportId: this.transportId,
			address: this.address,
			port: this.port,
			protocol: this.protocol,
			candidateType: this.candidateType,
			priority: this.priority,
			url: this.url,
			relayProtocol: this.relayProtocol,
			foundation: this.foundation,
			relatedAddress: this.relatedAddress,
			relatedPort: this.relatedPort,
			usernameFragment: this.usernameFragment,
			tcpType: this.tcpType,
			attachments: this.attachments,
		};
	}

IceCandidatePairMonitor

Source

Public field / getterType or declarationSource
idstringL18
timestampnumberL19
transportIdstring / undefinedL20
localCandidateIdstring / undefinedL21
remoteCandidateIdstring / undefinedL22
state"new" / "in-progress" / "failed" / "waiting" / "succeeded" / undefinedL23
nominatedboolean / undefinedL24
packetsSentnumber / undefinedL25
packetsReceivednumber / undefinedL26
bytesSentnumber / undefinedL27
bytesReceivednumber / undefinedL28
lastPacketSentTimestampnumber / undefinedL29
lastPacketReceivedTimestampnumber / undefinedL30
totalRoundTripTimenumber / undefinedL31
currentRoundTripTimenumber / undefinedL32
availableOutgoingBitratenumber / undefinedL33
availableIncomingBitratenumber / undefinedL34
requestsReceivednumber / undefinedL35
requestsSentnumber / undefinedL36
responsesReceivednumber / undefinedL37
responsesSentnumber / undefinedL38
consentRequestsSentnumber / undefinedL39
packetsDiscardedOnSendnumber / undefinedL40
bytesDiscardedOnSendnumber / undefinedL41
deltaPacketsSentnumber / undefinedL43
deltaPacketsReceivednumber / undefinedL44
deltaBytesSentnumber / undefinedL45
deltaBytesReceivednumber / undefinedL46
deltaTotalRoundTripTimenumber / undefinedL47
deltaRequestsSentnumber / undefinedL48
deltaConsentRequestsSentnumber / undefinedL53
deltaResponsesReceivednumber / undefinedL54
deltaPacketsDiscardedOnSendnumber / undefinedL59
deltaBytesDiscardedOnSendnumber / undefinedL61
deltaTimenumber / undefinedL64
avgRoundTripTimeInSecnumber / undefinedL70
attachmentsRecord<string, unknown> / undefinedL73
appDataRecord<string, unknown> / undefinedL75
visitedbooleanL87
statsClockTimepublic statsClockTime = 0;L136
pathKeystringL159
usingTurnbooleanL164
usingTcpbooleanL172
relayProtocolIceRelayProtocol / undefinedL177
turnUrlstring / undefinedL182
turnServerstring / undefinedL187
pathKindIcePathKindL191
tuplestringL207

Assignment and formula index

  • id L81: this.id = options.id
  • timestamp L82: this.timestamp = options.timestamp
  • deltaTime L102: this.deltaTime = elapsedInMs
  • statsClockTime L103: this.statsClockTime += elapsedInMs
  • deltaPacketsSent L106: this.deltaPacketsSent = positiveDelta(stats.packetsSent, this.packetsSent)
  • deltaPacketsReceived L107: this.deltaPacketsReceived = positiveDelta(stats.packetsReceived, this.packetsReceived)
  • deltaBytesSent L108: this.deltaBytesSent = positiveDelta(stats.bytesSent, this.bytesSent)
  • deltaBytesReceived L109: this.deltaBytesReceived = positiveDelta(stats.bytesReceived, this.bytesReceived)
  • deltaTotalRoundTripTime L111: this.deltaTotalRoundTripTime = positiveDelta(stats.totalRoundTripTime, this.totalRoundTripTime)
  • deltaResponsesReceived L112: this.deltaResponsesReceived = positiveDelta(stats.responsesReceived, this.responsesReceived)
  • deltaRequestsSent L113: this.deltaRequestsSent = positiveDelta(stats.requestsSent, this.requestsSent)
  • deltaConsentRequestsSent L114: this.deltaConsentRequestsSent = positiveDelta(stats.consentRequestsSent, this.consentRequestsSent)
  • deltaPacketsDiscardedOnSend L115: this.deltaPacketsDiscardedOnSend = positiveDelta(stats.packetsDiscardedOnSend, this.packetsDiscardedOnSend)
  • deltaBytesDiscardedOnSend L116: this.deltaBytesDiscardedOnSend = positiveDelta(stats.bytesDiscardedOnSend, this.bytesDiscardedOnSend)
  • avgRoundTripTimeInSec L117: this.avgRoundTripTimeInSec = this.deltaTotalRoundTripTime !== undefined && this.deltaResponsesReceived !== undefined && this.deltaResponsesReceived > 0 ? this.deltaTotalRoundTripTime / this.deltaResponsesReceived : undefined
  • availableOutgoingBitrate L127: this.availableOutgoingBitrate = stats.availableOutgoingBitrate
  • availableIncomingBitrate L128: this.availableIncomingBitrate = stats.availableIncomingBitrate

Exact wire projection

public createSample(): IceCandidatePairStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			transportId: this.transportId,
			localCandidateId: this.localCandidateId,
			remoteCandidateId: this.remoteCandidateId,
			state: this.state,
			nominated: this.nominated,
			packetsSent: this.packetsSent,
			packetsReceived: this.packetsReceived,
			bytesSent: this.bytesSent,
			bytesReceived: this.bytesReceived,
			lastPacketSentTimestamp: this.lastPacketSentTimestamp,
			lastPacketReceivedTimestamp: this.lastPacketReceivedTimestamp,
			totalRoundTripTime: this.totalRoundTripTime,
			currentRoundTripTime: this.currentRoundTripTime,
			availableOutgoingBitrate: this.availableOutgoingBitrate,
			availableIncomingBitrate: this.availableIncomingBitrate,
			requestsReceived: this.requestsReceived,
			requestsSent: this.requestsSent,
			responsesReceived: this.responsesReceived,
			responsesSent: this.responsesSent,
			consentRequestsSent: this.consentRequestsSent,
			packetsDiscardedOnSend: this.packetsDiscardedOnSend,
			bytesDiscardedOnSend: this.bytesDiscardedOnSend,
			attachments: this.attachments,
		};
	}

IceTransportMonitor

Source

Public field / getterType or declarationSource
detectorsDetectorsL24
issuesIssueRegistry<IceTransportIssues>L31
timestampnumberL33
idstringL34
packetsSentnumber / undefinedL35
packetsReceivednumber / undefinedL36
bytesSentnumber / undefinedL37
bytesReceivednumber / undefinedL38
iceRolestring / undefinedL39
iceLocalUsernameFragmentstring / undefinedL40
dtlsStatestring / undefinedL41
iceStatestring / undefinedL42
selectedCandidatePairIdstring / undefinedL43
localCertificateIdstring / undefinedL44
remoteCertificateIdstring / undefinedL45
tlsVersionstring / undefinedL46
dtlsCipherstring / undefinedL47
dtlsRolestring / undefinedL48
srtpCipherstring / undefinedL49
selectedCandidatePairChangesnumber / undefinedL50
ccfbMessagesSentnumber / undefinedL51
ccfbMessagesReceivednumber / undefinedL52
deltaPacketsSentnumber / undefinedL54
deltaPacketsReceivednumber / undefinedL55
deltaBytesSentnumber / undefinedL56
deltaBytesReceivednumber / undefinedL57
sendingBitratenumber / undefinedL58
receivingBitratenumber / undefinedL59
deltaSelectedCandidatePairChangesnumber / undefinedL64
deltaTimenumber / undefinedL67
everConnectedeverConnected = false;L73
blockedpublic blocked = false;L80
attachmentsRecord<string, unknown> / undefinedL83
appDataRecord<string, unknown> / undefinedL85
visitedbooleanL106
statsClockTimepublic statsClockTime = 0;L119

Assignment and formula index

  • id L91: this.id = options.id
  • timestamp L92: this.timestamp = options.timestamp
  • issues L96: this.issues = new IssueRegistry<IceTransportIssues>( this._peerConnection.issues.asSink, )
  • detectors L99: this.detectors = new Detectors()
  • deltaTime L157: this.deltaTime = elapsedInMs
  • statsClockTime L158: this.statsClockTime += elapsedInMs
  • everConnected L161: this.everConnected = true
  • deltaPacketsSent L165: this.deltaPacketsSent = stats.packetsSent - this.packetsSent
  • deltaPacketsSent L167: this.deltaPacketsSent = undefined
  • deltaPacketsReceived L170: this.deltaPacketsReceived = stats.packetsReceived - this.packetsReceived
  • deltaPacketsReceived L172: this.deltaPacketsReceived = undefined
  • deltaBytesSent L175: this.deltaBytesSent = stats.bytesSent - this.bytesSent
  • sendingBitrate L176: this.sendingBitrate = (this.deltaBytesSent * 8) / elapsedInSec
  • deltaBytesSent L178: this.deltaBytesSent = undefined
  • sendingBitrate L179: this.sendingBitrate = undefined
  • deltaBytesReceived L182: this.deltaBytesReceived = stats.bytesReceived - this.bytesReceived
  • receivingBitrate L183: this.receivingBitrate = (this.deltaBytesReceived * 8) / elapsedInSec
  • deltaBytesReceived L185: this.deltaBytesReceived = undefined
  • receivingBitrate L186: this.receivingBitrate = undefined
  • deltaSelectedCandidatePairChanges L191: this.deltaSelectedCandidatePairChanges = this.selectedCandidatePairId !== undefined ? positiveDelta(stats.selectedCandidatePairChanges, this.selectedCandidatePairChanges) : undefined

Exact wire projection

public createSample(): IceTransportStats {
		// Constant after the handshake, so emitted in the first sample and again only on change
		// (the ufrag changes exactly at an ICE restart).
		const staticMetadata: Pick<IceTransportStats,
			'iceRole' | 'iceLocalUsernameFragment' | 'localCertificateId' | 'remoteCertificateId'
			| 'tlsVersion' | 'dtlsCipher' | 'dtlsRole' | 'srtpCipher'> = {
			iceRole: this.iceRole,
			iceLocalUsernameFragment: this.iceLocalUsernameFragment,
			localCertificateId: this.localCertificateId,
			remoteCertificateId: this.remoteCertificateId,
			tlsVersion: this.tlsVersion,
			dtlsCipher: this.dtlsCipher,
			dtlsRole: this.dtlsRole,
			srtpCipher: this.srtpCipher,
		};

		let sampledStaticMetadata: typeof staticMetadata | undefined = staticMetadata;

		if (this._peerConnection.parent.config.sendIceTransportMetadataOnChangeOnly) {
			const fingerprint = [
				this.iceRole, this.iceLocalUsernameFragment, this.localCertificateId, this.remoteCertificateId,
				this.tlsVersion, this.dtlsCipher, this.dtlsRole, this.srtpCipher,
			].join('|');

			if (this._sampledStaticMetadataFingerprint === fingerprint) {
				sampledStaticMetadata = undefined;
			} else {
				this._sampledStaticMetadataFingerprint = fingerprint;
			}
		}

		return {
			id: this.id,
			timestamp: this.timestamp,
			packetsSent: this.packetsSent,
			packetsReceived: this.packetsReceived,
			bytesSent: this.bytesSent,
			bytesReceived: this.bytesReceived,
			dtlsState: this.dtlsState,
			iceState: this.iceState,
			selectedCandidatePairId: this.selectedCandidatePairId,
			selectedCandidatePairChanges: this.selectedCandidatePairChanges,
			ccfbMessagesSent: this.ccfbMessagesSent,
			ccfbMessagesReceived: this.ccfbMessagesReceived,
			attachments: this.attachments,
			...(sampledStaticMetadata ?? {}),
		};
	}

InboundRtpMonitor

Source

Public field / getterType or declarationSource
addedAtpublic addedAt = Date.now();L12
timestampnumberL15
idstringL16
ssrcnumberL17
kindMediaKindL18
trackIdentifierstringL19
transportIdstring / undefinedL20
codecIdstring / undefinedL21
packetsReceivednumber / undefinedL22
packetsReceivedWithEct1number / undefinedL23
packetsReceivedWithCenumber / undefinedL24
packetsReportedAsLostnumber / undefinedL25
packetsReportedAsLostButRecoverednumber / undefinedL26
packetsLostnumber / undefinedL27
jitternumber / undefinedL28
midstring / undefinedL29
remoteIdstring / undefinedL30
framesDecodednumber / undefinedL31
keyFramesDecodednumber / undefinedL32
framesRenderednumber / undefinedL33
framesDroppednumber / undefinedL34
frameWidthnumber / undefinedL35
frameHeightnumber / undefinedL36
framesPerSecondnumber / undefinedL37
qpSumnumber / undefinedL38
totalDecodeTimenumber / undefinedL39
totalInterFrameDelaynumber / undefinedL40
totalSquaredInterFrameDelaynumber / undefinedL41
pauseCountnumber / undefinedL42
totalPausesDurationnumber / undefinedL43
freezeCountnumber / undefinedL44
totalFreezesDurationnumber / undefinedL45
lastPacketReceivedTimestampnumber / undefinedL46
headerBytesReceivednumber / undefinedL47
packetsDiscardednumber / undefinedL48
fecBytesReceivednumber / undefinedL49
fecPacketsReceivednumber / undefinedL50
fecPacketsDiscardednumber / undefinedL51
bytesReceivednumber / undefinedL52
nackCountnumber / undefinedL53
firCountnumber / undefinedL54
pliCountnumber / undefinedL55
totalProcessingDelaynumber / undefinedL56
estimatedPlayoutTimestampnumber / undefinedL57
jitterBufferDelaynumber / undefinedL58
jitterBufferTargetDelaynumber / undefinedL59
jitterBufferEmittedCountnumber / undefinedL60
jitterBufferMinimumDelaynumber / undefinedL61
totalSamplesReceivednumber / undefinedL62
concealedSamplesnumber / undefinedL63
silentConcealedSamplesnumber / undefinedL64
concealmentEventsnumber / undefinedL65
insertedSamplesForDecelerationnumber / undefinedL66
removedSamplesForAccelerationnumber / undefinedL67
audioLevelnumber / undefinedL68
totalAudioEnergynumber / undefinedL69
totalSamplesDurationnumber / undefinedL70
framesReceivednumber / undefinedL71
decoderImplementationstring / undefinedL72
playoutIdstring / undefinedL73
powerEfficientDecoderboolean / undefinedL74
framesAssembledFromMultiplePacketsnumber / undefinedL75
totalAssemblyTimenumber / undefinedL76
retransmittedPacketsReceivednumber / undefinedL77
retransmittedBytesReceivednumber / undefinedL78
rtxSsrcnumber / undefinedL79
fecSsrcnumber / undefinedL80
totalCorruptionProbabilitynumber / undefinedL81
totalSquaredCorruptionProbabilitynumber / undefinedL82
corruptionMeasurementsnumber / undefinedL83
bitratenumberL86
avgFramesPerSecnumberL87
fpsVolatilitynumberL97
lastNFramesPerSecnumber[]L98
receivingAudioSamplesnumberL99
totalFractionLostnumberL100
bitPerPixelnumberL101
packetRatenumber / undefinedL102
ewmaFpsnumberL103
deltaPacketsLostnumberL105
deltaPacketsReceivednumberL106
deltaBytesReceivednumberL107
deltaJitterBufferDelaynumberL108
deltaCorruptionProbabilitynumberL109
deltaFractionLostnumberL110
deltaFramesDecodednumberL111
deltaQpSumnumber / undefinedL112
avgQpPerFramenumber / undefinedL114
normalizedQpnumber / undefinedL132
deltaFramesReceivednumberL133
deltaFramesRenderednumberL134
deltaTimenumberL135
deltaTotalSamplesReceivednumberL138
deltaConcealedSamplesnumberL139
deltaSilentConcealedSamplesnumberL140
deltaConcealmentEventsnumberL141
deltaInsertedSamplesForDecelerationnumberL142
deltaRemovedSamplesForAccelerationnumberL143
deltaPacketsDiscardednumberL144
deltaJitterBufferEmittedCountnumberL145
deltaJitterBufferTargetDelaynumberL146
inventedSpeechRationumberL152
concealmentEventRatenumberL153
timeStretchRatenumberL155
avgJitterBufferDelayInMsnumberL156
jitterBufferTargetDelayInMsnumberL157
discardRatenumberL158
deltaFramesDroppednumberL161
deltaKeyFramesDecodednumberL162
deltaTotalDecodeTimenumberL163
deltaTotalFreezesDurationnumberL164
deltaFreezeCountnumberL166
frozenTimeRationumberL171
deltaPauseCountnumberL177
deltaTotalPausesDurationnumberL178
pausedTimeRationumberL180
deltaTotalInterFrameDelaynumberL181
deltaTotalSquaredInterFrameDelaynumberL182
avgInterFrameDelayInMsnumberL184
interFrameDelayVariationnumberL191
deltaPliCountnumberL192
deltaFirCountnumberL193
deltaNackCountnumberL194
deltaRetransmittedBytesReceivednumberL195
deltaRetransmittedPacketsReceivednumberL196
retransmissionRationumberL198
decodeTimePerFrameInMsnumberL199
droppedFrameRationumberL200
renderRationumberL201
keyFrameRatenumberL202
pliRatenumberL203
firRatenumberL204
nackRatenumberL205
attachmentsRecord<string, unknown> / undefinedL208
appDataRecord<string, unknown> / undefinedL210
visitedbooleanL303
statsClockTimepublic statsClockTime = 0;L316

Assignment and formula index

  • id L216: this.id = options.id
  • timestamp L217: this.timestamp = options.timestamp
  • ssrc L218: this.ssrc = options.ssrc
  • kind L219: this.kind = options.kind as MediaKind
  • trackIdentifier L220: this.trackIdentifier = options.trackIdentifier
  • timestamp L230: this.timestamp = stats.timestamp
  • id L231: this.id = stats.id
  • ssrc L232: this.ssrc = stats.ssrc
  • kind L233: this.kind = stats.kind as MediaKind
  • trackIdentifier L234: this.trackIdentifier = stats.trackIdentifier
  • transportId L236: this.transportId = stats.transportId
  • codecId L237: this.codecId = stats.codecId
  • packetsReceived L238: this.packetsReceived = stats.packetsReceived
  • packetsReceivedWithEct1 L239: this.packetsReceivedWithEct1 = stats.packetsReceivedWithEct1
  • packetsReceivedWithCe L240: this.packetsReceivedWithCe = stats.packetsReceivedWithCe
  • packetsReportedAsLost L241: this.packetsReportedAsLost = stats.packetsReportedAsLost
  • packetsReportedAsLostButRecovered L242: this.packetsReportedAsLostButRecovered = stats.packetsReportedAsLostButRecovered
  • packetsLost L243: this.packetsLost = stats.packetsLost
  • jitter L244: this.jitter = stats.jitter
  • mid L245: this.mid = stats.mid
  • remoteId L246: this.remoteId = stats.remoteId
  • framesDecoded L247: this.framesDecoded = stats.framesDecoded
  • keyFramesDecoded L248: this.keyFramesDecoded = stats.keyFramesDecoded
  • framesRendered L249: this.framesRendered = stats.framesRendered
  • framesDropped L250: this.framesDropped = stats.framesDropped
  • frameWidth L251: this.frameWidth = stats.frameWidth
  • frameHeight L252: this.frameHeight = stats.frameHeight
  • framesPerSecond L253: this.framesPerSecond = stats.framesPerSecond
  • qpSum L254: this.qpSum = stats.qpSum
  • totalDecodeTime L255: this.totalDecodeTime = stats.totalDecodeTime
  • totalInterFrameDelay L256: this.totalInterFrameDelay = stats.totalInterFrameDelay
  • totalSquaredInterFrameDelay L257: this.totalSquaredInterFrameDelay = stats.totalSquaredInterFrameDelay
  • pauseCount L258: this.pauseCount = stats.pauseCount
  • totalPausesDuration L259: this.totalPausesDuration = stats.totalPausesDuration
  • freezeCount L260: this.freezeCount = stats.freezeCount
  • totalFreezesDuration L261: this.totalFreezesDuration = stats.totalFreezesDuration
  • lastPacketReceivedTimestamp L262: this.lastPacketReceivedTimestamp = stats.lastPacketReceivedTimestamp
  • headerBytesReceived L263: this.headerBytesReceived = stats.headerBytesReceived
  • packetsDiscarded L264: this.packetsDiscarded = stats.packetsDiscarded
  • fecBytesReceived L265: this.fecBytesReceived = stats.fecBytesReceived
  • fecPacketsReceived L266: this.fecPacketsReceived = stats.fecPacketsReceived
  • fecPacketsDiscarded L267: this.fecPacketsDiscarded = stats.fecPacketsDiscarded
  • bytesReceived L268: this.bytesReceived = stats.bytesReceived
  • nackCount L269: this.nackCount = stats.nackCount
  • firCount L270: this.firCount = stats.firCount
  • pliCount L271: this.pliCount = stats.pliCount
  • totalProcessingDelay L272: this.totalProcessingDelay = stats.totalProcessingDelay
  • estimatedPlayoutTimestamp L273: this.estimatedPlayoutTimestamp = stats.estimatedPlayoutTimestamp
  • jitterBufferDelay L274: this.jitterBufferDelay = stats.jitterBufferDelay
  • jitterBufferTargetDelay L275: this.jitterBufferTargetDelay = stats.jitterBufferTargetDelay
  • jitterBufferEmittedCount L276: this.jitterBufferEmittedCount = stats.jitterBufferEmittedCount
  • jitterBufferMinimumDelay L277: this.jitterBufferMinimumDelay = stats.jitterBufferMinimumDelay
  • totalSamplesReceived L278: this.totalSamplesReceived = stats.totalSamplesReceived
  • concealedSamples L279: this.concealedSamples = stats.concealedSamples
  • silentConcealedSamples L280: this.silentConcealedSamples = stats.silentConcealedSamples
  • concealmentEvents L281: this.concealmentEvents = stats.concealmentEvents
  • insertedSamplesForDeceleration L282: this.insertedSamplesForDeceleration = stats.insertedSamplesForDeceleration
  • removedSamplesForAcceleration L283: this.removedSamplesForAcceleration = stats.removedSamplesForAcceleration
  • audioLevel L284: this.audioLevel = stats.audioLevel
  • totalAudioEnergy L285: this.totalAudioEnergy = stats.totalAudioEnergy
  • totalSamplesDuration L286: this.totalSamplesDuration = stats.totalSamplesDuration
  • framesReceived L287: this.framesReceived = stats.framesReceived
  • decoderImplementation L288: this.decoderImplementation = stats.decoderImplementation
  • playoutId L289: this.playoutId = stats.playoutId
  • powerEfficientDecoder L290: this.powerEfficientDecoder = stats.powerEfficientDecoder
  • framesAssembledFromMultiplePackets L291: this.framesAssembledFromMultiplePackets = stats.framesAssembledFromMultiplePackets
  • totalAssemblyTime L292: this.totalAssemblyTime = stats.totalAssemblyTime
  • retransmittedPacketsReceived L293: this.retransmittedPacketsReceived = stats.retransmittedPacketsReceived
  • retransmittedBytesReceived L294: this.retransmittedBytesReceived = stats.retransmittedBytesReceived
  • rtxSsrc L295: this.rtxSsrc = stats.rtxSsrc
  • fecSsrc L296: this.fecSsrc = stats.fecSsrc
  • totalCorruptionProbability L297: this.totalCorruptionProbability = stats.totalCorruptionProbability
  • totalSquaredCorruptionProbability L298: this.totalSquaredCorruptionProbability = stats.totalSquaredCorruptionProbability
  • corruptionMeasurements L299: this.corruptionMeasurements = stats.corruptionMeasurements
  • attachments L300: this.attachments = stats.attachments
  • deltaTotalSamplesReceived L337: this.deltaTotalSamplesReceived = positiveDelta(stats.totalSamplesReceived, this.totalSamplesReceived)
  • receivingAudioSamples L339: this.receivingAudioSamples = this.deltaTotalSamplesReceived
  • deltaBytesReceived L342: this.deltaBytesReceived = positiveDelta(stats.bytesReceived, this.bytesReceived)
  • bitrate L344: this.bitrate = this.deltaBytesReceived === undefined ? undefined : Math.max(0, this.deltaBytesReceived * 8 / elapsedInSec)
  • deltaPacketsLost L349: this.deltaPacketsLost = positiveDelta(stats.packetsLost, this.packetsLost)
  • deltaPacketsReceived L352: this.deltaPacketsReceived = positiveDelta(stats.packetsReceived, this.packetsReceived)
  • packetRate L353: this.packetRate = this.deltaPacketsReceived === undefined ? undefined : this.deltaPacketsReceived / elapsedInSec
  • deltaConcealedSamples L359: this.deltaConcealedSamples = positiveDelta(stats.concealedSamples, this.concealedSamples)
  • deltaSilentConcealedSamples L360: this.deltaSilentConcealedSamples = positiveDelta(stats.silentConcealedSamples, this.silentConcealedSamples)
  • deltaConcealmentEvents L361: this.deltaConcealmentEvents = positiveDelta(stats.concealmentEvents, this.concealmentEvents)
  • deltaInsertedSamplesForDeceleration L362: this.deltaInsertedSamplesForDeceleration = positiveDelta(stats.insertedSamplesForDeceleration, this.insertedSamplesForDeceleration)
  • deltaRemovedSamplesForAcceleration L363: this.deltaRemovedSamplesForAcceleration = positiveDelta(stats.removedSamplesForAcceleration, this.removedSamplesForAcceleration)
  • deltaPacketsDiscarded L364: this.deltaPacketsDiscarded = positiveDelta(stats.packetsDiscarded, this.packetsDiscarded)
  • deltaJitterBufferEmittedCount L365: this.deltaJitterBufferEmittedCount = positiveDelta(stats.jitterBufferEmittedCount, this.jitterBufferEmittedCount)
  • inventedSpeechRatio L371: this.inventedSpeechRatio = invented / (this.deltaTotalSamplesReceived as number)
  • inventedSpeechRatio L373: this.inventedSpeechRatio = undefined
  • concealmentEventRate L375: this.concealmentEventRate = this.deltaConcealmentEvents !== undefined ? this.deltaConcealmentEvents / elapsedInSec : undefined
  • timeStretchRate L381: this.timeStretchRate = stretched / (this.deltaTotalSamplesReceived as number)
  • timeStretchRate L383: this.timeStretchRate = undefined
  • discardRate L389: this.discardRate = 0 < consumed ? this.deltaPacketsDiscarded / consumed : 0
  • deltaCorruptionProbability L398: this.deltaCorruptionProbability = Math.max( 0, deltaCorruption / deltaMeasurements )
  • deltaJitterBufferDelay L404: this.deltaJitterBufferDelay = positiveDelta(stats.jitterBufferDelay, this.jitterBufferDelay)
  • deltaFramesDecoded L405: this.deltaFramesDecoded = positiveDelta(stats.framesDecoded, this.framesDecoded)
  • deltaFramesReceived L406: this.deltaFramesReceived = positiveDelta(stats.framesReceived, this.framesReceived)
  • deltaFramesRendered L407: this.deltaFramesRendered = positiveDelta(stats.framesRendered, this.framesRendered)
  • deltaFramesDropped L408: this.deltaFramesDropped = positiveDelta(stats.framesDropped, this.framesDropped)
  • deltaKeyFramesDecoded L409: this.deltaKeyFramesDecoded = positiveDelta(stats.keyFramesDecoded, this.keyFramesDecoded)
  • deltaQpSum L410: this.deltaQpSum = positiveDelta(stats.qpSum, this.qpSum)
  • avgQpPerFrame L413: this.avgQpPerFrame = this.deltaQpSum / this.deltaFramesDecoded
  • avgQpPerFrame L415: this.avgQpPerFrame = undefined
  • normalizedQp L418: this.normalizedQp = this._deriveNormalizedQp()
  • deltaTotalDecodeTime L419: this.deltaTotalDecodeTime = positiveDelta(stats.totalDecodeTime, this.totalDecodeTime)
  • deltaTotalFreezesDuration L420: this.deltaTotalFreezesDuration = positiveDelta(stats.totalFreezesDuration, this.totalFreezesDuration)
  • deltaFreezeCount L421: this.deltaFreezeCount = positiveDelta(stats.freezeCount, this.freezeCount)
  • frozenTimeRatio L422: this.frozenTimeRatio = this.deltaTotalFreezesDuration !== undefined && 0 < elapsedInSec ? this.deltaTotalFreezesDuration / elapsedInSec : undefined
  • deltaPauseCount L425: this.deltaPauseCount = positiveDelta(stats.pauseCount, this.pauseCount)
  • deltaTotalPausesDuration L426: this.deltaTotalPausesDuration = positiveDelta(stats.totalPausesDuration, this.totalPausesDuration)
  • pausedTimeRatio L427: this.pausedTimeRatio = this.deltaTotalPausesDuration !== undefined && 0 < elapsedInSec ? this.deltaTotalPausesDuration / elapsedInSec : undefined
  • deltaTotalInterFrameDelay L430: this.deltaTotalInterFrameDelay = positiveDelta(stats.totalInterFrameDelay, this.totalInterFrameDelay)
  • deltaTotalSquaredInterFrameDelay L431: this.deltaTotalSquaredInterFrameDelay = positiveDelta(stats.totalSquaredInterFrameDelay, this.totalSquaredInterFrameDelay)
  • avgInterFrameDelayInMs L446: this.avgInterFrameDelayInMs = mean * 1000
  • interFrameDelayVariation L447: this.interFrameDelayVariation = 0 < mean ? Math.sqrt(variance) / mean : undefined
  • avgInterFrameDelayInMs L449: this.avgInterFrameDelayInMs = undefined
  • interFrameDelayVariation L450: this.interFrameDelayVariation = undefined
  • deltaPliCount L452: this.deltaPliCount = positiveDelta(stats.pliCount, this.pliCount)
  • deltaFirCount L453: this.deltaFirCount = positiveDelta(stats.firCount, this.firCount)
  • deltaNackCount L454: this.deltaNackCount = positiveDelta(stats.nackCount, this.nackCount)
  • deltaRetransmittedBytesReceived L455: this.deltaRetransmittedBytesReceived = positiveDelta(stats.retransmittedBytesReceived, this.retransmittedBytesReceived)
  • deltaRetransmittedPacketsReceived L456: this.deltaRetransmittedPacketsReceived = positiveDelta(stats.retransmittedPacketsReceived, this.retransmittedPacketsReceived)
  • retransmissionRatio L458: this.retransmissionRatio = this.deltaRetransmittedBytesReceived !== undefined && 0 < (this.deltaBytesReceived ?? 0) ? Math.min(1, this.deltaRetransmittedBytesReceived / (this.deltaBytesReceived as number)) : undefined
  • avgJitterBufferDelayInMs L462: this.avgJitterBufferDelayInMs = 0 < (this.deltaJitterBufferEmittedCount ?? 0) && this.deltaJitterBufferDelay !== undefined ? (this.deltaJitterBufferDelay / (this.deltaJitterBufferEmittedCount as number)) * 1000 : undefined
  • deltaJitterBufferTargetDelay L465: this.deltaJitterBufferTargetDelay = positiveDelta(stats.jitterBufferTargetDelay, this.jitterBufferTargetDelay)
  • jitterBufferTargetDelayInMs L466: this.jitterBufferTargetDelayInMs = 0 < (this.deltaJitterBufferEmittedCount ?? 0) && this.deltaJitterBufferTargetDelay !== undefined ? (this.deltaJitterBufferTargetDelay / (this.deltaJitterBufferEmittedCount as number)) * 1000 : undefined
  • decodeTimePerFrameInMs L471: this.decodeTimePerFrameInMs = 0 < (this.deltaFramesDecoded ?? 0) && this.deltaTotalDecodeTime !== undefined ? (this.deltaTotalDecodeTime / (this.deltaFramesDecoded as number)) * 1000 : undefined
  • droppedFrameRatio L473: this.droppedFrameRatio = 0 < (this.deltaFramesReceived ?? 0) && this.deltaFramesDropped !== undefined ? this.deltaFramesDropped / (this.deltaFramesReceived as number) : undefined
  • renderRatio L475: this.renderRatio = 0 < (this.deltaFramesDecoded ?? 0) && this.deltaFramesRendered !== undefined ? this.deltaFramesRendered / (this.deltaFramesDecoded as number) : undefined
  • keyFrameRate L477: this.keyFrameRate = this.deltaKeyFramesDecoded !== undefined ? this.deltaKeyFramesDecoded / elapsedInSec : undefined
  • pliRate L478: this.pliRate = this.deltaPliCount !== undefined ? this.deltaPliCount / elapsedInSec : undefined
  • firRate L479: this.firRate = this.deltaFirCount !== undefined ? this.deltaFirCount / elapsedInSec : undefined
  • nackRate L480: this.nackRate = this.deltaNackCount !== undefined ? this.deltaNackCount / elapsedInSec : undefined
  • deltaTime L481: this.deltaTime = elapsedInMs
  • statsClockTime L482: this.statsClockTime += elapsedInMs
  • avgFramesPerSec L496: this.avgFramesPerSec = avgFramesPerSec
  • fpsVolatility L497: this.fpsVolatility = avgDiff / avgFramesPerSec
  • bitPerPixel L500: this.bitPerPixel = this.bitrate / (this.frameWidth * this.frameHeight * this.framesPerSecond)
  • totalFractionLost L505: this.totalFractionLost = 0 < this.packetsReceived && 0 < this.packetsLost ? (this.packetsLost) / (this.packetsLost + this.packetsReceived) : 0.0
  • deltaFractionLost L509: this.deltaFractionLost = 0 < this.deltaPacketsReceived && 0 < this.deltaPacketsLost ? (this.deltaPacketsLost) / (this.deltaPacketsLost + this.deltaPacketsReceived) : 0.0
  • ewmaFps L513: this.ewmaFps = this.ewmaFps ? 0.9 * this.ewmaFps + 0.1 * this.framesPerSecond : this.framesPerSecond

Exact wire projection

public createSample(): InboundRtpStats {
		return {
			timestamp: this.timestamp,
			id: this.id,
			ssrc: this.ssrc,
			kind: this.kind,
			trackIdentifier: this.trackIdentifier,
			transportId: this.transportId,
			codecId: this.codecId,
			packetsReceived: this.packetsReceived,
			packetsReceivedWithEct1: this.packetsReceivedWithEct1,
			packetsReceivedWithCe: this.packetsReceivedWithCe,
			packetsReportedAsLost: this.packetsReportedAsLost,
			packetsReportedAsLostButRecovered: this.packetsReportedAsLostButRecovered,
			packetsLost: this.packetsLost,
			jitter: this.jitter,
			mid: this.mid,
			remoteId: this.remoteId,
			framesDecoded: this.framesDecoded,
			keyFramesDecoded: this.keyFramesDecoded,
			framesRendered: this.framesRendered,
			framesDropped: this.framesDropped,
			frameWidth: this.frameWidth,
			frameHeight: this.frameHeight,
			framesPerSecond: this.framesPerSecond,
			qpSum: this.qpSum,
			totalDecodeTime: this.totalDecodeTime,
			totalInterFrameDelay: this.totalInterFrameDelay,
			totalSquaredInterFrameDelay: this.totalSquaredInterFrameDelay,
			pauseCount: this.pauseCount,
			totalPausesDuration: this.totalPausesDuration,
			freezeCount: this.freezeCount,
			totalFreezesDuration: this.totalFreezesDuration,
			lastPacketReceivedTimestamp: this.lastPacketReceivedTimestamp,
			headerBytesReceived: this.headerBytesReceived,
			packetsDiscarded: this.packetsDiscarded,
			fecBytesReceived: this.fecBytesReceived,
			fecPacketsReceived: this.fecPacketsReceived,
			fecPacketsDiscarded: this.fecPacketsDiscarded,
			bytesReceived: this.bytesReceived,
			nackCount: this.nackCount,
			firCount: this.firCount,
			pliCount: this.pliCount,
			totalProcessingDelay: this.totalProcessingDelay,
			estimatedPlayoutTimestamp: this.estimatedPlayoutTimestamp,
			jitterBufferDelay: this.jitterBufferDelay,
			jitterBufferTargetDelay: this.jitterBufferTargetDelay,
			jitterBufferEmittedCount: this.jitterBufferEmittedCount,
			jitterBufferMinimumDelay: this.jitterBufferMinimumDelay,
			totalSamplesReceived: this.totalSamplesReceived,
			concealedSamples: this.concealedSamples,
			silentConcealedSamples: this.silentConcealedSamples,
			concealmentEvents: this.concealmentEvents,
			insertedSamplesForDeceleration: this.insertedSamplesForDeceleration,
			removedSamplesForAcceleration: this.removedSamplesForAcceleration,
			audioLevel: this.audioLevel,
			totalAudioEnergy: this.totalAudioEnergy,
			totalSamplesDuration: this.totalSamplesDuration,
			framesReceived: this.framesReceived,
			decoderImplementation: this.decoderImplementation,
			playoutId: this.playoutId,
			powerEfficientDecoder: this.powerEfficientDecoder,
			framesAssembledFromMultiplePackets: this.framesAssembledFromMultiplePackets,
			totalAssemblyTime: this.totalAssemblyTime,
			retransmittedPacketsReceived: this.retransmittedPacketsReceived,
			retransmittedBytesReceived: this.retransmittedBytesReceived,
			rtxSsrc: this.rtxSsrc,
			fecSsrc: this.fecSsrc,
			totalCorruptionProbability: this.totalCorruptionProbability,
			totalSquaredCorruptionProbability: this.totalSquaredCorruptionProbability,
			corruptionMeasurements: this.corruptionMeasurements,
			attachments: this.attachments,
		}
	}

InboundTrackMonitor

Source

Public field / getterType or declarationSource
CLEAN_QP_RATIOpublic static CLEAN_QP_RATIO = 0.5;L189
COARSE_QP_RATIOpublic static COARSE_QP_RATIO = 0.8;L190
directionpublic readonly direction = ‘inbound’;L192
detectorsDetectorsL193
issuesIssueRegistry<InboundTrackIssues>L199
slicedWindowSlicedWindow<
InboundTrackWindowValues,
// A slice for every stretch the config sizes, so the names are declared once. Only the
// names matter here: how many samples each covers, and where it sits, are runtime.
Record<keyof InboundTrackWindowConfig[’numberOfSamples’], SliceConfig>
>L210
dtxModepublic dtxMode = false;L218
pausedbooleanL229
remoteOutboundTrackPausedbooleanL237
contentTypeTrackContentType / undefinedL244
linkedVideoTrackIdstring / undefinedL247
motionTypeVideoMotionType / undefinedL250
presentedResolution{ width: number, height: number } / undefinedL253
videoTagHTMLVideoElement / undefinedL256
linkedVideoPlayoutDiffInMsnumberL266
displayMagnificationnumberL272
frameFlowStateInboundVideoFlowStateL283
degradedFrameSupplybooleanL300
decodingDegradationnumberL308
quantizationDegradationnumberL345
synthesizedAudioRationumberL348
jitterBufferStressSeveritynumberL351
videoPlayoutSkewnumberL367
decodeBudgetUtilizationnumberL370
inventedSpeechSeveritynumberL373
overloadedDecoderbooleanL376
drybooleanL379
stalledFrameAssemblybooleanL382
playoutDiscrepancybooleanL385
stuckedDecoderbooleanL388
failedVideoRecoverybooleanL391
calculatedScoreCalculatedScoreL393
scorepublic get score() {L398
scoreReasonspublic get scoreReasons() {L402
attachmentsRecord<string, unknown> / undefinedL407
appDataRecord<string, unknown> / undefinedL409
isScreenSharepublic get isScreenShare() {L531
readyStateMediaStreamTrack[‘readyState’]L560
kindpublic get kind() {L568
bitratepublic get bitrate() {L572
jitterpublic get jitter() {L576
fractionLostpublic get fractionLost() {L580

Assignment and formula index

  • attachments L416: this.attachments = attachments
  • issues L420: this.issues = new IssueRegistry<InboundTrackIssues>( this.getPeerConnection().parent.activeIssues.asSink, )
  • slicedWindow L427: this.slicedWindow = new SlicedWindow({ maxAllowedGapInMs: windowConfig.maxAllowedGapInMs, totals: INBOUND_TRACK_WINDOW_VALUES, // Each recovery slice sits at its own detection slice's size, so it covers the stretch // that ends where that detection stretch begins. The two pairs are independent: a // detector reads one pair or the other, never one half of each. slices: { detection: { numberOfSamples: windowConfig.numberOfSamples.detection, }, recovery: { numberOfSamples: windowConfig.numberOfSamples.recovery, offset: windowConfig.numberOfSamples.detection, }, flowDetection: { numberOfSamples: windowConfig.numberOfSamples.flowDetection, }, flowRecovery: { numberOfSamples: windowConfig.numberOfSamples.flowRecovery, offset: windowConfig.numberOfSamples.flowDetection, }, }, })
  • detectors L450: this.detectors = new Detectors()
  • quantizationDegradation L613: this.quantizationDegradation = normalizedQp === undefined || coarse <= clean ? undefined : clamp((normalizedQp - clean) / (coarse - clean), 0, 1)
  • displayMagnification L656: this.displayMagnification = presented && 0 < presented.width && 0 < presented.height && decodedWidth && decodedHeight ? Math.sqrt((presented.width * presented.height) / (decodedWidth * decodedHeight)) : undefined
  • linkedVideoPlayoutDiffInMs L665: this.linkedVideoPlayoutDiffInMs = undefined
  • linkedVideoPlayoutDiffInMs L675: this.linkedVideoPlayoutDiffInMs = audioPlayout - videoPlayout

Exact wire projection

public createSample(): InboundTrackSample {
			return {
				id: this.track.id,
				kind: this.track.kind,
				timestamp: Date.now(),
				attachments: this.attachments,
				score: this.score,
				scoreReasons: sampledScoreReasons(
					this.calculatedScore.reasons,
					this.getPeerConnection()?.parent.config.sendScoreReasonsToServer,
				),
			};
		}

MediaPlayoutMonitor

Source

Public field / getterType or declarationSource
detectorspublic readonly detectors = new Detectors();L14
timestampnumberL16
idstringL17
kindMediaKindL18
synthesizedSamplesDurationnumber / undefinedL19
synthesizedSamplesEventsnumber / undefinedL20
totalSamplesDurationnumber / undefinedL21
totalPlayoutDelaynumber / undefinedL22
totalSamplesCountnumber / undefinedL23
deltaSynthesizedSamplesDurationpublic deltaSynthesizedSamplesDuration = 0;L25
deltaSamplesDurationpublic deltaSamplesDuration = 0;L26
deltaSynthesizedSamplesEventsnumber / undefinedL27
deltaTotalPlayoutDelaynumber / undefinedL28
deltaSamplesCountnumber / undefinedL29
deltaTimenumber / undefinedL32
playoutDelayPerSampleInMsnumber / undefinedL36
synthesizedSamplesRationumber / undefinedL39
attachmentsRecord<string, unknown> / undefinedL41
appDataRecord<string, unknown> / undefinedL43
visitedbooleanL57
statsClockTimepublic statsClockTime = 0;L66

Assignment and formula index

  • id L49: this.id = options.id
  • timestamp L50: this.timestamp = options.timestamp
  • kind L51: this.kind = options.kind as MediaKind
  • deltaTime L79: this.deltaTime = elapsedInMs
  • statsClockTime L80: this.statsClockTime += elapsedInMs
  • deltaSynthesizedSamplesDuration L81: this.deltaSynthesizedSamplesDuration = positiveDelta(stats.synthesizedSamplesDuration, this.synthesizedSamplesDuration) ?? 0
  • deltaSamplesDuration L82: this.deltaSamplesDuration = positiveDelta(stats.totalSamplesDuration, this.totalSamplesDuration) ?? 0
  • deltaSynthesizedSamplesEvents L83: this.deltaSynthesizedSamplesEvents = positiveDelta(stats.synthesizedSamplesEvents, this.synthesizedSamplesEvents)
  • deltaTotalPlayoutDelay L84: this.deltaTotalPlayoutDelay = positiveDelta(stats.totalPlayoutDelay, this.totalPlayoutDelay)
  • deltaSamplesCount L85: this.deltaSamplesCount = positiveDelta(stats.totalSamplesCount, this.totalSamplesCount)
  • playoutDelayPerSampleInMs L89: this.playoutDelayPerSampleInMs = (this.deltaTotalPlayoutDelay * 1000) / this.deltaSamplesCount
  • playoutDelayPerSampleInMs L91: this.playoutDelayPerSampleInMs = undefined
  • synthesizedSamplesRatio L94: this.synthesizedSamplesRatio = this.deltaSamplesDuration > 0 ? Math.min(1, this.deltaSynthesizedSamplesDuration / this.deltaSamplesDuration) : 0

Exact wire projection

public createSample(): MediaPlayoutStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			kind: this.kind,
			synthesizedSamplesDuration: this.synthesizedSamplesDuration,
			synthesizedSamplesEvents: this.synthesizedSamplesEvents,
			totalSamplesDuration: this.totalSamplesDuration,
			totalPlayoutDelay: this.totalPlayoutDelay,
			totalSamplesCount: this.totalSamplesCount,
			attachments: this.attachments,
		};
	}

MediaSourceMonitor

Source

Public field / getterType or declarationSource
timestampnumberL9
idstringL10
kindMediaKindL11
audioLevelnumber / undefinedL12
trackIdentifierstringL13
totalAudioEnergynumber / undefinedL14
totalSamplesDurationnumber / undefinedL15
echoReturnLossnumber / undefinedL16
echoReturnLossEnhancementnumber / undefinedL17
widthnumber / undefinedL18
heightnumber / undefinedL19
framesnumber / undefinedL20
framesPerSecondnumber / undefinedL21
deltaFramesnumber / undefinedL24
deltaTotalAudioEnergynumber / undefinedL25
deltaSamplesDurationnumber / undefinedL26
deltaTimenumber / undefinedL29
producedFpsnumber / undefinedL33
rmsAudioLevelnumber / undefinedL39
attachmentsRecord<string, unknown> / undefinedL42
appDataRecord<string, unknown> / undefinedL44
visitedbooleanL58
statsClockTimepublic statsClockTime = 0;L67

Assignment and formula index

  • id L50: this.id = options.id
  • timestamp L51: this.timestamp = options.timestamp
  • kind L52: this.kind = options.kind as MediaKind
  • deltaTime L89: this.deltaTime = elapsedInMs
  • statsClockTime L90: this.statsClockTime += elapsedInMs
  • deltaFrames L93: this.deltaFrames = positiveDelta(stats.frames, this.frames)
  • deltaTotalAudioEnergy L94: this.deltaTotalAudioEnergy = positiveDelta(stats.totalAudioEnergy, this.totalAudioEnergy)
  • deltaSamplesDuration L95: this.deltaSamplesDuration = positiveDelta(stats.totalSamplesDuration, this.totalSamplesDuration)
  • producedFps L103: this.producedFps = framesDelta !== undefined && 0 <= framesDelta ? framesDelta / elapsedInSec : undefined
  • rmsAudioLevel L107: this.rmsAudioLevel = this.deltaTotalAudioEnergy !== undefined && this.deltaSamplesDuration !== undefined && this.deltaSamplesDuration > 0 ? Math.sqrt(this.deltaTotalAudioEnergy / this.deltaSamplesDuration) : undefined

Exact wire projection

public createSample(): MediaSourceStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			kind: this.kind,
			audioLevel: this.audioLevel,
			trackIdentifier: this.trackIdentifier,
			totalAudioEnergy: this.totalAudioEnergy,
			totalSamplesDuration: this.totalSamplesDuration,
			echoReturnLoss: this.echoReturnLoss,
			echoReturnLossEnhancement: this.echoReturnLossEnhancement,
			width: this.width,
			height: this.height,
			frames: this.frames,
			framesPerSecond: this.framesPerSecond,
			attachments: this.attachments,
		};
	}

OutboundRtpMonitor

Source

Public field / getterType or declarationSource
timestampnumberL9
idstringL10
ssrcnumberL11
kindMediaKindL12
qualityLimitationDurationsQualityLimitationDurationsL13
transportIdstring / undefinedL14
codecIdstring / undefinedL15
packetsSentnumber / undefinedL16
bytesSentnumber / undefinedL17
midstring / undefinedL18
mediaSourceIdstring / undefinedL19
remoteIdstring / undefinedL20
ridstring / undefinedL21
encodingIndexnumber / undefinedL22
headerBytesSentnumber / undefinedL23
retransmittedPacketsSentnumber / undefinedL24
retransmittedBytesSentnumber / undefinedL25
rtxSsrcnumber / undefinedL26
targetBitratenumber / undefinedL27
totalEncodedBytesTargetnumber / undefinedL28
frameWidthnumber / undefinedL29
frameHeightnumber / undefinedL30
framesPerSecondnumber / undefinedL31
framesSentnumber / undefinedL32
hugeFramesSentnumber / undefinedL33
framesEncodednumber / undefinedL34
keyFramesEncodednumber / undefinedL35
qpSumnumber / undefinedL36
psnrSumPsnrSum / undefinedL37
psnrMeasurementsnumber / undefinedL38
totalEncodeTimenumber / undefinedL39
totalPacketSendDelaynumber / undefinedL40
qualityLimitationReasonstring / undefinedL41
qualityLimitationResolutionChangesnumber / undefinedL42
nackCountnumber / undefinedL43
firCountnumber / undefinedL44
pliCountnumber / undefinedL45
encoderImplementationstring / undefinedL46
powerEfficientEncoderboolean / undefinedL47
activeboolean / undefinedL48
scalabilityModestring / undefinedL49
packetsSentWithEct1number / undefinedL50
bitratenumber / undefinedL53
payloadBitratenumber / undefinedL54
packetRatenumber / undefinedL55
bitPerPixelnumber / undefinedL56
deltaPacketsSentnumber / undefinedL58
deltaBytesSentnumber / undefinedL59
deltaHeaderBytesSentnumber / undefinedL60
deltaRetransmittedPacketsSentnumber / undefinedL61
deltaRetransmittedBytesSentnumber / undefinedL62
deltaFramesSentnumber / undefinedL63
deltaFramesEncodednumber / undefinedL64
deltaKeyFramesEncodednumber / undefinedL65
deltaHugeFramesSentnumber / undefinedL66
deltaEncodeTimenumber / undefinedL67
deltaPacketSendDelaynumber / undefinedL68
deltaQpSumnumber / undefinedL69
deltaNackCountnumber / undefinedL70
deltaFirCountnumber / undefinedL71
deltaPliCountnumber / undefinedL72
deltaTimenumber / undefinedL75
avgEncodeTimePerFrameInMsnumber / undefinedL78
retransmissionRationumber / undefinedL81
retransmittedPacketRationumber / undefinedL84
avgQpPerFramenumber / undefinedL87
avgPacketSendDelayInMsnumber / undefinedL90
keyFrameRatenumber / undefinedL93
nackRatenumber / undefinedL96
pliRatenumber / undefinedL97
firRatenumber / undefinedL98
qualityLimitationDurationShares{
none: number;
cpu: number;
bandwidth: number;
other: number;
} / undefinedL101
attachmentsRecord<string, unknown> / undefinedL109
appDataRecord<string, unknown> / undefinedL111
visitedbooleanL125
trackIdentifierpublic get trackIdentifier() {L133
statsClockTimepublic statsClockTime = 0;L142

Assignment and formula index

  • id L117: this.id = options.id
  • timestamp L118: this.timestamp = options.timestamp
  • ssrc L119: this.ssrc = options.ssrc
  • kind L120: this.kind = options.kind as MediaKind
  • deltaTime L181: this.deltaTime = elapsedInMs
  • statsClockTime L182: this.statsClockTime += elapsedInMs
  • deltaPacketsSent L185: this.deltaPacketsSent = positiveDelta(stats.packetsSent, this.packetsSent)
  • packetRate L187: this.packetRate = this.deltaPacketsSent / elapsedInSec
  • deltaBytesSent L190: this.deltaBytesSent = positiveDelta(stats.bytesSent, this.bytesSent)
  • deltaHeaderBytesSent L191: this.deltaHeaderBytesSent = positiveDelta(stats.headerBytesSent, this.headerBytesSent)
  • deltaRetransmittedBytesSent L192: this.deltaRetransmittedBytesSent = positiveDelta(stats.retransmittedBytesSent, this.retransmittedBytesSent)
  • deltaRetransmittedPacketsSent L193: this.deltaRetransmittedPacketsSent = positiveDelta(stats.retransmittedPacketsSent, this.retransmittedPacketsSent)
  • bitrate L196: this.bitrate = Math.max(0, this.deltaBytesSent * 8 / elapsedInSec)
  • payloadBitrate L201: this.payloadBitrate = Math.max(0, payloadBytesSent * 8 / elapsedInSec)
  • retransmissionRatio L204: this.retransmissionRatio = this.deltaBytesSent > 0 && this.deltaRetransmittedBytesSent !== undefined ? Math.min(1, this.deltaRetransmittedBytesSent / this.deltaBytesSent) : 0
  • retransmittedPacketRatio L210: this.retransmittedPacketRatio = this.deltaPacketsSent > 0 ? Math.min(1, this.deltaRetransmittedPacketsSent / this.deltaPacketsSent) : 0
  • deltaFramesSent L215: this.deltaFramesSent = positiveDelta(stats.framesSent, this.framesSent)
  • deltaFramesEncoded L216: this.deltaFramesEncoded = positiveDelta(stats.framesEncoded, this.framesEncoded)
  • deltaKeyFramesEncoded L217: this.deltaKeyFramesEncoded = positiveDelta(stats.keyFramesEncoded, this.keyFramesEncoded)
  • deltaHugeFramesSent L218: this.deltaHugeFramesSent = positiveDelta(stats.hugeFramesSent, this.hugeFramesSent)
  • deltaEncodeTime L219: this.deltaEncodeTime = positiveDelta(stats.totalEncodeTime, this.totalEncodeTime)
  • deltaPacketSendDelay L220: this.deltaPacketSendDelay = positiveDelta(stats.totalPacketSendDelay, this.totalPacketSendDelay)
  • deltaQpSum L221: this.deltaQpSum = positiveDelta(stats.qpSum, this.qpSum)
  • deltaNackCount L222: this.deltaNackCount = positiveDelta(stats.nackCount, this.nackCount)
  • deltaFirCount L223: this.deltaFirCount = positiveDelta(stats.firCount, this.firCount)
  • deltaPliCount L224: this.deltaPliCount = positiveDelta(stats.pliCount, this.pliCount)
  • avgEncodeTimePerFrameInMs L229: this.avgEncodeTimePerFrameInMs = (this.deltaEncodeTime * 1000) / this.deltaFramesEncoded
  • avgQpPerFrame L232: this.avgQpPerFrame = this.deltaQpSum / this.deltaFramesEncoded
  • avgPacketSendDelayInMs L238: this.avgPacketSendDelayInMs = (this.deltaPacketSendDelay * 1000) / this.deltaPacketsSent
  • keyFrameRate L242: this.keyFrameRate = this.deltaKeyFramesEncoded / elapsedInSec
  • nackRate L245: this.nackRate = this.deltaNackCount / elapsedInSec
  • pliRate L248: this.pliRate = this.deltaPliCount / elapsedInSec
  • firRate L251: this.firRate = this.deltaFirCount / elapsedInSec
  • qualityLimitationDurationShares L254: this.qualityLimitationDurationShares = this._calculateQualityLimitationShares( this.qualityLimitationDurations, stats.qualityLimitationDurations, )
  • bitPerPixel L262: this.bitPerPixel = this.bitrate / (this.frameHeight * this.frameWidth * this.framesPerSecond)

Exact wire projection

public createSample(): OutboundRtpStats {
		return {
			timestamp: this.timestamp,
			id: this.id,
			ssrc: this.ssrc,
			kind: this.kind,
			qualityLimitationDurations: this.qualityLimitationDurations,
			transportId: this.transportId,
			codecId: this.codecId,
			packetsSent: this.packetsSent,
			bytesSent: this.bytesSent,
			mid: this.mid,
			mediaSourceId: this.mediaSourceId,
			remoteId: this.remoteId,
			rid: this.rid,
			encodingIndex: this.encodingIndex,
			headerBytesSent: this.headerBytesSent,
			retransmittedPacketsSent: this.retransmittedPacketsSent,
			retransmittedBytesSent: this.retransmittedBytesSent,
			rtxSsrc: this.rtxSsrc,
			targetBitrate: this.targetBitrate,
			totalEncodedBytesTarget: this.totalEncodedBytesTarget,
			frameWidth: this.frameWidth,
			frameHeight: this.frameHeight,
			framesPerSecond: this.framesPerSecond,
			framesSent: this.framesSent,
			hugeFramesSent: this.hugeFramesSent,
			framesEncoded: this.framesEncoded,
			keyFramesEncoded: this.keyFramesEncoded,
			qpSum: this.qpSum,
			psnrSum: this.psnrSum,
			psnrMeasurements: this.psnrMeasurements,
			totalEncodeTime: this.totalEncodeTime,
			totalPacketSendDelay: this.totalPacketSendDelay,
			qualityLimitationReason: this.qualityLimitationReason,
			qualityLimitationResolutionChanges: this.qualityLimitationResolutionChanges,
			nackCount: this.nackCount,
			firCount: this.firCount,
			pliCount: this.pliCount,
			encoderImplementation: this.encoderImplementation,
			powerEfficientEncoder: this.powerEfficientEncoder,
			active: this.active,
			scalabilityMode: this.scalabilityMode,
			packetsSentWithEct1: this.packetsSentWithEct1,
			attachments: this.attachments,
		};
	}

OutboundTrackMonitor

Source

Public field / getterType or declarationSource
directionpublic readonly direction = ‘outbound’;L91
detectorsDetectorsL92
issuesIssueRegistry<OutboundTrackIssues>L93
slicedWindowSlicedWindow<
OutboundTrackWindowValues,
// A slice for every stretch the config sizes, so the names are declared once. Only the
// names matter here: how many samples each covers, and where it sits, are runtime.
Record<keyof OutboundTrackWindowConfig[’numberOfSamples’], SliceConfig>
>L102
bitratenumberL119
jitternumberL120
fractionLostnumberL121
sendingPacketRatenumberL122
remoteReceivedPacketRatenumberL123
sourceEndedpublic sourceEnded = false;L130
mappedOutboundRtpspublic readonly mappedOutboundRtps = new Map<number, OutboundRtpMonitor>();L131
pausedbooleanL145
settingsMediaTrackSettingsL164
videoCaptureSettingsChangedbooleanL167
degradedVideoCapturebooleanL173
videoCaptureDegradationnumberL181
degradedEncodingPerformancebooleanL184
videoEncodingDegradationnumberL187
drybooleanL190
silentAudioSourcebooleanL193
lostCaptureSourcebooleanL199
contentTypeTrackContentType / undefinedL209
calculatedScoreCalculatedScoreL213
scorepublic get score() {L218
scoreReasonspublic get scoreReasons() {L222
attachmentsRecord<string, unknown> / undefinedL227
appDataRecord<string, unknown> / undefinedL229
kindpublic get kind() {L316
isScreenSharepublic get isScreenShare() {L321
readyStateMediaStreamTrack[‘readyState’]L325
highestLayerOutboundRtpMonitorL343

Assignment and formula index

  • attachments L236: this.attachments = attachments
  • detectors L237: this.detectors = new Detectors()
  • issues L238: this.issues = new IssueRegistry<OutboundTrackIssues>( this.getPeerConnection().parent.activeIssues.asSink )
  • slicedWindow L288: this.slicedWindow = new SlicedWindow({ maxAllowedGapInMs: windowConfig.maxAllowedGapInMs, totals: { highestLayerTotalEncodedFrames: null, mediaSourceTotalProducedFrames: null, }, slices: { detection: { numberOfSamples: windowConfig.numberOfSamples.detection, }, recovery: { numberOfSamples: windowConfig.numberOfSamples.recovery, offset: windowConfig.numberOfSamples.detection, } } })
  • bitrate L348: this.bitrate = 0
  • jitter L349: this.jitter = 0
  • fractionLost L350: this.fractionLost = 0
  • sendingPacketRate L351: this.sendingPacketRate = 0
  • remoteReceivedPacketRate L352: this.remoteReceivedPacketRate = 0
  • highestLayer L353: this.highestLayer = undefined
  • bitrate L356: this.bitrate += outboundRtp.bitrate ?? 0
  • jitter L357: this.jitter += outboundRtp.getRemoteInboundRtp()?.jitter ?? 0
  • fractionLost L358: this.fractionLost += outboundRtp.getRemoteInboundRtp()?.deltaFractionLost ?? 0
  • sendingPacketRate L359: this.sendingPacketRate += outboundRtp.packetRate ?? 0
  • remoteReceivedPacketRate L360: this.remoteReceivedPacketRate += outboundRtp.getRemoteInboundRtp()?.packetRate ?? 0
  • highestLayer L364: this.highestLayer = outboundRtp
  • highestLayer L367: this.highestLayer = outboundRtp
  • settings L402: this.settings = settings ? { ...settings } : undefined
  • settings L405: this.settings = undefined
  • videoCaptureSettingsChanged L408: this.videoCaptureSettingsChanged = previous === undefined ? undefined : previous.frameRate !== this.settings?.frameRate || previous.width !== this.settings?.width || previous.height !== this.settings?.height

Exact wire projection

public createSample(): OutboundTrackSample {
		return {
			id: this.track.id,
			kind: this.kind,
			timestamp: Date.now(),
			attachments: this.attachments,
			score: this.score,
			scoreReasons: sampledScoreReasons(
				this.calculatedScore.reasons,
				this.getPeerConnection()?.parent.config.sendScoreReasonsToServer,
			),
		};
	}

PeerConnectionMonitor

Source

Public field / getterType or declarationSource
statsAdaptersStatsAdaptersL171
detectorsDetectorsL173
issuesIssueRegistry<PeerConnectionIssues>L180
mappedCodecMonitorspublic readonly mappedCodecMonitors = new Map<string, CodecMonitor>();L181
mappedInboundRtpMonitorspublic readonly mappedInboundRtpMonitors = new Map<number, InboundRtpMonitor>();L182
mappedRemoteOutboundRtpMonitorspublic readonly mappedRemoteOutboundRtpMonitors = new Map<number, RemoteOutboundRtpMonitor>();L183
mappedOutboundRtpMonitorspublic readonly mappedOutboundRtpMonitors = new Map<number, OutboundRtpMonitor>();L184
mappedDataChannelMonitorspublic readonly mappedDataChannelMonitors = new Map<string, DataChannelMonitor>();L185
mappedRemoteInboundRtpMonitorspublic readonly mappedRemoteInboundRtpMonitors = new Map<number, RemoteInboundRtpMonitor>();L186
mappedMediaSourceMonitorspublic readonly mappedMediaSourceMonitors = new Map<string, MediaSourceMonitor>();L187
mappedMediaPlayoutMonitorspublic readonly mappedMediaPlayoutMonitors = new Map<string, MediaPlayoutMonitor>();L188
mappedPeerConnectionTransportMonitorspublic readonly mappedPeerConnectionTransportMonitors = new Map<string, PeerConnectionTransportMonitor>();L189
mappedIceTransportMonitorspublic readonly mappedIceTransportMonitors = new Map<string, IceTransportMonitor>();L190
mappedIceCandidateMonitorspublic readonly mappedIceCandidateMonitors = new Map<string, IceCandidateMonitor>();L191
mappedIceCandidatePairMonitorspublic readonly mappedIceCandidatePairMonitors = new Map<string, IceCandidatePairMonitor>();L192
mappedCertificateMonitorspublic readonly mappedCertificateMonitors = new Map<string, CertificateMonitor>();L193
mappedSelectedIcePathspublic readonly mappedSelectedIcePaths = new Map<string, SelectedIcePath>();L195
mappedInboundTrackspublic readonly mappedInboundTracks = new Map<string, InboundTrackMonitor>();L202
mappedOutboundTrackspublic readonly mappedOutboundTracks = new Map<string, OutboundTrackMonitor>();L203
closedpublic closed = false;L209
sendingAudioBitratepublic sendingAudioBitrate = 0;L212
sendingVideoBitratepublic sendingVideoBitrate = 0;L213
receivingAudioBitratepublic receivingAudioBitrate = 0;L214
receivingVideoBitratepublic receivingVideoBitrate = 0;L215
dataChannelSendingBitratepublic dataChannelSendingBitrate = 0;L216
dataChannelReceivingBitratepublic dataChannelReceivingBitrate = 0;L217
outboundFractionLostpublic outboundFractionLost = 0.0;L219
inboundFractionalLostpublic inboundFractionalLost = 0.0;L220
avgInboundFractionLostnumberL228
avgOutboundFractionLostnumberL231
avgInboundJitterInMsnumberL234
transportStabilitynumberL251
deltaTimenumber / undefinedL258
statsClockTimepublic statsClockTime = 0;L265
slicedWindowSlicedWindow<
PeerConnectionWindowValues,
// A slice for every stretch the config sizes, so the names are declared once. Only the
// names matter here: how many samples each covers, and where it sits, are runtime.
Record<keyof PeerConnectionWindowConfig[’numberOfSamples’], SliceConfig>
>L286
totalInboundPacketsLostnumberL296
totalInboundPacketsReceivednumberL297
totalOutboundPacketsSentnumberL298
totalOutboundPacketsReceivednumberL299
totalOutboundPacketsLostnumberL300
totalDataChannelBytesSentnumberL301
totalDataChannelBytesReceivednumberL302
totalSentAudioBytesnumberL303
totalSentVideoBytesnumberL304
totalReceivedAudioBytesnumberL305
totalReceivedVideoBytesnumberL306
totalVideoEncodeTimeInMsnumberL307
totalVideoDecodeTimeInMsnumberL308
totalAvailableIncomingBitratenumberL309
totalAvailableOutgoingBitratenumberL310
totalPacketSendDelayInSecnumberL311
deltaInboundPacketsLostnumberL314
deltaInboundPacketsReceivednumberL315
deltaOutboundPacketsSentnumberL316
deltaOutboundPacketsReceivednumberL317
deltaOutboundPacketsLostnumberL318
deltaAudioBytesSentnumberL319
deltaVideoBytesSentnumberL320
deltaAudioBytesReceivednumberL321
deltaVideoBytesReceivednumberL322
deltaDataChannelBytesReceivednumberL323
deltaDataChannelBytesSentnumberL324
deltaPacketSendDelayInSecnumberL325
deltaVideoPacketsSentnumberL327
deltaVideoEncodeTimeInMsnumberL334
deltaVideoDecodeTimeInMsnumberL335
avgPacketSendDelayInMsnumberL342
deltaInboundVideoJitterBufferDelayInSecnumberL345
deltaInboundVideoJitterBufferEmittedCountnumberL346
avgInboundVideoJitterBufferDelayInMsnumberL356
uplinkCongestedpublic uplinkCongested = false;L363
uplinkVideoCongestionSeveritynumberL364
downlinkCongestedpublic downlinkCongested = false;L365
downlinkVideoCongestionSeveritynumberL366
cpulimitedpublic cpulimited = false;L368
stalledRtpSenderbooleanL382
stalledTransportDemuxbooleanL385
hasInboundMediapublic hasInboundMedia = false;L387
hasOutboundMediapublic hasOutboundMedia = false;L388
hasInboundVideopublic hasInboundVideo = false;L395
qualityLimitationReasonPeerConnectionQualityLimitationReasonL402
iceRttInSecnumberL408
ewmaIceRttInSecnumberL409
rtcpRttInSecnumberL412
ewmaRtcpRttInSecnumberL413
connectingStartedAtnumberL414
connectedAtnumberL415
iceStateW3C.RtcIceTransportStateL417
iceGatheringStatestringL420
usingTURNbooleanL422
usingTCPbooleanL423
calculatedStabilityScoreCalculatedScoreL424
appDataRecord<string, unknown> / undefinedL430
avgRttInSecnumber / undefinedL541
ewmaRttInSecnumber / undefinedL546
scorepublic get score() {L550
scoreReasonspublic get scoreReasons() {L554
congestedpublic congested = false;L565
receivingBitratepublic get receivingBitrate() {L567
sendingBitratepublic get sendingBitrate() {L571
trackspublic get tracks() {L575
codecspublic get codecs() {L985
inboundRtpspublic get inboundRtps() {L989
remoteOutboundRtpspublic get remoteOutboundRtps() {L1042
outboundRtpspublic get outboundRtps() {L1046
remoteInboundRtpspublic get remoteInboundRtps() {L1050
mediaSourcespublic get mediaSources() {L1054
mediaPlayoutspublic get mediaPlayouts() {L1058
dataChannelspublic get dataChannels() {L1062
peerConnectionTransportspublic get peerConnectionTransports() {L1066
iceTransportspublic get iceTransports() {L1070
iceCandidatespublic get iceCandidates() {L1074
localIceCandidatespublic get localIceCandidates() {L1079
iceCandidatePairspublic get iceCandidatePairs() {L1083
certificatespublic get certificates() {L1087
selectedIcePathspublic get selectedIcePaths() {L1091
selectedIcePathSelectedIcePath / undefinedL1099
blockedTransportbooleanL1110
selectedIceCandidatePairspublic get selectedIceCandidatePairs() {L1118
connectionStatepublic get connectionState() {L1164

Assignment and formula index

  • statsAdapters L440: this.statsAdapters = new StatsAdapters(logger)
  • issues L441: this.issues = new IssueRegistry<PeerConnectionIssues>(parent.activeIssues.asSink)
  • slicedWindow L446: this.slicedWindow = new SlicedWindow({ maxAllowedGapInMs: windowConfig.maxAllowedGapInMs, totals: PEER_CONNECTION_WINDOW_VALUES, slices: { detection: { numberOfSamples: windowConfig.numberOfSamples.detection, }, recovery: { numberOfSamples: windowConfig.numberOfSamples.recovery, offset: windowConfig.numberOfSamples.detection, }, }, })
  • detectors L459: this.detectors = new Detectors()
  • deltaTime L632: this.deltaTime = timeDelta !== undefined && 0 < timeDelta ? timeDelta : undefined
  • statsClockTime L633: this.statsClockTime += this.deltaTime ?? 0
  • deltaVideoBytesSent L642: this.deltaVideoBytesSent = undefined
  • deltaAudioBytesSent L643: this.deltaAudioBytesSent = undefined
  • deltaVideoBytesReceived L644: this.deltaVideoBytesReceived = undefined
  • deltaAudioBytesReceived L645: this.deltaAudioBytesReceived = undefined
  • deltaDataChannelBytesReceived L646: this.deltaDataChannelBytesReceived = undefined
  • deltaDataChannelBytesSent L647: this.deltaDataChannelBytesSent = undefined
  • deltaOutboundPacketsLost L648: this.deltaOutboundPacketsLost = undefined
  • deltaOutboundPacketsReceived L649: this.deltaOutboundPacketsReceived = undefined
  • deltaOutboundPacketsSent L650: this.deltaOutboundPacketsSent = undefined
  • deltaInboundPacketsLost L651: this.deltaInboundPacketsLost = undefined
  • deltaInboundPacketsReceived L652: this.deltaInboundPacketsReceived = undefined
  • deltaPacketSendDelayInSec L653: this.deltaPacketSendDelayInSec = undefined
  • deltaInboundVideoJitterBufferDelayInSec L654: this.deltaInboundVideoJitterBufferDelayInSec = undefined
  • deltaInboundVideoJitterBufferEmittedCount L655: this.deltaInboundVideoJitterBufferEmittedCount = undefined
  • avgInboundVideoJitterBufferDelayInMs L656: this.avgInboundVideoJitterBufferDelayInMs = undefined
  • deltaVideoPacketsSent L657: this.deltaVideoPacketsSent = undefined
  • deltaVideoEncodeTimeInMs L658: this.deltaVideoEncodeTimeInMs = undefined
  • deltaVideoDecodeTimeInMs L659: this.deltaVideoDecodeTimeInMs = undefined
  • avgPacketSendDelayInMs L660: this.avgPacketSendDelayInMs = undefined
  • sendingAudioBitrate L662: this.sendingAudioBitrate = 0
  • sendingVideoBitrate L663: this.sendingVideoBitrate = 0
  • receivingAudioBitrate L664: this.receivingAudioBitrate = 0
  • receivingVideoBitrate L665: this.receivingVideoBitrate = 0
  • dataChannelSendingBitrate L666: this.dataChannelSendingBitrate = 0
  • dataChannelReceivingBitrate L667: this.dataChannelReceivingBitrate = 0
  • outboundFractionLost L668: this.outboundFractionLost = 0
  • inboundFractionalLost L669: this.inboundFractionalLost = 0
  • totalAvailableIncomingBitrate L670: this.totalAvailableIncomingBitrate = undefined
  • totalAvailableOutgoingBitrate L671: this.totalAvailableOutgoingBitrate = undefined
  • qualityLimitationReason L672: this.qualityLimitationReason = undefined
  • hasInboundMedia L673: this.hasInboundMedia = false
  • hasOutboundMedia L674: this.hasOutboundMedia = false
  • hasInboundVideo L675: this.hasInboundVideo = false
  • receivingAudioBitrate L689: this.receivingAudioBitrate += monitor?.bitrate ?? 0
  • deltaAudioBytesReceived L690: this.deltaAudioBytesReceived = accumulatedValue(this.deltaAudioBytesReceived, monitor?.deltaBytesReceived)
  • hasInboundMedia L691: this.hasInboundMedia = true
  • receivingVideoBitrate L694: this.receivingVideoBitrate += monitor?.bitrate ?? 0
  • deltaVideoBytesReceived L695: this.deltaVideoBytesReceived = accumulatedValue(this.deltaVideoBytesReceived, monitor?.deltaBytesReceived)
  • hasInboundMedia L696: this.hasInboundMedia = true
  • hasInboundVideo L697: this.hasInboundVideo = true
  • deltaVideoDecodeTimeInMs L700: this.deltaVideoDecodeTimeInMs = accumulatedValue( this.deltaVideoDecodeTimeInMs, monitor.deltaTotalDecodeTime === undefined ? undefined : monitor.deltaTotalDecodeTime * 1000, )
  • deltaInboundVideoJitterBufferDelayInSec L712: this.deltaInboundVideoJitterBufferDelayInSec = accumulatedValue( this.deltaInboundVideoJitterBufferDelayInSec, monitor?.deltaJitterBufferDelay, )
  • deltaInboundVideoJitterBufferEmittedCount L716: this.deltaInboundVideoJitterBufferEmittedCount = accumulatedValue( this.deltaInboundVideoJitterBufferEmittedCount, monitor?.deltaJitterBufferEmittedCount, )
  • inboundFractionalLost L725: this.inboundFractionalLost += monitor?.deltaFractionLost ?? 0.0
  • deltaInboundPacketsLost L726: this.deltaInboundPacketsLost = accumulatedValue(this.deltaInboundPacketsLost, monitor?.deltaPacketsLost)
  • deltaInboundPacketsReceived L727: this.deltaInboundPacketsReceived = accumulatedValue(this.deltaInboundPacketsReceived, monitor?.deltaPacketsReceived)
  • sendingAudioBitrate L745: this.sendingAudioBitrate += monitor?.bitrate ?? 0
  • deltaAudioBytesSent L746: this.deltaAudioBytesSent = accumulatedValue(this.deltaAudioBytesSent, monitor?.deltaBytesSent)
  • hasOutboundMedia L747: this.hasOutboundMedia = true
  • sendingVideoBitrate L750: this.sendingVideoBitrate += monitor?.bitrate ?? 0
  • deltaVideoBytesSent L751: this.deltaVideoBytesSent = accumulatedValue(this.deltaVideoBytesSent, monitor?.deltaBytesSent)
  • deltaVideoEncodeTimeInMs L754: this.deltaVideoEncodeTimeInMs = accumulatedValue( this.deltaVideoEncodeTimeInMs, monitor.deltaEncodeTime === undefined ? undefined : monitor.deltaEncodeTime * 1000, )
  • totalPacketSendDelayInSec L761: this.totalPacketSendDelayInSec = accumulatedValue(this.totalPacketSendDelayInSec, monitor?.deltaPacketSendDelay)
  • deltaPacketSendDelayInSec L762: this.deltaPacketSendDelayInSec = accumulatedValue(this.deltaPacketSendDelayInSec, monitor?.deltaPacketSendDelay)
  • deltaVideoPacketsSent L763: this.deltaVideoPacketsSent = accumulatedValue(this.deltaVideoPacketsSent, monitor?.deltaPacketsSent)
  • hasOutboundMedia L764: this.hasOutboundMedia = true
  • deltaOutboundPacketsSent L767: this.deltaOutboundPacketsSent = accumulatedValue(this.deltaOutboundPacketsSent, monitor?.deltaPacketsSent)
  • outboundFractionLost L786: this.outboundFractionLost += monitor?.deltaFractionLost ?? 0.0
  • deltaOutboundPacketsLost L787: this.deltaOutboundPacketsLost = accumulatedValue(this.deltaOutboundPacketsLost, monitor?.deltaPacketsLost)
  • deltaOutboundPacketsReceived L788: this.deltaOutboundPacketsReceived = accumulatedValue(this.deltaOutboundPacketsReceived, monitor?.deltaPacketsReceived)
  • deltaDataChannelBytesSent L795: this.deltaDataChannelBytesSent = accumulatedValue(this.deltaDataChannelBytesSent, monitor?.deltaBytesSent)
  • deltaDataChannelBytesReceived L796: this.deltaDataChannelBytesReceived = accumulatedValue(this.deltaDataChannelBytesReceived, monitor?.deltaBytesReceived)
  • dataChannelSendingBitrate L797: this.dataChannelSendingBitrate += monitor?.sendingBitrate ?? 0
  • dataChannelReceivingBitrate L798: this.dataChannelReceivingBitrate += monitor?.receivingBitrate ?? 0
  • rtcpRttInSec L846: this.rtcpRttInSec = rtcpRttMeasurementsInS.reduce((acc, rtt) => acc + rtt, 0) / rtcpRttMeasurementsInS.length
  • ewmaRtcpRttInSec L847: this.ewmaRtcpRttInSec = this.ewmaRtcpRttInSec !== undefined ? (this.rtcpRttInSec * 0.1) + (this.ewmaRtcpRttInSec * 0.9) : this.rtcpRttInSec
  • totalAvailableIncomingBitrate L856: this.totalAvailableIncomingBitrate = accumulatedValue(this.totalAvailableIncomingBitrate, selectedPair.availableIncomingBitrate)
  • totalAvailableOutgoingBitrate L857: this.totalAvailableOutgoingBitrate = accumulatedValue(this.totalAvailableOutgoingBitrate, selectedPair.availableOutgoingBitrate)
  • iceRttInSec L868: this.iceRttInSec = iceRttMeasurementsInS.reduce((acc, rtt) => acc + rtt, 0) / iceRttMeasurementsInS.length
  • ewmaIceRttInSec L869: this.ewmaIceRttInSec = this.ewmaIceRttInSec !== undefined ? (this.iceRttInSec * 0.1) + (this.ewmaIceRttInSec * 0.9) : this.iceRttInSec
  • usingTCP L876: this.usingTCP = selectedIceCandidatePairs.some(pair => pair.usingTcp)
  • usingTURN L877: this.usingTURN = selectedIceCandidatePairs.some(pair => pair.usingTurn)
  • iceState L879: this.iceState = this._mostSevereIceState()
  • avgPacketSendDelayInMs L883: this.avgPacketSendDelayInMs = this.deltaPacketSendDelayInSec !== undefined && this.deltaVideoPacketsSent !== undefined && this.deltaVideoPacketsSent > 0 ? (this.deltaPacketSendDelayInSec * 1000) / this.deltaVideoPacketsSent : undefined
  • avgInboundVideoJitterBufferDelayInMs L891: this.avgInboundVideoJitterBufferDelayInMs = this.deltaInboundVideoJitterBufferDelayInSec !== undefined && this.deltaInboundVideoJitterBufferEmittedCount !== undefined && this.deltaInboundVideoJitterBufferEmittedCount > 0 ? (this.deltaInboundVideoJitterBufferDelayInSec * 1000) / this.deltaInboundVideoJitterBufferEmittedCount : undefined
  • totalDataChannelBytesReceived L897: this.totalDataChannelBytesReceived = accumulatedValue(this.totalDataChannelBytesReceived, this.deltaDataChannelBytesReceived)
  • totalDataChannelBytesSent L898: this.totalDataChannelBytesSent = accumulatedValue(this.totalDataChannelBytesSent, this.deltaDataChannelBytesSent)
  • totalSentAudioBytes L899: this.totalSentAudioBytes = accumulatedValue(this.totalSentAudioBytes, this.deltaAudioBytesSent)
  • totalSentVideoBytes L900: this.totalSentVideoBytes = accumulatedValue(this.totalSentVideoBytes, this.deltaVideoBytesSent)
  • totalReceivedAudioBytes L901: this.totalReceivedAudioBytes = accumulatedValue(this.totalReceivedAudioBytes, this.deltaAudioBytesReceived)
  • totalReceivedVideoBytes L902: this.totalReceivedVideoBytes = accumulatedValue(this.totalReceivedVideoBytes, this.deltaVideoBytesReceived)
  • totalVideoEncodeTimeInMs L903: this.totalVideoEncodeTimeInMs = accumulatedValue(this.totalVideoEncodeTimeInMs, this.deltaVideoEncodeTimeInMs)
  • totalVideoDecodeTimeInMs L904: this.totalVideoDecodeTimeInMs = accumulatedValue(this.totalVideoDecodeTimeInMs, this.deltaVideoDecodeTimeInMs)
  • totalOutboundPacketsSent L905: this.totalOutboundPacketsSent = accumulatedValue(this.totalOutboundPacketsSent, this.deltaOutboundPacketsSent)
  • totalOutboundPacketsReceived L906: this.totalOutboundPacketsReceived = accumulatedValue(this.totalOutboundPacketsReceived, this.deltaOutboundPacketsReceived)
  • totalOutboundPacketsLost L907: this.totalOutboundPacketsLost = accumulatedValue(this.totalOutboundPacketsLost, this.deltaOutboundPacketsLost)
  • totalInboundPacketsLost L908: this.totalInboundPacketsLost = accumulatedValue(this.totalInboundPacketsLost, this.deltaInboundPacketsLost)
  • totalInboundPacketsReceived L909: this.totalInboundPacketsReceived = accumulatedValue(this.totalInboundPacketsReceived, this.deltaInboundPacketsReceived)
  • connectingStartedAt L1155: this.connectingStartedAt = Date.now()
  • connectedAt L1157: this.connectedAt = Date.now()
  • connectingStartedAt L1159: this.connectingStartedAt = undefined
  • connectedAt L1160: this.connectedAt = undefined
  • qualityLimitationReason L1213: this.qualityLimitationReason = newReason
  • qualityLimitationReason L1221: this.qualityLimitationReason = newReason
  • transportStability L1241: this.transportStability = rttInSec === undefined || jitterInMs === undefined || lossFraction === undefined ? undefined : transportStability({ rttInMs: rttInSec * 1000, jitterInMs, packetLossPercent: Math.max( this.avgInboundFractionLost ?? 0, this.avgOutboundFractionLost ?? 0, ) * 100, })
  • avgInboundFractionLost L1272: this.avgInboundFractionLost = 0 < lossCount ? lossSum / lossCount : undefined
  • avgInboundJitterInMs L1273: this.avgInboundJitterInMs = 0 < jitterCount ? jitterSum / jitterCount : undefined
  • avgOutboundFractionLost L1285: this.avgOutboundFractionLost = 0 < outboundLossCount ? outboundLossSum / outboundLossCount : undefined
  • closed L1426: this.closed = true

Exact wire projection

public createSample(): PeerConnectionSample {
		return {
			peerConnectionId: this.peerConnectionId,

			attachments: this.attachments,

			codecs: this.codecs.map(codec => codec.createSample()),
			inboundRtps: this.inboundRtps.map(inboundRtp => inboundRtp.createSample()),
			remoteOutboundRtps: this.remoteOutboundRtps.map(remoteOutboundRtp => remoteOutboundRtp.createSample()),
			outboundRtps: this.outboundRtps.map(outboundRtp => outboundRtp.createSample()),
			remoteInboundRtps: this.remoteInboundRtps.map(remoteInboundRtp => remoteInboundRtp.createSample()),
			mediaSources: this.mediaSources.map(mediaSource => mediaSource.createSample()),
			mediaPlayouts: this.mediaPlayouts.map(mediaPlayout => mediaPlayout.createSample()),
			peerConnectionTransports: this.peerConnectionTransports.map(peerConnectionTransport => peerConnectionTransport.createSample()),
			dataChannels: this.dataChannels.map(dataChannel => dataChannel.createSample()),
			iceTransports: this.iceTransports.map(iceTransport => iceTransport.createSample()),
			iceCandidates: this.iceCandidates.map(iceCandidate => iceCandidate.createSample()),
			iceCandidatePairs: this.iceCandidatePairs.map(iceCandidatePair => iceCandidatePair.createSample()),
			certificates: this.certificates.map(certificate => certificate.createSample()),
			inboundTracks: [ ...this.mappedInboundTracks.values() ].map(inboundTrack => inboundTrack.createSample()),
			outboundTracks: [ ...this.mappedOutboundTracks.values() ].map(outboundTrack => outboundTrack.createSample()),
			score: this.score,
			scoreReasons: sampledScoreReasons(this.calculatedStabilityScore.reasons, this.parent.config.sendScoreReasonsToServer)
		}
	}

PeerConnectionTransportMonitor

Source

Public field / getterType or declarationSource
timestampnumberL7
idstringL8
dataChannelsOpenednumberL9
dataChannelsClosednumberL10
attachmentsRecord<string, unknown> / undefinedL16
appDataRecord<string, unknown> / undefinedL21
visitedbooleanL33

Assignment and formula index

  • id L27: this.id = options.id
  • timestamp L28: this.timestamp = options.timestamp

Exact wire projection

public createSample(): PeerConnectionTransportStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			dataChannelsOpened: this.dataChannelsOpened,
			dataChannelsClosed: this.dataChannelsClosed,
			attachments: this.attachments,
		};
	}

RemoteInboundRtpMonitor

Source

Public field / getterType or declarationSource
timestampnumberL8
idstringL9
ssrcnumberL10
kindstringL11
transportIdstring / undefinedL12
codecIdstring / undefinedL13
packetsReceivednumber / undefinedL14
packetsReceivedWithEct1number / undefinedL15
packetsReceivedWithCenumber / undefinedL16
packetsReportedAsLostnumber / undefinedL17
packetsReportedAsLostButRecoverednumber / undefinedL18
packetsLostnumber / undefinedL19
jitternumber / undefinedL20
localIdstring / undefinedL21
roundTripTimenumber / undefinedL22
totalRoundTripTimenumber / undefinedL23
fractionLostnumber / undefinedL24
roundTripTimeMeasurementsnumber / undefinedL25
packetsWithBleachedEct1Markingnumber / undefinedL26
packetRatenumberL29
deltaPacketsLostnumberL31
deltaPacketsReceivednumberL32
deltaFractionLostnumberL33
avgRoundTripTimeInSecnumberL39
deltaTotalRoundTripTimenumberL41
deltaRoundTripTimeMeasurementsnumberL42
deltaTimenumber / undefinedL45
attachmentsRecord<string, unknown> / undefinedL49
appDataRecord<string, unknown> / undefinedL51
visitedbooleanL66
statsClockTimepublic statsClockTime = 0;L75

Assignment and formula index

  • id L57: this.id = options.id
  • timestamp L58: this.timestamp = options.timestamp
  • ssrc L59: this.ssrc = options.ssrc
  • kind L60: this.kind = options.kind
  • deltaTime L105: this.deltaTime = 0
  • deltaPacketsReceived L106: this.deltaPacketsReceived = undefined
  • deltaPacketsLost L107: this.deltaPacketsLost = undefined
  • deltaFractionLost L108: this.deltaFractionLost = undefined
  • deltaTotalRoundTripTime L109: this.deltaTotalRoundTripTime = undefined
  • deltaRoundTripTimeMeasurements L110: this.deltaRoundTripTimeMeasurements = undefined
  • avgRoundTripTimeInSec L111: this.avgRoundTripTimeInSec = undefined
  • packetRate L112: this.packetRate = undefined
  • deltaTime L117: this.deltaTime = elapsedInMs
  • statsClockTime L118: this.statsClockTime += elapsedInMs
  • deltaPacketsReceived L121: this.deltaPacketsReceived = positiveDelta(stats.packetsReceived, this.packetsReceived)
  • packetRate L123: this.packetRate = this.deltaPacketsReceived / elapsedInSeconds
  • deltaPacketsLost L126: this.deltaPacketsLost = positiveDelta(stats.packetsLost, this.packetsLost)
  • deltaTotalRoundTripTime L127: this.deltaTotalRoundTripTime = positiveDelta(stats.totalRoundTripTime, this.totalRoundTripTime)
  • deltaRoundTripTimeMeasurements L128: this.deltaRoundTripTimeMeasurements = positiveDelta(stats.roundTripTimeMeasurements, this.roundTripTimeMeasurements)
  • avgRoundTripTimeInSec L130: this.avgRoundTripTimeInSec = this.deltaTotalRoundTripTime !== undefined && this.deltaRoundTripTimeMeasurements !== undefined && this.deltaRoundTripTimeMeasurements > 0 ? this.deltaTotalRoundTripTime / this.deltaRoundTripTimeMeasurements : undefined
  • deltaFractionLost L138: this.deltaFractionLost = totalDelta > 0 ? this.deltaPacketsLost / totalDelta : 0.0

Exact wire projection

public createSample(): RemoteInboundRtpStats {
		return {
			timestamp: this.timestamp,
			id: this.id,
			ssrc: this.ssrc,
			kind: this.kind,
			transportId: this.transportId,
			codecId: this.codecId,
			packetsReceived: this.packetsReceived,
			packetsReceivedWithEct1: this.packetsReceivedWithEct1,
			packetsReceivedWithCe: this.packetsReceivedWithCe,
			packetsReportedAsLost: this.packetsReportedAsLost,
			packetsReportedAsLostButRecovered: this.packetsReportedAsLostButRecovered,
			packetsLost: this.packetsLost,
			jitter: this.jitter,
			localId: this.localId,
			roundTripTime: this.roundTripTime,
			totalRoundTripTime: this.totalRoundTripTime,
			fractionLost: this.fractionLost,
			roundTripTimeMeasurements: this.roundTripTimeMeasurements,
			packetsWithBleachedEct1Marking: this.packetsWithBleachedEct1Marking,

			attachments: this.attachments,
		};
	}

RemoteOutboundRtpMonitor

Source

Public field / getterType or declarationSource
timestampnumberL8
idstringL9
ssrcnumberL10
kindstringL11
transportIdstring / undefinedL12
codecIdstring / undefinedL13
packetsSentnumber / undefinedL14
bytesSentnumber / undefinedL15
deltaPacketsSentnumber / undefinedL18
deltaBytesSentnumber / undefinedL19
localIdstring / undefinedL20
remoteTimestampnumber / undefinedL21
reportsSentnumber / undefinedL22
roundTripTimenumber / undefinedL23
totalRoundTripTimenumber / undefinedL24
roundTripTimeMeasurementsnumber / undefinedL25
bitratenumber / undefinedL28
deltaTimenumber / undefinedL31
attachmentsRecord<string, unknown> / undefinedL36
appDataRecord<string, unknown> / undefinedL38
visitedbooleanL52
statsClockTimepublic statsClockTime = 0;L61

Assignment and formula index

  • id L44: this.id = options.id
  • timestamp L45: this.timestamp = options.timestamp
  • ssrc L46: this.ssrc = options.ssrc
  • kind L47: this.kind = options.kind
  • deltaTime L91: this.deltaTime = 0
  • deltaPacketsSent L92: this.deltaPacketsSent = undefined
  • deltaBytesSent L93: this.deltaBytesSent = undefined
  • deltaTime L98: this.deltaTime = elapsedInMs
  • statsClockTime L99: this.statsClockTime += elapsedInMs
  • deltaPacketsSent L100: this.deltaPacketsSent = positiveDelta(stats.packetsSent, this.packetsSent)
  • deltaBytesSent L101: this.deltaBytesSent = positiveDelta(stats.bytesSent, this.bytesSent)

Exact wire projection

public createSample(): RemoteOutboundRtpStats {
		return {
			id: this.id,
			timestamp: this.timestamp,
			ssrc: this.ssrc,
			kind: this.kind,
			transportId: this.transportId,
			codecId: this.codecId,
			packetsSent: this.packetsSent,
			bytesSent: this.bytesSent,
			localId: this.localId,
			remoteTimestamp: this.remoteTimestamp,
			reportsSent: this.reportsSent,
			roundTripTime: this.roundTripTime,
			totalRoundTripTime: this.totalRoundTripTime,
			roundTripTimeMeasurements: this.roundTripTimeMeasurements,
			attachments: this.attachments,
		};
	}

SelectedIcePath

Source

Public field / getterType or declarationSource
createdAtpublic readonly createdAt = Date.now();L88
updatedAtpublic updatedAt = Date.now();L89
closedpublic closed = false;L90
durationsIcePathDurationsL93
pathSwitchespublic pathSwitches = 0;L95
directToRelaySwitchespublic directToRelaySwitches = 0;L96
relayToDirectSwitchespublic relayToDirectSwitches = 0;L97
relayProtocolSwitchespublic relayProtocolSwitches = 0;L98
turnServerSwitchespublic turnServerSwitches = 0;L99
firstRelaySelectedAtnumberL102
lastSwitchedAtnumberL103
totalBytesSentpublic totalBytesSent = 0;L105
totalBytesReceivedpublic totalBytesReceived = 0;L106
totalPacketsSentpublic totalPacketsSent = 0;L107
totalPacketsReceivedpublic totalPacketsReceived = 0;L108
relayBytesSentpublic relayBytesSent = 0;L111
relayBytesReceivedpublic relayBytesReceived = 0;L112
relayPacketsSentpublic relayPacketsSent = 0;L113
relayPacketsReceivedpublic relayPacketsReceived = 0;L114
appDataRecord<string, unknown> / undefinedL126
pairIceCandidatePairMonitorL149
localCandidatepublic get localCandidate() {L153
remoteCandidatepublic get remoteCandidate() {L157
iceTransportpublic get iceTransport() {L161
pairIdpublic get pairId() {L167
transportIdpublic get transportId() {L171
kindIcePathKindL175
usingTurnbooleanL179
usingTcpbooleanL183
relayProtocolpublic get relayProtocol() {L187
turnUrlpublic get turnUrl() {L191
turnServerpublic get turnServer() {L195
tuplepublic get tuple() {L199
protocolpublic get protocol() {L203
localCandidateTypepublic get localCandidateType() {L207
remoteCandidateTypepublic get remoteCandidateType() {L211
localAddresspublic get localAddress() {L215
localPortpublic get localPort() {L219
localAddressFamilypublic get localAddressFamily() {L223
remoteAddresspublic get remoteAddress() {L227
remotePortpublic get remotePort() {L231
remoteAddressFamilypublic get remoteAddressFamily() {L235
currentRoundTripTimepublic get currentRoundTripTime() {L239
statepublic get state() {L243
durationInMsnumberL250
relayDurationInMsnumberL255
timeToFirstRelayInMsnumber / undefinedL266
relayBytesRationumber / undefinedL271

Assignment and formula index

  • firstRelaySelectedAt L139: this.firstRelaySelectedAt = this.createdAt
  • durations[previousKind] L311: this.durations[previousKind] += Math.max(0, now - this._kindSince)
  • updatedAt L314: this.updatedAt = now
  • firstRelaySelectedAt L323: this.firstRelaySelectedAt = now
  • lastSwitchedAt L340: this.lastSwitchedAt = now
  • closed L370: this.closed = true
  • durations[this._kind] L372: this.durations[this._kind] += Math.max(0, Date.now() - this._kindSince)
  • totalBytesSent L384: this.totalBytesSent += bytesSent
  • totalBytesReceived L385: this.totalBytesReceived += bytesReceived
  • totalPacketsSent L386: this.totalPacketsSent += packetsSent
  • totalPacketsReceived L387: this.totalPacketsReceived += packetsReceived
  • relayBytesSent L391: this.relayBytesSent += bytesSent
  • relayBytesReceived L392: this.relayBytesReceived += bytesReceived
  • relayPacketsSent L393: this.relayPacketsSent += packetsSent
  • relayPacketsReceived L394: this.relayPacketsReceived += packetsReceived
Version coverage varies by reference. Source revisions · Markdown source