✨(backend) expose recording configurations to the client
Inform frontend code, if recording a room is enabled, and which recordings modes are available. Frontend should adapt its behavior based on this data.
This commit is contained in:
committed by
aleb_the_flash
parent
4e77458116
commit
28ca2d6c37
@@ -37,6 +37,10 @@ def get_frontend_configuration(request):
|
|||||||
"""Returns the frontend configuration dict as configured in settings."""
|
"""Returns the frontend configuration dict as configured in settings."""
|
||||||
frontend_configuration = {
|
frontend_configuration = {
|
||||||
"LANGUAGE_CODE": settings.LANGUAGE_CODE,
|
"LANGUAGE_CODE": settings.LANGUAGE_CODE,
|
||||||
|
"recording": {
|
||||||
|
"is_enabled": settings.RECORDING_ENABLE,
|
||||||
|
"available_modes": settings.RECORDING_WORKER_CLASSES.keys(),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
|
frontend_configuration.update(settings.FRONTEND_CONFIGURATION)
|
||||||
return Response(frontend_configuration)
|
return Response(frontend_configuration)
|
||||||
|
|||||||
Reference in New Issue
Block a user