Turn server with time limited credentials

Peter P.

New Member
Hi,
We are testing a setup with a turn server using time limited credentials.
We can make it work when connecting to the WCS with createSession() however, if the user stays on the page for longer than our TTL
and the stream is stopped and started (not the session). We need to update the username and credential parameters.
It does not seem to work providing the options object with updated credentials to the function createStream()
We have tried doing it like this:
options.mediaOptions = {
"iceServers": [
{
'url': 'turn:the-turn-server.com:443?transport=tcp',
'username': username,
'credential': password
}
]
};
I am not even sure if this is even supported or the way to do it? But if it isn't we would really love the feature :)
 

Max

Administrator
Staff member
Good day.
A credentials can be passed to TURN server (no matter external or embedded) while establishing a new connection only. So, they must be passed on session establishing. To update username and credential parameters, you should close current session and create a new one.
 
Top