@observertc/client-monitor-js
Version:
ObserveRTC Client Integration Javascript Library
1 lines • 1.19 kB
JavaScript
export class RemoteOutboundRtpMonitor{_peerConnection;_visited=!0;timestamp;id;ssrc;kind;transportId;codecId;packetsSent;bytesSent;localId;remoteTimestamp;reportsSent;roundTripTime;totalRoundTripTime;roundTripTimeMeasurements;bitrate;attachments;appData;constructor(t,e){this._peerConnection=t,this.id=e.id,this.timestamp=e.timestamp,this.ssrc=e.ssrc,this.kind=e.kind,Object.assign(this,e)}get visited(){const t=this._visited;return this._visited=!1,t}getPeerConnection(){return this._peerConnection}getInboundRtp(){return this._peerConnection.mappedInboundRtpMonitors.get(this.ssrc)}getCodec(){return this._peerConnection.mappedCodecMonitors.get(this.codecId??"")}accept(t){this._visited=!0;t.timestamp-this.timestamp<=0||Object.assign(this,t)}createSample(){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}}}