Skip to content

Commit

Permalink
1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
billylindeman committed May 27, 2021
1 parent dbacb5a commit 1e76031
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 3 additions & 5 deletions src/signal/json-rpc-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -40,13 +40,11 @@ class IonSFUJSONRPCSignal implements Signal {
handler(resp.params);
}
}

});
}


on_notify<T>(method: string, cb: (params: T) => void) {
this._notifyhandlers[method] = cb
this._notifyhandlers[method] = cb;
}

// JsonRPC2 Call
Expand Down

0 comments on commit 1e76031

Please sign in to comment.