mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-10-31 17:44:03 +00:00 
			
		
		
		
	Can specify a maximum number of users for video calls
This commit is contained in:
		| @@ -19,6 +19,7 @@ | ||||
| 			"stun:stun.l.google.com:19302" | ||||
| 		], | ||||
| 		"maxUsersPerCalls": 10, | ||||
| 		"allowVideo": true | ||||
| 		"allowVideo": true, | ||||
| 		"maxUsersPerVideoCalls": 4 | ||||
| 	} | ||||
| } | ||||
| @@ -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; | ||||
| 	} | ||||
|  | ||||
| } | ||||
| @@ -22,6 +22,7 @@ export interface RTCRelayConfiguration { | ||||
|  | ||||
| 	maxUsersPerCalls: number, | ||||
| 	allowVideo: boolean, | ||||
| 	maxUsersPerVideoCalls: number, | ||||
| } | ||||
|  | ||||
| export interface Configuration { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user