UNPKG

@observertc/observer-js

Version:

Server Side NodeJS Library for processing ObserveRTC Samples

35 lines (34 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ObservedPeerConnectionTransport = void 0; class ObservedPeerConnectionTransport { timestamp; id; _peerConnection; _visited = false; appData; dataChannelsOpened; dataChannelsClosed; attachments; constructor(timestamp, id, _peerConnection) { this.timestamp = timestamp; this.id = id; this._peerConnection = _peerConnection; } get visited() { const visited = this._visited; this._visited = false; return visited; } getPeerConnection() { return this._peerConnection; } update(stats) { this._visited = true; this.timestamp = stats.timestamp; this.dataChannelsOpened = stats.dataChannelsOpened; this.dataChannelsClosed = stats.dataChannelsClosed; this.attachments = stats.attachments; } } exports.ObservedPeerConnectionTransport = ObservedPeerConnectionTransport;