@observertc/observer-js
Version:
Server Side NodeJS Library for processing ObserveRTC Samples
43 lines (42 loc) • 1.29 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObservedMediaPlayout = void 0;
class ObservedMediaPlayout {
timestamp;
id;
kind;
_peerConnection;
_visited = false;
appData;
synthesizedSamplesDuration;
synthesizedSamplesEvents;
totalSamplesDuration;
totalPlayoutDelay;
totalSamplesCount;
attachments;
constructor(timestamp, id, kind, _peerConnection) {
this.timestamp = timestamp;
this.id = id;
this.kind = kind;
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.synthesizedSamplesDuration = stats.synthesizedSamplesDuration;
this.synthesizedSamplesEvents = stats.synthesizedSamplesEvents;
this.totalSamplesDuration = stats.totalSamplesDuration;
this.totalPlayoutDelay = stats.totalPlayoutDelay;
this.totalSamplesCount = stats.totalSamplesCount;
this.attachments = stats.attachments;
}
}
exports.ObservedMediaPlayout = ObservedMediaPlayout;