From 1b6020019678ce8503d9e0f62fdbe553218fd3de Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Fri, 6 Oct 2023 16:27:06 -0500 Subject: [PATCH] ref(CustomSignaling): Remove ssrcOwners&chatRoom. --- .../proxyconnection/CustomSignalingLayer.js | 80 +------------------ modules/proxyconnection/ProxyConnectionPC.js | 2 - 2 files changed, 2 insertions(+), 80 deletions(-) diff --git a/modules/proxyconnection/CustomSignalingLayer.js b/modules/proxyconnection/CustomSignalingLayer.js index c3f0802211..27bd2031d8 100644 --- a/modules/proxyconnection/CustomSignalingLayer.js +++ b/modules/proxyconnection/CustomSignalingLayer.js @@ -1,31 +1,9 @@ -import { getLogger } from '@jitsi/logger'; - import SignalingLayer from '../../service/RTC/SignalingLayer'; -const logger = getLogger(__filename); - /** * Custom semi-mock implementation for the Proxy connection service. */ export default class CustomSignalingLayer extends SignalingLayer { - /** - * Creates new instance. - */ - constructor() { - super(); - - /** - * A map that stores SSRCs of remote streams. - * @type {Map} maps SSRC number to jid - */ - this.ssrcOwners = new Map(); - - /** - * - * @type {ChatRoom|null} - */ - this.chatRoom = null; - } /** * @inheritDoc @@ -44,8 +22,8 @@ export default class CustomSignalingLayer extends SignalingLayer { /** * @inheritDoc */ - getSSRCOwner(ssrc) { - return this.ssrcOwners.get(ssrc); + getSSRCOwner() { + return undefined; } /** @@ -55,45 +33,6 @@ export default class CustomSignalingLayer extends SignalingLayer { return undefined; } - /** - * @inheritDoc - */ - removeSSRCOwners(ssrcList) { - if (!ssrcList?.length) { - return; - } - - for (const ssrc of ssrcList) { - this.ssrcOwners.delete(ssrc); - } - } - - /** - * Sets the ChatRoom instance used. - * @param {ChatRoom} room - */ - setChatRoom(room) { - this.chatRoom = room; - } - - /** - * @inheritDoc - */ - setSSRCOwner(ssrc, endpointId) { - if (typeof ssrc !== 'number') { - throw new TypeError(`SSRC(${ssrc}) must be a number`); - } - - // Now signaling layer instance is shared between different JingleSessionPC instances, so although very unlikely - // an SSRC conflict could potentially occur. Log a message to make debugging easier. - const existingOwner = this.ssrcOwners.get(ssrc); - - if (existingOwner && existingOwner !== endpointId) { - logger.error(`SSRC owner re-assigned from ${existingOwner} to ${endpointId}`); - } - this.ssrcOwners.set(ssrc, endpointId); - } - /** * @inheritDoc */ @@ -113,19 +52,4 @@ export default class CustomSignalingLayer extends SignalingLayer { */ setTrackSourceName(ssrc, sourceName) { // eslint-disable-line no-unused-vars } - - /** - * @inheritDoc - */ - updateSsrcOwnersOnLeave(id) { - const ssrcs = Array.from(this.ssrcOwners) - .filter(entry => entry[1] === id) - .map(entry => entry[0]); - - if (!ssrcs?.length) { - return; - } - - this.removeSSRCOwners(ssrcs); - } } diff --git a/modules/proxyconnection/ProxyConnectionPC.js b/modules/proxyconnection/ProxyConnectionPC.js index 7483d987e6..4610672f3f 100644 --- a/modules/proxyconnection/ProxyConnectionPC.js +++ b/modules/proxyconnection/ProxyConnectionPC.js @@ -268,8 +268,6 @@ export default class ProxyConnectionPC { const signalingLayer = new CustomSignalingLayer(); - signalingLayer.setChatRoom(roomStub); - /** * An additional initialize call is necessary to properly set instance * variable for calling.