Skip to content

Commit f869888

Browse files
committed
private keyword added
1 parent c408d88 commit f869888

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

modules/proxyconnection/ProxyConnectionService.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ interface IProxyMessage {
5353
*/
5454
interface IProxyConnectionPCOptions {
5555
isInitiator?: boolean;
56-
receiveAudio?: boolean;
57-
receiveVideo?: boolean;
58-
pcConfig?: RTCConfiguration;
5956
onError?: (peerJid: string, errorType: string, details?: string) => void;
6057
onRemoteStream?: (track: JitsiRemoteTrack) => void;
6158
onSendMessage?: (peerJid: string, iq: any) => void;
59+
pcConfig?: RTCConfiguration;
6260
peerJid?: string;
61+
receiveAudio?: boolean;
62+
receiveVideo?: boolean;
6363
}
6464

6565
/**
@@ -128,7 +128,7 @@ export default class ProxyConnectionService {
128128
* sending replies.
129129
* @returns {void}
130130
*/
131-
processMessage(message: IProxyMessage): void {
131+
private _processMessage(message: IProxyMessage): void {
132132
const peerJid = message.from;
133133

134134
if (!peerJid) {
@@ -186,7 +186,7 @@ export default class ProxyConnectionService {
186186
* send through to the peer.
187187
* @returns {void}
188188
*/
189-
start(peerJid: string, localTracks: JitsiLocalTrack[] = []): void {
189+
private _start(peerJid: string, localTracks: JitsiLocalTrack[] = []): void {
190190
this._peerConnection = this._createPeerConnection(peerJid, {
191191
isInitiator: true,
192192
receiveVideo: false
@@ -206,7 +206,7 @@ export default class ProxyConnectionService {
206206
*
207207
* @returns {void}
208208
*/
209-
stop(): void {
209+
private _stop(): void {
210210
if (this._peerConnection) {
211211
this._peerConnection.stop();
212212
}
@@ -222,7 +222,7 @@ export default class ProxyConnectionService {
222222
* @returns {Object|null} An element version of the xml. Null will be returned
223223
* if an error is encountered during transformation.
224224
*/
225-
_convertStringToXML(xml: string): Nullable<ReturnType<typeof $>> {
225+
private _convertStringToXML(xml: string): Nullable<ReturnType<typeof $>> {
226226
try {
227227
const xmlDom = new DOMParser().parseFromString(xml, 'text/xml');
228228

@@ -245,7 +245,7 @@ export default class ProxyConnectionService {
245245
* @private
246246
* @returns {ProxyConnectionPC}
247247
*/
248-
_createPeerConnection(peerJid: string, options: Partial<IProxyConnectionPCOptions> = {}): ProxyConnectionPC {
248+
private _createPeerConnection(peerJid: string, options: Partial<IProxyConnectionPCOptions> = {}): ProxyConnectionPC {
249249
if (!peerJid) {
250250
throw new Error('Cannot create ProxyConnectionPC without a peer.');
251251
}
@@ -276,7 +276,7 @@ export default class ProxyConnectionService {
276276
* @private
277277
* @returns {void}
278278
*/
279-
_onFatalError(peerJid: string, errorType: string, details: string = ''): void {
279+
private _onFatalError(peerJid: string, errorType: string, details: string = ''): void {
280280
logger.error(
281281
'Received a proxy connection error', peerJid, errorType, details);
282282

@@ -311,7 +311,7 @@ export default class ProxyConnectionService {
311311
* @private
312312
* @returns {void}
313313
*/
314-
_onRemoteStream(jitsiRemoteTrack: JitsiRemoteTrack): void {
314+
private _onRemoteStream(jitsiRemoteTrack: JitsiRemoteTrack): void {
315315
if (!this._options.onRemoteStream) {
316316
logger.error('Remote track received without callback.');
317317
jitsiRemoteTrack.dispose();
@@ -354,7 +354,7 @@ export default class ProxyConnectionService {
354354
* @private
355355
* @returns {void}
356356
*/
357-
_onSendMessage(peerJid: string, iq: any): void {
357+
private _onSendMessage(peerJid: string, iq: any): void {
358358
if (!this._options.onSendMessage) {
359359
return;
360360
}
@@ -375,8 +375,8 @@ export default class ProxyConnectionService {
375375
* @private
376376
* @returns {void}
377377
*/
378-
_selfCloseConnection(): void {
379-
this.stop();
378+
private _selfCloseConnection(): void {
379+
this._stop();
380380

381381
this._options.onConnectionClosed
382382
&& this._options.onConnectionClosed();

0 commit comments

Comments
 (0)