@observertc/observer-js
Advanced tools
Comparing version 0.9.10-beta to 0.9.11-beta
@@ -113,5 +113,2 @@ "use strict"; | ||
logger.warn(`Error occurred while evaluating`, err); | ||
}) | ||
.finally(() => { | ||
this._emit('ready', undefined); | ||
}); | ||
@@ -118,0 +115,0 @@ } |
@@ -10,2 +10,3 @@ "use strict"; | ||
const visitOutboundVideoTarck_1 = require("./visitors/visitOutboundVideoTarck"); | ||
const visitInboundVideoTrack_1 = require("./visitors/visitInboundVideoTrack"); | ||
exports.logger = (0, logger_1.createLogger)('VisitObservedCallsMiddleware'); | ||
@@ -49,3 +50,3 @@ function createVisitObservedCallsMiddleware(reports, fetchSamples) { | ||
const { trackId } = observedInboundVideoTrack; | ||
(0, visitInboundAudioTrack_1.visitInboundAudioTrack)(observedInboundVideoTrack, storedPeerConnection, updatedInboundVideoTracks, reports, fetchSamples); | ||
(0, visitInboundVideoTrack_1.visitInboundVideoTrack)(observedInboundVideoTrack, storedPeerConnection, updatedInboundVideoTracks, reports, fetchSamples); | ||
visitedInboundVideoTrackIds.add(trackId); | ||
@@ -52,0 +53,0 @@ } |
@@ -7,6 +7,9 @@ "use strict"; | ||
function visitClient(observedClient, client, reports, fetchSamples) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
const { mediaUnitId, clientId } = observedClient; | ||
const { callId, serviceId, roomId } = observedClient.call; | ||
for (const clientSample of observedClient.samples()) { | ||
if (clientSample.os) { | ||
if (clientSample.os && (((_a = client.operationSystem) === null || _a === void 0 ? void 0 : _a.name) !== clientSample.os.name || | ||
((_b = client.operationSystem) === null || _b === void 0 ? void 0 : _b.version) !== clientSample.os.version || | ||
((_c = client.operationSystem) === null || _c === void 0 ? void 0 : _c.versionName) !== clientSample.os.versionName)) { | ||
if (fetchSamples) { | ||
@@ -23,3 +26,4 @@ client.operationSystem = new samples_pb_1.Samples_ClientSample_OperationSystem({ | ||
} | ||
if (clientSample.engine) { | ||
if (clientSample.engine && (((_d = client.engine) === null || _d === void 0 ? void 0 : _d.name) !== clientSample.engine.name || | ||
((_e = client.engine) === null || _e === void 0 ? void 0 : _e.version) !== clientSample.engine.version)) { | ||
if (fetchSamples) { | ||
@@ -36,3 +40,5 @@ client.engine = new samples_pb_1.Samples_ClientSample_Engine({ | ||
} | ||
if (clientSample.platform) { | ||
if (clientSample.platform && (((_f = client.platform) === null || _f === void 0 ? void 0 : _f.model) !== clientSample.platform.model || | ||
((_g = client.platform) === null || _g === void 0 ? void 0 : _g.type) !== clientSample.platform.type || | ||
((_h = client.platform) === null || _h === void 0 ? void 0 : _h.vendor) !== clientSample.platform.vendor)) { | ||
if (fetchSamples) { | ||
@@ -49,3 +55,4 @@ client.platform = new samples_pb_1.Samples_ClientSample_Platform({ | ||
} | ||
if (clientSample.browser) { | ||
if (clientSample.browser && (((_j = client.browser) === null || _j === void 0 ? void 0 : _j.name) !== clientSample.browser.name || | ||
((_k = client.browser) === null || _k === void 0 ? void 0 : _k.version) !== clientSample.browser.version)) { | ||
if (fetchSamples) { | ||
@@ -52,0 +59,0 @@ client.browser = new samples_pb_1.Samples_ClientSample_Browser({ |
@@ -29,7 +29,5 @@ "use strict"; | ||
const callEventReports_1 = require("../sinks/callEventReports"); | ||
const closePeerConnectionProcess_1 = require("./closePeerConnectionProcess"); | ||
const logger_1 = require("../common/logger"); | ||
const logger = (0, logger_1.createLogger)('ClientLeftProcess'); | ||
function createJoinClientProcess(storageProvider, reports) { | ||
const peerConnectionClosedProcess = (0, closePeerConnectionProcess_1.createClosePeerConnectionProcess)(storageProvider); | ||
const process = async (context) => { | ||
@@ -68,2 +66,3 @@ const { clients: joinedClients, evaluatorContext } = context; | ||
clientId, | ||
joined: BigInt(timestamp), | ||
timeZoneId, | ||
@@ -70,0 +69,0 @@ marker, |
@@ -47,2 +47,3 @@ "use strict"; | ||
}); | ||
this._inboundAudioTracks.set(trackId, result); | ||
} | ||
@@ -49,0 +50,0 @@ return result; |
{ | ||
"name": "@observertc/observer-js", | ||
"version": "0.9.10-beta", | ||
"version": "0.9.11-beta", | ||
"description": "Server Side NodeJS Library for processing ObserveRTC Samples", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -155,5 +155,2 @@ import { createLogger } from './common/logger'; | ||
logger.warn(`Error occurred while evaluating`, err); | ||
}) | ||
.finally(() => { | ||
this._emit('ready', undefined); | ||
}); | ||
@@ -160,0 +157,0 @@ } |
@@ -10,3 +10,3 @@ import { Middleware } from './Middleware'; | ||
import { visitOutboundVideoTrack } from './visitors/visitOutboundVideoTarck'; | ||
import { CallEventReport, ClientExtensionReport } from '@observertc/report-schemas-js'; | ||
import { visitInboundVideoTrack } from './visitors/visitInboundVideoTrack'; | ||
@@ -84,3 +84,2 @@ export const logger = createLogger('VisitObservedCallsMiddleware'); | ||
const { trackId } = observedInboundAudioTrack; | ||
visitInboundAudioTrack( | ||
@@ -100,3 +99,3 @@ observedInboundAudioTrack, | ||
visitInboundAudioTrack( | ||
visitInboundVideoTrack( | ||
observedInboundVideoTrack, | ||
@@ -103,0 +102,0 @@ storedPeerConnection, |
@@ -23,3 +23,7 @@ import { ObservedClient } from '../../samples/ObservedClient'; | ||
for (const clientSample of observedClient.samples()) { | ||
if (clientSample.os) { | ||
if (clientSample.os && ( | ||
client.operationSystem?.name !== clientSample.os.name || | ||
client.operationSystem?.version !== clientSample.os.version || | ||
client.operationSystem?.versionName !== clientSample.os.versionName | ||
)) { | ||
if (fetchSamples) { | ||
@@ -30,3 +34,3 @@ client.operationSystem = new Samples_ClientSample_OperationSystem({ | ||
} | ||
const callMetaReport = createCallMetaReport(serviceId, mediaUnitId, roomId, callId, clientId, { | ||
@@ -39,3 +43,6 @@ type: CallMetaType.OPERATION_SYSTEM, | ||
if (clientSample.engine) { | ||
if (clientSample.engine && ( | ||
client.engine?.name !== clientSample.engine.name || | ||
client.engine?.version !== clientSample.engine.version | ||
)) { | ||
if (fetchSamples) { | ||
@@ -54,3 +61,7 @@ client.engine = new Samples_ClientSample_Engine({ | ||
if (clientSample.platform) { | ||
if (clientSample.platform && ( | ||
client.platform?.model !== clientSample.platform.model || | ||
client.platform?.type !== clientSample.platform.type || | ||
client.platform?.vendor !== clientSample.platform.vendor | ||
)) { | ||
if (fetchSamples) { | ||
@@ -69,3 +80,6 @@ client.platform = new Samples_ClientSample_Platform({ | ||
if (clientSample.browser) { | ||
if (clientSample.browser && ( | ||
client.browser?.name !== clientSample.browser.name || | ||
client.browser?.version !== clientSample.browser.version | ||
)) { | ||
if (fetchSamples) { | ||
@@ -72,0 +86,0 @@ client.browser = new Samples_ClientSample_Browser({ |
@@ -6,7 +6,5 @@ import { EvaluatorContext } from '../common/types'; | ||
import { ReportsCollector } from '../common/ReportsCollector'; | ||
import { createClosePeerConnectionProcess } from './closePeerConnectionProcess'; | ||
import { createLogger } from '../common/logger'; | ||
import { ObservedClientSourceConfig } from '../sources/ObservedClientSource'; | ||
import { Writable } from '../common/utils'; | ||
import { Semaphore } from '../common/Semaphore'; | ||
@@ -25,3 +23,2 @@ const logger = createLogger('ClientLeftProcess'); | ||
): (input: JoinClientProcessInput) => Promise<void> { | ||
const peerConnectionClosedProcess = createClosePeerConnectionProcess(storageProvider); | ||
const process = async (context: JoinClientProcessInput) => { | ||
@@ -65,2 +62,3 @@ const { clients: joinedClients, evaluatorContext } = context; | ||
clientId, | ||
joined: BigInt(timestamp), | ||
timeZoneId, | ||
@@ -67,0 +65,0 @@ marker, |
@@ -90,2 +90,3 @@ import { | ||
}); | ||
this._inboundAudioTracks.set(trackId, result); | ||
} | ||
@@ -92,0 +93,0 @@ return result; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
968762
19521