Skip to content

Commit

Permalink
chore: update readme to include debugging instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
farhat-ha committed Apr 22, 2024
1 parent 2a72b60 commit a85b735
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions packages/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,24 @@ call.muteAudio();

> See [Call#methods](./docs/ts/classes/call.md#methods) for all methods.
### Debugging

In order to have a better idea on what is going on under the hood you can gather webrtc metrics for a call:

```js
const call = client.newCall({
// Destination is required and can be a phone number or SIP URI
destinationNumber: '18004377950',
callerNumber: '‬155531234567',
});

// Start the gathering of data
call.startDebugger();

// Stop the gathering of data
call.stopDebugger();
```

---

## Examples
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/Modules/Verto/webrtc/BaseCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ export default abstract class BaseCall implements IWebRTCCall {
return;
}

this.peer.instance.removeEventListener('icecandidate', this._onIce);
this.peer?.instance?.removeEventListener('icecandidate', this._onIce);

let msg = null;

Expand Down

0 comments on commit a85b735

Please sign in to comment.