From fb61f63aabff46ad997866e646d87924d68cfbda 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 7a981c2b2c..00d8071c62 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 */ @@ -107,19 +46,4 @@ export default class CustomSignalingLayer extends SignalingLayer { setTrackVideoType(sourceName, videoType) { // eslint-disable-line no-unused-vars return false; } - - /** - * @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.