How can I change token after server was created in janus.js?

How can I change token after server was created in janus.js? Say my token expired and I got new one. janus.js does not have something like janus.setToken method.

You can specify a token when attaching to a handle as well, and that will override the session one.

The problem is that janus.js uses the same token in keepalive requests: the one that was passed in constructor: janus = new Janus({ token: token, ….

That’s a good point. Then I guess we’ll need a helper method to update the session-level token on the client side. Please open an issue on github so that we can keep track of it.

Don’t bother ). I did it by my self patching janus.js.

1 Like

Please consider submitting a PR, then, as others may have a use for this too.

1 Like