From 1e7603187c89afd15a83c6b8287b03149de42b06 Mon Sep 17 00:00:00 2001 From: Billy Lindeman Date: Thu, 27 May 2021 13:40:01 -0700 Subject: [PATCH] 1.7.2 --- package-lock.json | 2 +- package.json | 2 +- src/signal/json-rpc-impl.ts | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89cb5552..353fa31d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ion-sdk-js", - "version": "1.7.1", + "version": "1.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1c5cc4b4..f1e9be35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ion-sdk-js", - "version": "1.7.1", + "version": "1.7.2", "description": "A js sdk for ion sfu", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/signal/json-rpc-impl.ts b/src/signal/json-rpc-impl.ts index 53c190f3..141324f2 100644 --- a/src/signal/json-rpc-impl.ts +++ b/src/signal/json-rpc-impl.ts @@ -10,11 +10,11 @@ class IonSFUJSONRPCSignal implements Signal { onnegotiate?: (jsep: RTCSessionDescriptionInit) => void; ontrickle?: (trickle: Trickle) => void; - private _notifyhandlers: { [ method: string ]: (params: any) => void }; + private _notifyhandlers: { [method: string]: (params: any) => void }; constructor(uri: string) { this.socket = new WebSocket(uri); - this._notifyhandlers = {}; + this._notifyhandlers = {}; this.socket.addEventListener('open', () => { if (this._onopen) this._onopen(); @@ -40,13 +40,11 @@ class IonSFUJSONRPCSignal implements Signal { handler(resp.params); } } - }); } - on_notify(method: string, cb: (params: T) => void) { - this._notifyhandlers[method] = cb + this._notifyhandlers[method] = cb; } // JsonRPC2 Call