mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
set array of turnservers
This commit is contained in:
parent
eab87e5157
commit
3d7852a469
@ -562,11 +562,11 @@ export class Session {
|
||||
|
||||
async _updateTurnServers() {
|
||||
const turnServerData = await this._hsApi.getTurnServer().response();
|
||||
this._callHandler.setTurnServers({
|
||||
this._callHandler.setTurnServers([{
|
||||
urls: turnServerData.uris,
|
||||
username: turnServerData.username,
|
||||
credential: turnServerData.password,
|
||||
});
|
||||
}]);
|
||||
if (turnServerData.ttl > 0) {
|
||||
setTimeout(this._updateTurnServers, turnServerData.ttl * 1000);
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ export class CallHandler implements RoomStateHandler {
|
||||
this._loadCallEntries(callEntries, txn);
|
||||
}
|
||||
|
||||
async setTurnServers(turnServers: RTCIceServer) {
|
||||
async setTurnServers(turnServers: RTCIceServer[]) {
|
||||
this.options.turnServers = turnServers;
|
||||
this.groupCallOptions.turnServers = turnServers;
|
||||
// TODO: we should update any ongoing peerconnections if the TURN server details have changed
|
||||
|
Loading…
Reference in New Issue
Block a user