@observertc/client-monitor-js
Version:
ObserveRTC Client Integration Javascript Library
1 lines • 610 B
JavaScript
export class PeerConnectionTransportMonitor{_peerConnection;_visited=!0;timestamp;id;dataChannelsOpened;dataChannelsClosed;attachments;appData;constructor(t,e){this._peerConnection=t,this.id=e.id,this.timestamp=e.timestamp,Object.assign(this,e)}get visited(){const t=this._visited;return this._visited=!1,t}accept(t){this._visited=!0;t.timestamp-this.timestamp<=0||Object.assign(this,t)}getPeerConnection(){return this._peerConnection}createSample(){return{id:this.id,timestamp:this.timestamp,dataChannelsOpened:this.dataChannelsOpened,dataChannelsClosed:this.dataChannelsClosed,attachments:this.attachments}}}