updateRoomControls method
void
updateRoomControls(
- Map<String, dynamic> data
)
Implementation
void updateRoomControls(Map<String, dynamic> data) {
if (!checkPermission(permissionTypeCheck: PermissionType.admin)) {
return;
}
logger.i('🔔 Updating Room Controls');
config[data['type']] = data['value'];
emit('room-controls-updated');
if (data['type'] == 'allowProduceSources') {
socket.publish(Request_Request.updateRoomControls, {
'control': {
'case': 'produceSourcesControl',
'value': data,
},
});
} else {
socket.publish(Request_Request.updateRoomControls, {
'control': {
'case': 'roomControl',
'value': data,
},
});
}
}