1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-12-25 21:18:50 +00:00

Can specify a maximum number of users for video calls

This commit is contained in:
Pierre HUBERT 2020-04-13 14:05:23 +02:00
parent 62dddb2519
commit 2bb7acc4d7
3 changed files with 6 additions and 2 deletions

View File

@ -19,6 +19,7 @@
"stun:stun.l.google.com:19302"
],
"maxUsersPerCalls": 10,
"allowVideo": true
"allowVideo": true,
"maxUsersPerVideoCalls": 4
}
}

View File

@ -28,7 +28,9 @@ export class CallsHelper {
* @param conv Target conversation
*/
public static CanHaveVideoCAll(conv: Conversation) : boolean {
return this.CanHaveCall(conv) && conf().rtc_relay.allowVideo;
return this.CanHaveCall(conv)
&& conf().rtc_relay.allowVideo
&& conf().rtc_relay.maxUsersPerVideoCalls >= conv.members.size;
}
}

View File

@ -22,6 +22,7 @@ export interface RTCRelayConfiguration {
maxUsersPerCalls: number,
allowVideo: boolean,
maxUsersPerVideoCalls: number,
}
export interface Configuration {