Compare commits

..

1 Commits

Author SHA1 Message Date
lebaudantoine 0fc70d4e92 wip explore room's configuration validation 2026-03-11 23:13:51 +01:00
189 changed files with 2194 additions and 7981 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ __pycache__
**/__pycache__ **/__pycache__
**/*.pyc **/*.pyc
venv venv
**/.venv .venv
# System-specific files # System-specific files
.DS_Store .DS_Store
+33 -48
View File
@@ -12,9 +12,6 @@ on:
branches: branches:
- 'main' - 'main'
permissions:
contents: read
env: env:
DOCKER_USER: 1001:127 DOCKER_USER: 1001:127
DOCKER_CONTAINER_REGISTRY_HOSTNAME: docker.io DOCKER_CONTAINER_REGISTRY_HOSTNAME: docker.io
@@ -23,8 +20,6 @@ env:
jobs: jobs:
build-and-push-backend: build-and-push-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
steps: steps:
- -
name: Checkout repository name: Checkout repository
@@ -48,12 +43,12 @@ jobs:
with: with:
username: ${{ secrets.DOCKER_HUB_USER }} username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- # -
name: Run trivy scan # name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main # uses: numerique-gouv/action-trivy-cache@main
with: # with:
docker-build-args: '--target backend-production -f Dockerfile' # docker-build-args: '--target backend-production -f Dockerfile'
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-backend:${{ github.sha }}' # docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-backend:${{ github.sha }}'
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -68,8 +63,6 @@ jobs:
build-and-push-frontend-generic: build-and-push-frontend-generic:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
steps: steps:
- -
name: Checkout repository name: Checkout repository
@@ -93,12 +86,12 @@ jobs:
with: with:
username: ${{ secrets.DOCKER_HUB_USER }} username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- # -
name: Run trivy scan # name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main # uses: numerique-gouv/action-trivy-cache@main
with: # with:
docker-build-args: '-f src/frontend/Dockerfile --target frontend-production' # docker-build-args: '-f src/frontend/Dockerfile --target frontend-production'
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend:${{ github.sha }}' # docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend:${{ github.sha }}'
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -114,8 +107,6 @@ jobs:
build-and-push-frontend-dinum: build-and-push-frontend-dinum:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
steps: steps:
- -
name: Checkout repository name: Checkout repository
@@ -139,12 +130,12 @@ jobs:
with: with:
username: ${{ secrets.DOCKER_HUB_USER }} username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- # -
name: Run trivy scan # name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main # uses: numerique-gouv/action-trivy-cache@main
with: # with:
docker-build-args: '-f docker/dinum-frontend/Dockerfile --target frontend-production' # docker-build-args: '-f docker/dinum-frontend/Dockerfile --target frontend-production'
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend-dinum:${{ github.sha }}' # docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-frontend-dinum:${{ github.sha }}'
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -160,8 +151,6 @@ jobs:
build-and-push-summary: build-and-push-summary:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
steps: steps:
- -
name: Checkout repository name: Checkout repository
@@ -185,13 +174,13 @@ jobs:
with: with:
username: ${{ secrets.DOCKER_HUB_USER }} username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- # -
name: Run trivy scan # name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main # uses: numerique-gouv/action-trivy-cache@main
continue-on-error: true # continue-on-error: true
with: # with:
docker-build-args: '-f src/summary/Dockerfile --target production' # docker-build-args: '-f src/summary/Dockerfile --target production'
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-summary:${{ github.sha }}' # docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-summary:${{ github.sha }}'
docker-context: './src/summary' docker-context: './src/summary'
- -
name: Build and push name: Build and push
@@ -208,8 +197,6 @@ jobs:
build-and-push-agents: build-and-push-agents:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
steps: steps:
- -
name: Checkout repository name: Checkout repository
@@ -233,14 +220,14 @@ jobs:
with: with:
username: ${{ secrets.DOCKER_HUB_USER }} username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- # -
name: Run trivy scan # name: Run trivy scan
uses: numerique-gouv/action-trivy-cache@main # uses: numerique-gouv/action-trivy-cache@main
continue-on-error: true # continue-on-error: true
with: # with:
docker-build-args: '-f src/agents/Dockerfile --target production' # docker-build-args: '-f src/agents/Dockerfile --target production'
docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-agents:${{ github.sha }}' # docker-image-name: '${{ env.DOCKER_CONTAINER_REGISTRY_HOSTNAME }}/${{ env.DOCKER_CONTAINER_REGISTRY_NAMESPACE }}/meet-agents:${{ github.sha }}'
docker-context: './src/agents' # docker-context: './src/agents'
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -255,8 +242,6 @@ jobs:
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
notify-argocd: notify-argocd:
permissions:
contents: read
needs: needs:
- build-and-push-frontend-generic - build-and-push-frontend-generic
- build-and-push-frontend-dinum - build-and-push-frontend-dinum
+14 -53
View File
@@ -124,17 +124,15 @@ jobs:
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: "3.13" python-version: "3.13"
- name: Install uv cache: "pip"
uses: astral-sh/setup-uv@v7 - name: Install development dependencies
- name: Install the project run: pip install --user .[dev]
run: uv sync --locked --all-extras
- name: Check code formatting with ruff - name: Check code formatting with ruff
run: uv run ruff format . --diff run: ~/.local/bin/ruff format . --diff
- name: Lint code with ruff - name: Lint code with ruff
run: uv run ruff check . run: ~/.local/bin/ruff check .
- name: Lint code with pylint - name: Lint code with pylint
run: uv run pylint meet demo core run: ~/.local/bin/pylint meet demo core
lint-agents: lint-agents:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -223,6 +221,8 @@ jobs:
DB_PORT: 5432 DB_PORT: 5432
REDIS_URL: redis://localhost:6379/1 REDIS_URL: redis://localhost:6379/1
STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage STORAGES_STATICFILES_BACKEND: django.contrib.staticfiles.storage.StaticFilesStorage
LIVEKIT_API_SECRET: secret
LIVEKIT_API_KEY: devkey
AWS_S3_ENDPOINT_URL: http://localhost:9000 AWS_S3_ENDPOINT_URL: http://localhost:9000
AWS_S3_ACCESS_KEY_ID: meet AWS_S3_ACCESS_KEY_ID: meet
AWS_S3_SECRET_ACCESS_KEY: password AWS_S3_SECRET_ACCESS_KEY: password
@@ -279,10 +279,10 @@ jobs:
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: "3.13" python-version: "3.13"
- name: Install uv cache: "pip"
uses: astral-sh/setup-uv@v7
- name: Install the dependencies - name: Install development dependencies
run: uv sync --locked --all-extras run: pip install --user .[dev]
- name: Install gettext (required to compile messages) - name: Install gettext (required to compile messages)
run: | run: |
@@ -290,49 +290,10 @@ jobs:
sudo apt-get install -y gettext sudo apt-get install -y gettext
- name: Generate a MO file from strings extracted from the project - name: Generate a MO file from strings extracted from the project
run: uv run python manage.py compilemessages run: python manage.py compilemessages
- name: Run tests - name: Run tests
run: uv run pytest -n 2 run: ~/.local/bin/pytest -n 2
test-summary:
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: src/summary
env:
V1_TENANT_ID: 'test-tenant'
AUTHORIZED_TENANTS: '[{"id": "test-tenant", "api_key": "test-api-token", "webhook_url": "https://example.com/webhook", "webhook_api_key": "test-webhook-api-key"}]'
AWS_STORAGE_BUCKET_NAME: "http://meet-media-storage"
AWS_S3_ENDPOINT_URL: "minio:9000"
AWS_S3_ACCESS_KEY_ID: "meet"
AWS_S3_SECRET_ACCESS_KEY: "password"
WHISPERX_BASE_URL: "https://configure-your-url.com"
WHISPERX_ASR_MODEL: "large-v2"
WHISPERX_API_KEY: "test-whisperx-secret"
WHISPERX_DEFAULT_LANGUAGE: "fr"
LLM_BASE_URL: "https://configure-your-url.com"
LLM_API_KEY: "test-llm-secret"
LLM_MODEL: "test-llm-model"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
- name: Install development dependencies
run: pip install --user .[dev]
- name: Run summary tests
run: ~/.local/bin/pytest
lint-front: lint-front:
runs-on: ubuntu-latest runs-on: ubuntu-latest
-1
View File
@@ -31,7 +31,6 @@ MANIFEST
# Translations # Translations # Translations # Translations
*.pot *.pot
*.mo
# Environments # Environments
.env .env
+2 -61
View File
@@ -10,83 +10,24 @@ and this project adheres to
### Added ### Added
- 🔒️(helm) Add pod and container securityContext #1197
- ✨(summary) add routes v2 for async STT and summary tasks #1171
- ✅(backend) add unit tests for JwtTokenService #1232
## [1.13.0] - 2026-03-31
### Changed
- ⬆️(dependencies) update python dependencies
- ♿️(frontend) add explicit region for call controls #1216
- ♿️(frontend) improve accessibility of the reaction toolbar #1216
- ♿️(frontend) enhance sidepanel navigation accessibility #1216
### Fixed
- 🔒️(backend) fix email disclosure in room invitation endpoint #1200
- 🐛(backend) fix regression in update-participant endpoint #1204
## [1.12.0] - 2026-03-24
### Changed
- ♻️(backend) configurable SESSION_ENGINE #1038 #1154
- ♿️(frontend) fix sidepanel accessibility aria-label #1182
- ♿️(frontend) fix more tools heading hierarchy #1181
- ♿️(fronted) improve button descriptions for More tools actions #1184
- 💄(spinner) enforce spinner height #1183
- 💄(custom-background) add upload indicator with preview #1183
- ♿️(backend) improve logo accessibility in recording email notification #1092
- ♿️(summary) improve accessibility of transcription download link #1187
- 💄(frontend) show OS-specific shortcut in participant tile hint #1193
- ⬆️(frontend) bump flatted from 3.3.1 to 3.4.2 in /src/frontend #1188
- ⬆️(frontend) bump undici from 6.23.0 to 6.24.1 in /src/frontend
- ⬆️(frontend) bump hono from 4.12.2 to 4.12.7 in /src/frontend
- ⬆️(frontend) bump dompurify from 3.3.1 to 3.3.2 in /src/frontend
### Fixed
- 🐛(frontend) disable personal custom background while deleting #1183
- 🐛(frontend) auto-select new custom background when not logged in #1183
- 🐛(frontend) fix device selection not applying during conference #1156
## [1.11.0] - 2026-03-19
### Added
- ✨(helm) support celery with our Django backend #1124 - ✨(helm) support celery with our Django backend #1124
- ✨(helm) support ingress for custom background image #1124 - ✨(helm) support ingress for custom background image #1124
- ✨(backend) add authenticated user rate throttling on request-entry #1129 - ✨(backend) add authenticated user rate throttling on request-entry #1129
- ✨(backend) expose `is_active` field for Application in Django admin #1133
- ✨(file-upload) disable by default & limit count by user #1141
- ✨(frontend) custom background #1067
### Changed ### Changed
- ♿️(frontend) Caption text size setting for accessibility #1062 - ♿️(frontend) Caption text size setting for accessibility #1062
- ♿️(frontend) sync html lang attribute with i18n for screen readers #1111 - ♿️(frontend) sync html lang attribute with i18n for screen readers #1111
- ♿️(frontend) improve MoreLink a11y and UX on home page #1112 - ♿️(frontend) improve MoreLink a11y and UX on home page #1112
-(frontend) improve chat toast a11y for screen readers #1109 - ♿(frontend) improve chat toast a11y for screen readers #1109
-(frontend) improve ui and aria labels for help article links #1108 - ♿(frontend) improve ui and aria labels for help article links #1108
- 🌐(frontend) improve German translation #1125 - 🌐(frontend) improve German translation #1125
- 🔨(python-env) migrate meet main app to UV #1120
- ♻️(backend) align Application model field with `is_active` convention #1133
- 🔐(backend) avoids revealing the inactive status of an application #1135
- ⚡️(helm) reduce initialDelaySeconds and add periods seconds #1139
- 🔒️(backend) avoid information exposure through exception messages #1144
- ⬆️(dependencies) update PyJWT to v2.12.0 [SECURITY] #1151
- 📌(agents) unpin OpenSSL and related dependencies #1167
- ♿️(frontend) add caption font and background color customization #1122
### Fixed ### Fixed
- 🐛(frontend) fix hand icon and queue position alignment and position #1119 - 🐛(frontend) fix hand icon and queue position alignment and position #1119
- 🩹(backend) add page_size to pagination for room endpoints #1131 - 🩹(backend) add page_size to pagination for room endpoints #1131
- 🐛(backend) refactor lobby throttling to use participant id #1129 - 🐛(backend) refactor lobby throttling to use participant id #1129
- 🩹(backend) ignore non-recording uploads in storage webhook handler #1142
- 🐛(frontend) fix dimension mismatch in BackgroundCustomProcessor #1116
## [1.10.0] - 2026-03-05 ## [1.10.0] - 2026-03-05
+23 -39
View File
@@ -13,28 +13,14 @@ RUN apk update && \
# ---- Back-end builder image ---- # ---- Back-end builder image ----
FROM base AS back-builder FROM base AS back-builder
WORKDIR /builder
ENV UV_COMPILE_BYTECODE=1 # Copy required python dependencies
ENV UV_LINK_MODE=copy COPY ./src/backend /builder
# Disable Python downloads, because we want to use the system interpreter RUN mkdir /install && \
# across both images. If using a managed Python version, it needs to be pip install --prefix=/install .
# copied from the build image into the final image;
ENV UV_PYTHON_DOWNLOADS=0
# install uv
COPY --from=ghcr.io/astral-sh/uv:0.10.9 /uv /uvx /bin/
WORKDIR /app
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=src/backend/uv.lock,target=uv.lock \
--mount=type=bind,source=src/backend/pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project --no-dev
COPY src/backend /app
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-dev
# ---- mails ---- # ---- mails ----
FROM node:20 AS mail-builder FROM node:20 AS mail-builder
@@ -44,7 +30,7 @@ COPY ./src/mail /mail/app
WORKDIR /mail/app WORKDIR /mail/app
RUN yarn install --frozen-lockfile && \ RUN yarn install --frozen-lockfile && \
yarn build yarn build
# ---- static link collector ---- # ---- static link collector ----
@@ -56,17 +42,17 @@ RUN apk add \
libmagic \ libmagic \
rdfind rdfind
# Copy installed python dependencies
COPY --from=back-builder /install /usr/local
# Copy Meet application (see .dockerignore)
COPY ./src/backend /app/
WORKDIR /app WORKDIR /app
# Copy the application from the builder
COPY --from=back-builder /app /app
ENV PATH="/app/.venv/bin:$PATH"
# collectstatic # collectstatic
RUN DJANGO_CONFIGURATION=Build DJANGO_JWT_PRIVATE_SIGNING_KEY=Dummy \ RUN DJANGO_CONFIGURATION=Build DJANGO_JWT_PRIVATE_SIGNING_KEY=Dummy \
python manage.py collectstatic --noinput python manage.py collectstatic --noinput
# Replace duplicated file by a symlink to decrease the overall size of the # Replace duplicated file by a symlink to decrease the overall size of the
# final image # final image
@@ -95,17 +81,14 @@ COPY ./docker/files/usr/local/bin/entrypoint /usr/local/bin/entrypoint
# docker user (see entrypoint). # docker user (see entrypoint).
RUN chmod g=u /etc/passwd RUN chmod g=u /etc/passwd
# Copy the application from the builder # Copy installed python dependencies
COPY --from=back-builder /app /app COPY --from=back-builder /install /usr/local
# Copy Meet application (see .dockerignore)
COPY ./src/backend /app/
WORKDIR /app WORKDIR /app
ENV PATH="/app/.venv/bin:$PATH"
# Generate compiled translation messages
RUN DJANGO_CONFIGURATION=Build \
python manage.py compilemessages --ignore=".venv/**/*"
# We wrap commands run in this container by the following entrypoint that # We wrap commands run in this container by the following entrypoint that
# creates a user on-the-fly with the container user ID (see USER) and root group # creates a user on-the-fly with the container user ID (see USER) and root group
# ID. # ID.
@@ -120,9 +103,10 @@ USER root:root
# Install psql # Install psql
RUN apk add postgresql-client RUN apk add postgresql-client
# Install development dependencies # Uninstall Meet and re-install it in editable mode along with development
RUN --mount=from=ghcr.io/astral-sh/uv:0.10.9,source=/uv,target=/bin/uv \ # dependencies
uv sync --all-extras --locked RUN pip uninstall -y meet
RUN pip install -e .[dev]
# Restore the un-privileged user running the application # Restore the un-privileged user running the application
ARG DOCKER_USER ARG DOCKER_USER
@@ -131,7 +115,7 @@ USER ${DOCKER_USER}
# Target database host (e.g. database engine following docker compose services # Target database host (e.g. database engine following docker compose services
# name) & port # name) & port
ENV DB_HOST=postgresql \ ENV DB_HOST=postgresql \
DB_PORT=5432 DB_PORT=5432
# Run django development server # Run django development server
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
+8 -14
View File
@@ -73,8 +73,7 @@ create-env-files: \
env.d/development/crowdin \ env.d/development/crowdin \
env.d/development/postgresql \ env.d/development/postgresql \
env.d/development/kc_postgresql \ env.d/development/kc_postgresql \
env.d/development/summary \ env.d/development/summary
env.d/development/kube-secret
.PHONY: create-env-files .PHONY: create-env-files
bootstrap: ## Prepare Docker images for the project bootstrap: ## Prepare Docker images for the project
@@ -192,7 +191,6 @@ lint-pylint: ## lint back-end python sources with pylint only on changed files f
test: ## run project tests test: ## run project tests
@$(MAKE) test-back-parallel @$(MAKE) test-back-parallel
@$(MAKE) test-summary
.PHONY: test .PHONY: test
test-back: ## run back-end tests test-back: ## run back-end tests
@@ -205,11 +203,6 @@ test-back-parallel: ## run all back-end tests in parallel
bin/pytest -n auto $${args:-${1}} bin/pytest -n auto $${args:-${1}}
.PHONY: test-back-parallel .PHONY: test-back-parallel
test-summary: ## run summary tests
@args="$(filter-out $@,$(MAKECMDGOALS))" && \
bin/pytest-summary $${args:-${1}}
.PHONY: test-summary
makemigrations: ## run django makemigrations for the Meet project. makemigrations: ## run django makemigrations for the Meet project.
@echo "$(BOLD)Running makemigrations$(RESET)" @echo "$(BOLD)Running makemigrations$(RESET)"
@$(COMPOSE) up -d postgresql @$(COMPOSE) up -d postgresql
@@ -230,7 +223,7 @@ superuser: ## Create an admin superuser with password "admin"
.PHONY: superuser .PHONY: superuser
back-i18n-compile: ## compile the gettext files back-i18n-compile: ## compile the gettext files
@$(MANAGE) compilemessages --ignore=".venv/**/*" @$(MANAGE) compilemessages --ignore="venv/**/*"
.PHONY: back-i18n-compile .PHONY: back-i18n-compile
back-i18n-generate: ## create the .pot files used for i18n back-i18n-generate: ## create the .pot files used for i18n
@@ -266,9 +259,6 @@ env.d/development/kc_postgresql:
env.d/development/summary: env.d/development/summary:
cp -n env.d/development/summary.dist env.d/development/summary cp -n env.d/development/summary.dist env.d/development/summary
env.d/development/kube-secret:
cp -n env.d/development/kube-secret.dist env.d/development/kube-secret
# -- Internationalization # -- Internationalization
env.d/development/crowdin: env.d/development/crowdin:
@@ -363,10 +353,14 @@ install-external-secrets: ## install the kubernetes secrets from Vaultwarden
./bin/install-external-secrets.sh ./bin/install-external-secrets.sh
.PHONY: build-k8s-cluster .PHONY: build-k8s-cluster
start-tilt: ## start the kubernetes cluster using kind
tilt up -f ./bin/Tiltfile
.PHONY: build-k8s-cluster
start-tilt-keycloak: ## start the kubernetes cluster using kind, without Pro Connect for authentication, use keycloak start-tilt-keycloak: ## start the kubernetes cluster using kind, without Pro Connect for authentication, use keycloak
DEV_ENV=dev-keycloak tilt up --namespace=meet -f ./bin/Tiltfile DEV_ENV=dev-keycloak tilt up -f ./bin/Tiltfile
.PHONY: build-k8s-cluster .PHONY: build-k8s-cluster
start-tilt-dinum: ## start the kubernetes cluster using kind, without Pro Connect for authentication, but with DINUM styles start-tilt-dinum: ## start the kubernetes cluster using kind, without Pro Connect for authentication, but with DINUM styles
DEV_ENV=dev-dinum tilt up --namespace=meet -f ./bin/Tiltfile DEV_ENV=dev-dinum tilt up -f ./bin/Tiltfile
.PHONY: build-k8s-cluster .PHONY: build-k8s-cluster
+2 -10
View File
@@ -2,7 +2,7 @@ load('ext://uibutton', 'cmd_button', 'bool_input', 'location')
load('ext://namespace', 'namespace_create', 'namespace_inject') load('ext://namespace', 'namespace_create', 'namespace_inject')
namespace_create('meet') namespace_create('meet')
DEV_ENV = os.getenv('DEV_ENV', 'dev-keycloak') DEV_ENV = os.getenv('DEV_ENV', 'dev')
if DEV_ENV == 'dev-dinum': if DEV_ENV == 'dev-dinum':
update_settings(suppress_unused_image_warnings=["localhost:5001/meet-frontend-generic:latest"]) update_settings(suppress_unused_image_warnings=["localhost:5001/meet-frontend-generic:latest"])
@@ -95,22 +95,14 @@ docker_build(
) )
clean_old_images('localhost:5001/meet-livekit') clean_old_images('localhost:5001/meet-livekit')
load('ext://secret', 'secret_yaml_generic') k8s_yaml(local('cd ../src/helm && helmfile -n meet -e ${DEV_ENV:-dev} template .'))
k8s_yaml(secret_yaml_generic(
name="secret-dev",
from_env_file="../env.d/development/kube-secret"
))
k8s_yaml(local('cd ../src/helm && helmfile -n meet -e ${DEV_ENV:-dev-keycloak} template .'))
k8s_resource('minio-bucket', resource_deps=['minio']) k8s_resource('minio-bucket', resource_deps=['minio'])
k8s_resource('meet-backend', resource_deps=['postgresql', 'minio', 'redis', 'livekit-livekit-server']) k8s_resource('meet-backend', resource_deps=['postgresql', 'minio', 'redis', 'livekit-livekit-server'])
k8s_resource('meet-celery-backend', resource_deps=['redis']) k8s_resource('meet-celery-backend', resource_deps=['redis'])
k8s_resource('meet-celery-summarize', resource_deps=['redis']) k8s_resource('meet-celery-summarize', resource_deps=['redis'])
k8s_resource('meet-celery-summary-backend', resource_deps=['redis'])
k8s_resource('meet-celery-transcribe', resource_deps=['redis']) k8s_resource('meet-celery-transcribe', resource_deps=['redis'])
k8s_resource('meet-backend-migrate', resource_deps=['meet-backend']) k8s_resource('meet-backend-migrate', resource_deps=['meet-backend'])
k8s_resource('livekit-livekit-server', resource_deps=['redis'])
k8s_resource('livekit-livekit-server-test-connection', resource_deps=['livekit-livekit-server']) k8s_resource('livekit-livekit-server-test-connection', resource_deps=['livekit-livekit-server'])
k8s_resource('keycloak', resource_deps=['kc-postgresql']) k8s_resource('keycloak', resource_deps=['kc-postgresql'])
k8s_resource('meet-backend-createsuperuser', resource_deps=['meet-backend-migrate']) k8s_resource('meet-backend-createsuperuser', resource_deps=['meet-backend-migrate'])
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env bash
source "$(dirname "${BASH_SOURCE[0]}")/_config.sh"
_dc_run \
app-summary-dev \
python -m pytest "$@"
+1 -3
View File
@@ -58,7 +58,7 @@ services:
/usr/bin/mc admin config set meet notify_webhook:meet-webhook endpoint='http://app-dev:8000/api/v1.0/recordings/storage-hook/' auth_token='Bearer password' && /usr/bin/mc admin config set meet notify_webhook:meet-webhook endpoint='http://app-dev:8000/api/v1.0/recordings/storage-hook/' auth_token='Bearer password' &&
/usr/bin/mc admin service restart meet --wait --json && /usr/bin/mc admin service restart meet --wait --json &&
sleep 15 && sleep 15 &&
/usr/bin/mc event add meet/meet-media-storage arn:minio:sqs::meet-webhook:webhook --event put --prefix "recordings" && /usr/bin/mc event add meet/meet-media-storage arn:minio:sqs::meet-webhook:webhook --event put &&
exit 0;" exit 0;"
app-dev: app-dev:
@@ -80,7 +80,6 @@ services:
volumes: volumes:
- ./src/backend:/app - ./src/backend:/app
- ./data/static:/data/static - ./data/static:/data/static
- /app/.venv
depends_on: depends_on:
- postgresql - postgresql
- mailcatcher - mailcatcher
@@ -106,7 +105,6 @@ services:
volumes: volumes:
- ./src/backend:/app - ./src/backend:/app
- ./data/static:/data/static - ./data/static:/data/static
- /app/.venv
depends_on: depends_on:
- app-dev - app-dev
+4 -3
View File
@@ -61,10 +61,11 @@ services:
`docker compose up -d` `docker compose up -d`
``` ```
Your keycloak instance is now available on https://id.yourdomain.tld Your keycloak instance is now available on https://doc.yourdomain.tld
> [!CAUTION] > [!CAUTION]
> Version of the images are set to latest, you should pin it to the desired version to avoid unwanted upgrades when pulling latest image. You can find available versions on [Keycloak registry](https://quay.io/repository/keycloak/keycloak?tab=tags). > Version of the images are set to latest, you should pin it to the desired version to avoid unwanted upgrades when pulling latest image. You can find available versions on [Keycloak registry](https://quay.io/repository/keycloak/keycloak?tab=tags).
```
## Creating an OIDC Client for Meet Application ## Creating an OIDC Client for Meet Application
@@ -75,7 +76,7 @@ Your keycloak instance is now available on https://id.yourdomain.tld
3. Enter the name of the realm - `meet`. 3. Enter the name of the realm - `meet`.
4. Click "Create". 4. Click "Create".
### Step 2: Create a New Client #### Step 2: Create a New Client
1. Navigate to the "Clients" tab. 1. Navigate to the "Clients" tab.
2. Click on the "Create client" button. 2. Click on the "Create client" button.
@@ -85,7 +86,7 @@ Your keycloak instance is now available on https://id.yourdomain.tld
1. Set the "Web Origins" to the URL of your meet application - e.g. `https://meet.example.com`. 1. Set the "Web Origins" to the URL of your meet application - e.g. `https://meet.example.com`.
1. Click "Save". 1. Click "Save".
### Step 3: Get Client Credentials #### Step 3: Get Client Credentials
1. Go to the "Credentials" tab. 1. Go to the "Credentials" tab.
2. Copy the client ID (`meet` in this example) and the client secret. 2. Copy the client ID (`meet` in this example) and the client secret.
+1 -1
View File
@@ -71,7 +71,7 @@ backend:
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false # Extra volume to manage our local custom CA and avoid to set ssl_verify: false
extraVolumeMounts: extraVolumeMounts:
- name: certs - name: certs
mountPath: /app/.venv/lib/python3.13/site-packages/certifi/cacert.pem mountPath: /usr/local/lib/python3.12/site-packages/certifi/cacert.pem
subPath: cacert.pem subPath: cacert.pem
# Extra volume to manage our local custom CA and avoid to set ssl_verify: false # Extra volume to manage our local custom CA and avoid to set ssl_verify: false
-1
View File
@@ -190,7 +190,6 @@ paths:
'403': '403':
$ref: '#/components/responses/ForbiddenError' $ref: '#/components/responses/ForbiddenError'
/rooms/:
post: post:
tags: tags:
- Rooms - Rooms
-1
View File
@@ -113,7 +113,6 @@ paths:
'403': '403':
$ref: '#/components/responses/ForbiddenError' $ref: '#/components/responses/ForbiddenError'
/rooms/:
post: post:
tags: tags:
- Rooms - Rooms
+1 -2
View File
@@ -27,8 +27,7 @@ AWS_S3_DOMAIN_REPLACE=http://localhost:9000
AWS_S3_ENDPOINT_URL=http://minio:9000 AWS_S3_ENDPOINT_URL=http://minio:9000
AWS_S3_ACCESS_KEY_ID=meet AWS_S3_ACCESS_KEY_ID=meet
AWS_S3_SECRET_ACCESS_KEY=password AWS_S3_SECRET_ACCESS_KEY=password
MEDIA_BASE_URL=http://localhost:3000 MEDIA_BASE_URL=http://localhost:8083
FILE_UPLOAD_ENABLED=True
# OIDC # OIDC
OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/meet/protocol/openid-connect/certs OIDC_OP_JWKS_ENDPOINT=http://nginx:8083/realms/meet/protocol/openid-connect/certs
-4
View File
@@ -1,4 +0,0 @@
WHISPERX_BASE_URL=https://configure-your-url.com
WHISPERX_API_KEY=<key>
LLM_BASE_URL=https://configure-your-url.com
LLM_API_KEY=<key>
-6
View File
@@ -36,12 +36,6 @@
"matchPackageNames": ["django"], "matchPackageNames": ["django"],
"allowedVersions": "<6.0.0" "allowedVersions": "<6.0.0"
}, },
{
"groupName": "allowed brevo versions",
"matchManagers": ["pep621"],
"matchPackageNames": ["brevo-python"],
"allowedVersions": "<3.0.0"
},
{ {
"enabled": false, "enabled": false,
"groupName": "ignored js dependencies", "groupName": "ignored js dependencies",
+2
View File
@@ -4,6 +4,8 @@ FROM python:3.13-slim AS base
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libglib2.0-0 \ libglib2.0-0 \
libgobject-2.0-0 \ libgobject-2.0-0 \
"openssl=3.5.4-1~deb13u2" \
"libssl3t64=3.5.4-1~deb13u2" \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
FROM base AS builder FROM base AS builder
+6 -6
View File
@@ -1,20 +1,20 @@
[project] [project]
name = "agents" name = "agents"
version = "1.13.0" version = "1.10.0"
requires-python = ">=3.12" requires-python = ">=3.12"
dependencies = [ dependencies = [
"livekit-agents==1.4.5", "livekit-agents==1.3.10",
"livekit-plugins-deepgram==1.4.5", "livekit-plugins-deepgram==1.3.10",
"livekit-plugins-silero==1.4.5", "livekit-plugins-silero==1.3.10",
"livekit-plugins-kyutai-lasuite==0.0.6", "livekit-plugins-kyutai-lasuite==0.0.6",
"python-dotenv==1.2.2", "python-dotenv==1.2.1",
"protobuf==6.33.5" "protobuf==6.33.5"
] ]
[project.optional-dependencies] [project.optional-dependencies]
dev = [ dev = [
"ruff==0.15.6", "ruff==0.14.4",
] ]
[build-system] [build-system]
+2 -35
View File
@@ -197,38 +197,6 @@ def resend_notification(modeladmin, request, queryset): # pylint: disable=unuse
) )
@admin.action(description=_("Mark selected recordings as 'Failed to Stop'"))
def mark_as_failed_to_stop(modeladmin, request, queryset):
"""Force selected recordings status to failed_to_stop."""
eligible_statuses = [
models.RecordingStatusChoices.ACTIVE,
models.RecordingStatusChoices.INITIATED,
models.RecordingStatusChoices.STOPPED,
]
eligible = queryset.filter(status__in=eligible_statuses)
skipped = queryset.exclude(status__in=eligible_statuses).count()
updated = eligible.update(status=models.RecordingStatusChoices.FAILED_TO_STOP)
if updated > 0:
modeladmin.message_user(
request,
_("%(count)s recording(s) successfully marked as 'Failed to Stop'.")
% {"count": updated},
level=messages.SUCCESS,
)
if skipped > 0:
modeladmin.message_user(
request,
_("Skipped %(count)s recording(s) with an ineligible status.")
% {"count": skipped},
level=messages.WARNING,
)
@admin.register(models.Recording) @admin.register(models.Recording)
class RecordingAdmin(admin.ModelAdmin): class RecordingAdmin(admin.ModelAdmin):
"""Recording admin interface declaration.""" """Recording admin interface declaration."""
@@ -256,7 +224,7 @@ class RecordingAdmin(admin.ModelAdmin):
"updated_at", "updated_at",
"worker_id", "worker_id",
) )
actions = [resend_notification, mark_as_failed_to_stop] actions = [resend_notification]
def get_queryset(self, request): def get_queryset(self, request):
"""Optimize queries by prefetching related access and user data to avoid N+1 queries.""" """Optimize queries by prefetching related access and user data to avoid N+1 queries."""
@@ -308,7 +276,7 @@ class ApplicationAdmin(admin.ModelAdmin):
form = ApplicationAdminForm form = ApplicationAdminForm
list_display = ("id", "name", "client_id", "get_scopes_display", "is_active") list_display = ("id", "name", "client_id", "get_scopes_display")
fields = [ fields = [
"name", "name",
"id", "id",
@@ -317,7 +285,6 @@ class ApplicationAdmin(admin.ModelAdmin):
"scopes", "scopes",
"client_id", "client_id",
"client_secret", "client_secret",
"is_active",
] ]
readonly_fields = ["id", "created_at", "updated_at"] readonly_fields = ["id", "created_at", "updated_at"]
inlines = [ApplicationDomainInline] inlines = [ApplicationDomainInline]
-15
View File
@@ -43,21 +43,6 @@ def get_frontend_configuration(request):
"expiration_days": settings.RECORDING_EXPIRATION_DAYS, "expiration_days": settings.RECORDING_EXPIRATION_DAYS,
"max_duration": settings.RECORDING_MAX_DURATION, "max_duration": settings.RECORDING_MAX_DURATION,
}, },
"background_image": {
"upload_is_enabled": settings.FILE_UPLOAD_ENABLED,
"max_count_by_user": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
"max_count_by_user"
],
"max_size": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
"max_size"
],
"allowed_extensions": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
"allowed_extensions"
],
"allowed_mimetypes": settings.FILE_UPLOAD_RESTRICTIONS["background_image"][
"allowed_mimetypes"
],
},
"telephony": { "telephony": {
"enabled": settings.ROOM_TELEPHONY_ENABLED, "enabled": settings.ROOM_TELEPHONY_ENABLED,
"phone_number": settings.ROOM_TELEPHONY_PHONE_NUMBER "phone_number": settings.ROOM_TELEPHONY_PHONE_NUMBER
-1
View File
@@ -13,7 +13,6 @@ class FeatureFlag:
"recording": "RECORDING_ENABLE", "recording": "RECORDING_ENABLE",
"storage_event": "RECORDING_STORAGE_EVENT_ENABLE", "storage_event": "RECORDING_STORAGE_EVENT_ENABLE",
"subtitle": "ROOM_SUBTITLE_ENABLED", "subtitle": "ROOM_SUBTITLE_ENABLED",
"file_upload": "FILE_UPLOAD_ENABLED",
} }
@classmethod @classmethod
-8
View File
@@ -1,6 +1,5 @@
"""Permission handlers for the Meet core app.""" """Permission handlers for the Meet core app."""
from django.conf import settings
from django.http import Http404 from django.http import Http404
from rest_framework import permissions from rest_framework import permissions
@@ -117,13 +116,6 @@ class FilePermission(IsAuthenticated):
Handling soft deletions specificities Handling soft deletions specificities
""" """
def has_permission(self, request, view):
"""Allow access only to authenticated users."""
if not settings.FILE_UPLOAD_ENABLED:
raise Http404
return super().has_permission(request, view)
def has_object_permission(self, request, view, obj): def has_object_permission(self, request, view, obj):
""" """
Return a 404 on deleted files or if the user is not the owner Return a 404 on deleted files or if the user is not the owner
+36 -5
View File
@@ -13,7 +13,7 @@ from django.core.exceptions import SuspiciousOperation
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django_pydantic_field.rest_framework import SchemaField from django_pydantic_field.rest_framework import SchemaField
from pydantic import BaseModel, Field from pydantic import BaseModel, Field, ValidationError
from rest_framework import serializers from rest_framework import serializers
from rest_framework.exceptions import PermissionDenied from rest_framework.exceptions import PermissionDenied
from timezone_field.rest_framework import TimeZoneSerializerField from timezone_field.rest_framework import TimeZoneSerializerField
@@ -123,6 +123,16 @@ class ListRoomSerializer(serializers.ModelSerializer):
read_only_fields = ["id", "slug"] read_only_fields = ["id", "slug"]
class RoomConfiguration(BaseModel):
"""Wip"""
can_publish_sources: list[Literal[
"microphone", "screen_share", "screen_share_audio", "camera"
]] | None = None
model_config = {"extra": "forbid"}
class RoomSerializer(serializers.ModelSerializer): class RoomSerializer(serializers.ModelSerializer):
"""Serialize Room model for the API.""" """Serialize Room model for the API."""
@@ -131,6 +141,20 @@ class RoomSerializer(serializers.ModelSerializer):
fields = ["id", "name", "slug", "configuration", "access_level", "pin_code"] fields = ["id", "name", "slug", "configuration", "access_level", "pin_code"]
read_only_fields = ["id", "slug", "pin_code"] read_only_fields = ["id", "slug", "pin_code"]
def validate_configuration(self, configuration):
"""Wip."""
if configuration is None:
return configuration
try:
RoomConfiguration.model_validate(configuration)
except ValidationError as e:
raise SuspiciousOperation("Wip, invalid room configuration")
return configuration
def to_representation(self, instance): def to_representation(self, instance):
""" """
Add users only for administrator users. Add users only for administrator users.
@@ -303,9 +327,6 @@ class MuteParticipantSerializer(BaseParticipantsManagementSerializer):
) )
TrackSource = Literal["SCREEN_SHARE", "SCREEN_SHARE_AUDIO", "CAMERA", "MICROPHONE"]
class ParticipantPermission(BaseModel): class ParticipantPermission(BaseModel):
"""Mirror the LiveKit ParticipantPermission protobuf. """Mirror the LiveKit ParticipantPermission protobuf.
@@ -316,7 +337,9 @@ class ParticipantPermission(BaseModel):
can_subscribe: bool | None = None can_subscribe: bool | None = None
can_publish: bool | None = None can_publish: bool | None = None
can_publish_data: bool | None = None can_publish_data: bool | None = None
can_publish_sources: list[TrackSource] = Field(default_factory=list) can_publish_sources: list[int] = Field(
default_factory=list
) # TrackSource enum values
hidden: bool | None = None hidden: bool | None = None
recorder: bool | None = None recorder: bool | None = None
can_update_metadata: bool | None = None can_update_metadata: bool | None = None
@@ -367,6 +390,14 @@ class UpdateParticipantSerializer(BaseParticipantsManagementSerializer):
f"Setting the following participant permissions is not allowed: " f"Setting the following participant permissions is not allowed: "
f"{', '.join(suspicious_fields)}." f"{', '.join(suspicious_fields)}."
) )
if permission.can_subscribe_metrics is not None:
raise serializers.ValidationError(
{
"permission": {
"can_subscribe_metrics": "This permission is not implemented."
}
}
)
return permission return permission
+19 -35
View File
@@ -1,6 +1,7 @@
"""API endpoints""" """API endpoints"""
# pylint: disable=too-many-lines # pylint: disable=too-many-lines
import re
import uuid import uuid
from logging import getLogger from logging import getLogger
from urllib.parse import unquote, urlparse from urllib.parse import unquote, urlparse
@@ -11,7 +12,6 @@ from django.db.models import Q
from django.http import Http404 from django.http import Http404
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.utils.text import slugify from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _
from django_filters import rest_framework as django_filters from django_filters import rest_framework as django_filters
from rest_framework import ( from rest_framework import (
@@ -33,12 +33,10 @@ from rest_framework import (
from core import enums, models, utils from core import enums, models, utils
from core.api.filters import ListFileFilter from core.api.filters import ListFileFilter
from core.enums import MEDIA_STORAGE_URL_PATTERN
from core.recording.enums import FileExtension from core.recording.enums import FileExtension
from core.recording.event.authentication import StorageEventAuthentication from core.recording.event.authentication import StorageEventAuthentication
from core.recording.event.exceptions import ( from core.recording.event.exceptions import (
InvalidBucketError, InvalidBucketError,
InvalidFilepathError,
InvalidFileTypeError, InvalidFileTypeError,
ParsingEventDataError, ParsingEventDataError,
) )
@@ -80,6 +78,17 @@ from .feature_flag import FeatureFlag
logger = getLogger(__name__) logger = getLogger(__name__)
FILE_FOLDER = settings.FILE_UPLOAD_PATH
UUID_REGEX = (
r"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
)
FILE_EXT_REGEX = r"[\d\w]+"
MEDIA_STORAGE_URL_PATTERN = re.compile(
f"{settings.MEDIA_URL:s}"
rf"(?P<key>{FILE_FOLDER:s}/(?P<pk>{UUID_REGEX:s})/\.{FILE_EXT_REGEX:s})$"
)
class NestedGenericViewSet(viewsets.GenericViewSet): class NestedGenericViewSet(viewsets.GenericViewSet):
""" """
A generic Viewset aims to be used in a nested route context. A generic Viewset aims to be used in a nested route context.
@@ -488,7 +497,9 @@ class RoomViewSet(
if status_code == drf_status.HTTP_500_INTERNAL_SERVER_ERROR: if status_code == drf_status.HTTP_500_INTERNAL_SERVER_ERROR:
raise e raise e
return drf_response.Response({"status": "error"}, status=status_code) return drf_response.Response(
{"status": "error", "message": str(e)}, status=status_code
)
@decorators.action( @decorators.action(
detail=False, detail=False,
@@ -755,19 +766,14 @@ class RecordingViewSet(
recording_id = parser.get_recording_id(request.data) recording_id = parser.get_recording_id(request.data)
except ParsingEventDataError as e: except ParsingEventDataError as e:
raise drf_exceptions.PermissionDenied("Invalid request data.") from e raise drf_exceptions.PermissionDenied(f"Invalid request data: {e}") from e
except InvalidBucketError as e: except InvalidBucketError as e:
raise drf_exceptions.PermissionDenied("Invalid bucket specified.") from e raise drf_exceptions.PermissionDenied("Invalid bucket specified") from e
except InvalidFilepathError: except InvalidFileTypeError as e:
return drf_response.Response( return drf_response.Response(
{"message": "Notification ignored."}, {"message": f"Ignore this file type, {e}"},
)
except InvalidFileTypeError:
return drf_response.Response(
{"message": "Notification ignored."},
) )
try: try:
@@ -967,26 +973,6 @@ class FileViewSet(
def perform_create(self, serializer): def perform_create(self, serializer):
"""Set the current user as creator of the newly created file.""" """Set the current user as creator of the newly created file."""
if settings.FILE_UPLOAD_APPLY_RESTRICTIONS:
file_type = serializer.validated_data["type"]
config_for_file_type = settings.FILE_UPLOAD_RESTRICTIONS[file_type]
count = models.File.objects.filter(
creator=self.request.user,
deleted_at__isnull=True,
type=file_type,
).count()
if count >= config_for_file_type["max_count_by_user"]:
logger.info(
"create_item: user reached max files per user for type %s",
file_type,
)
raise serializers.PermissionDenied(
_("You have reached the maximum number of files for this type.")
)
serializer.save(creator=self.request.user) serializer.save(creator=self.request.user)
def perform_destroy(self, instance): def perform_destroy(self, instance):
@@ -994,7 +980,6 @@ class FileViewSet(
instance.soft_delete() instance.soft_delete()
@decorators.action(detail=True, methods=["post"], url_path="upload-ended") @decorators.action(detail=True, methods=["post"], url_path="upload-ended")
@FeatureFlag.require("file_upload")
def upload_ended(self, request, *args, **kwargs): def upload_ended(self, request, *args, **kwargs):
""" """
Check the actual uploaded file and mark it as ready. Check the actual uploaded file and mark it as ready.
@@ -1177,7 +1162,6 @@ class FileViewSet(
return url_params, request.user.id, file return url_params, request.user.id, file
@decorators.action(detail=False, methods=["get"], url_path="media-auth") @decorators.action(detail=False, methods=["get"], url_path="media-auth")
@FeatureFlag.require("file_upload")
def media_auth(self, request, *args, **kwargs): def media_auth(self, request, *args, **kwargs):
""" """
This view is used by an Nginx subrequest to control access to an file's This view is used by an Nginx subrequest to control access to an file's
+1 -7
View File
@@ -14,15 +14,9 @@ FILE_EXT_REGEX = r"[a-zA-Z0-9]{1,10}"
# pylint: disable=line-too-long # pylint: disable=line-too-long
RECORDING_STORAGE_URL_PATTERN = re.compile( RECORDING_STORAGE_URL_PATTERN = re.compile(
rf"{settings.MEDIA_URL:s}{settings.RECORDING_OUTPUT_FOLDER}/(?P<recording_id>{UUID_REGEX:s})\.(?P<extension>{FILE_EXT_REGEX:s})" f"/media/{settings.RECORDING_OUTPUT_FOLDER}/(?P<recording_id>{UUID_REGEX:s}).(?P<extension>{FILE_EXT_REGEX:s})"
) )
MEDIA_STORAGE_URL_PATTERN = re.compile(
f"{settings.MEDIA_URL:s}"
rf"(?P<key>{settings.FILE_UPLOAD_PATH:s}/(?P<pk>{UUID_REGEX:s})\.{FILE_EXT_REGEX:s})$"
)
# Django sets `LANGUAGES` by default with all supported languages. We can use it for # Django sets `LANGUAGES` by default with all supported languages. We can use it for
# the choice of languages which should not be limited to the few languages active in # the choice of languages which should not be limited to the few languages active in
# the app. # the app.
@@ -203,7 +203,7 @@ class ApplicationJWTAuthentication(BaseJWTAuthentication):
logger.warning("Application not found: %s", client_id) logger.warning("Application not found: %s", client_id)
raise exceptions.AuthenticationFailed("Application not found.") from e raise exceptions.AuthenticationFailed("Application not found.") from e
if not application.is_active: if not application.active:
logger.warning( logger.warning(
"Inactive application attempted authentication: %s", client_id "Inactive application attempted authentication: %s", client_id
) )
+3 -3
View File
@@ -61,12 +61,12 @@ class ApplicationViewSet(viewsets.ViewSet):
except models.Application.DoesNotExist as e: except models.Application.DoesNotExist as e:
raise drf_exceptions.AuthenticationFailed("Invalid credentials") from e raise drf_exceptions.AuthenticationFailed("Invalid credentials") from e
if not application.active:
raise drf_exceptions.AuthenticationFailed("Application is inactive")
if not check_password(client_secret, application.client_secret): if not check_password(client_secret, application.client_secret):
raise drf_exceptions.AuthenticationFailed("Invalid credentials") raise drf_exceptions.AuthenticationFailed("Invalid credentials")
if not application.is_active:
raise drf_exceptions.AuthenticationFailed("Application is inactive")
email = serializer.validated_data["scope"] email = serializer.validated_data["scope"]
try: try:
validate_email(email) validate_email(email)
+1 -1
View File
@@ -129,7 +129,7 @@ class ApplicationFactory(factory.django.DjangoModelFactory):
model = models.Application model = models.Application
name = factory.Faker("company") name = factory.Faker("company")
is_active = True active = True
client_id = factory.LazyFunction(utils.generate_client_id) client_id = factory.LazyFunction(utils.generate_client_id)
client_secret = factory.LazyFunction(utils.generate_client_secret) client_secret = factory.LazyFunction(utils.generate_client_secret)
scopes = [] scopes = []
@@ -1,18 +0,0 @@
# Generated by Django 5.2.12 on 2026-03-11 14:39
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0017_file'),
]
operations = [
migrations.RenameField(
model_name='application',
old_name='active',
new_name='is_active',
),
]
+2 -2
View File
@@ -759,7 +759,7 @@ class Application(BaseModel):
verbose_name=_("Application name"), verbose_name=_("Application name"),
help_text=_("Descriptive name for this application."), help_text=_("Descriptive name for this application."),
) )
is_active = models.BooleanField(default=True) active = models.BooleanField(default=True)
client_id = models.CharField( client_id = models.CharField(
max_length=100, unique=True, default=utils.generate_client_id max_length=100, unique=True, default=utils.generate_client_id
) )
@@ -952,7 +952,7 @@ class File(BaseModel):
_, extension = splitext(self.filename) _, extension = splitext(self.filename)
# We store only the extension in the storage system to avoid # We store only the extension in the storage system to avoid
# leaking Personal Information in logs, etc. # leaking Personal Information in logs, etc.
return f"{self.key_base}{extension!s}" return f"{self.key_base}/{extension!s}"
def get_abilities(self, user): def get_abilities(self, user):
""" """
+1 -3
View File
@@ -9,8 +9,6 @@ from typing import Any, Dict, Optional, Protocol
from django.conf import settings from django.conf import settings
from django.utils.module_loading import import_string from django.utils.module_loading import import_string
from core.enums import FILE_EXT_REGEX, UUID_REGEX
from .exceptions import ( from .exceptions import (
InvalidBucketError, InvalidBucketError,
InvalidFilepathError, InvalidFilepathError,
@@ -88,7 +86,7 @@ class MinioParser:
# pylint: disable=line-too-long # pylint: disable=line-too-long
self._filepath_regex = re.compile( self._filepath_regex = re.compile(
rf"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?{settings.RECORDING_OUTPUT_FOLDER}%2F(?P<recording_id>{UUID_REGEX})\.(?P<extension>{FILE_EXT_REGEX})" r"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?(?P<recording_id>[0-9a-fA-F\-]{36})\.(?P<extension>[a-zA-Z0-9]+)"
) )
@staticmethod @staticmethod
+10 -13
View File
@@ -4,7 +4,7 @@ import smtplib
from logging import getLogger from logging import getLogger
from django.conf import settings from django.conf import settings
from django.core.mail import EmailMultiAlternatives from django.core.mail import send_mail
from django.template.loader import render_to_string from django.template.loader import render_to_string
from django.utils.translation import get_language, override from django.utils.translation import get_language, override
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@@ -45,18 +45,15 @@ class InvitationService:
) )
) # Force translation ) # Force translation
email = EmailMultiAlternatives(
subject=subject,
body=msg_plain,
from_email=settings.EMAIL_FROM,
to=[],
bcc=emails,
)
email.attach_alternative(msg_html, "text/html")
try: try:
email.send() send_mail(
subject,
msg_plain,
settings.EMAIL_FROM,
emails,
html_message=msg_html,
fail_silently=False,
)
except smtplib.SMTPException as e: except smtplib.SMTPException as e:
logger.error("invitations were not sent: %s", e) logger.error("invitation to %s was not sent: %s", emails, e)
raise InvitationError("Could not send invitation") from e raise InvitationError("Could not send invitation") from e
@@ -118,7 +118,7 @@ def test_api_files_create_file_authenticated_success():
assert policy_parsed.scheme == "http" assert policy_parsed.scheme == "http"
assert policy_parsed.netloc == "localhost:9000" assert policy_parsed.netloc == "localhost:9000"
assert policy_parsed.path == f"/meet-media-storage/files/{file.id!s}.png" assert policy_parsed.path == f"/meet-media-storage/files/{file.id!s}/.png"
query_params = parse_qs(policy_parsed.query) query_params = parse_qs(policy_parsed.query)
@@ -174,26 +174,6 @@ def test_api_files_create_file_authenticated_extension_case_insensitive():
assert file.title == "file" assert file.title == "file"
def test_api_files_create_file_disabled(settings):
"""
Creating a file is denied if file upload is disabled
"""
settings.FILE_UPLOAD_ENABLED = False
user = factories.UserFactory()
client = APIClient()
client.force_login(user)
response = client.post(
"/api/v1.0/files/",
{
"type": FileTypeChoices.BACKGROUND_IMAGE,
"filename": "file.JPG",
},
format="json",
)
assert response.status_code == 404
assert not File.objects.exists()
def test_api_files_create_file_authenticated_not_checking_extension(settings): def test_api_files_create_file_authenticated_not_checking_extension(settings):
""" """
Creating a file with an extension not allowed should not fail when restrictions are disabled. Creating a file with an extension not allowed should not fail when restrictions are disabled.
@@ -259,48 +239,6 @@ def test_api_files_create_file_authenticated_hidden_file_but_checking_extension_
assert response.json() == {"filename": ["This file extension is not allowed."]} assert response.json() == {"filename": ["This file extension is not allowed."]}
def test_api_files_create_file_too_many(
settings,
):
"""
Creating a file is forbidden if above user limit.
"""
settings.FILE_UPLOAD_APPLY_RESTRICTIONS = True
settings.FILE_UPLOAD_RESTRICTIONS = {
"background_image": {
**settings.FILE_UPLOAD_RESTRICTIONS["background_image"],
"max_count_by_user": 1,
},
}
user = factories.UserFactory()
client = APIClient()
client.force_login(user)
response = client.post(
"/api/v1.0/files/",
{
"type": FileTypeChoices.BACKGROUND_IMAGE,
"filename": "1.png",
},
)
assert response.status_code == 201
response = client.post(
"/api/v1.0/files/",
{
"type": FileTypeChoices.BACKGROUND_IMAGE,
"filename": "2.png",
},
)
assert response.status_code == 403
assert response.json() == {
"detail": "You have reached the maximum number of files for this type."
}
assert File.objects.count() == 1
def test_api_files_create_force_id_success(): def test_api_files_create_force_id_success():
"""It should be possible to force the item ID when creating a item.""" """It should be possible to force the item ID when creating a item."""
user = factories.UserFactory() user = factories.UserFactory()
@@ -39,7 +39,7 @@ def test_api_files_update_anonymous_forbidden():
def test_api_files_update_description_and_title(): def test_api_files_update_description_and_title():
""" """
Test the description and title of a file can be updated. Test the description and title of an file can be updated.
""" """
user = factories.UserFactory() user = factories.UserFactory()
@@ -32,7 +32,7 @@ def valid_minio_event():
"s3": { "s3": {
"bucket": {"name": "test-bucket"}, "bucket": {"name": "test-bucket"},
"object": { "object": {
"key": "recordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", "key": "recording%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
"contentType": "audio/ogg", "contentType": "audio/ogg",
}, },
} }
@@ -51,7 +51,7 @@ def test_parse_valid_event(minio_parser, valid_minio_event):
"""Test parsing a valid Minio event.""" """Test parsing a valid Minio event."""
event = minio_parser.parse(valid_minio_event) event = minio_parser.parse(valid_minio_event)
assert isinstance(event, StorageEvent) assert isinstance(event, StorageEvent)
assert event.filepath == "recordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg" assert event.filepath == "recording%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg"
assert event.filetype == "audio/ogg" assert event.filetype == "audio/ogg"
assert event.bucket_name == "test-bucket" assert event.bucket_name == "test-bucket"
assert event.metadata is None assert event.metadata is None
@@ -130,13 +130,11 @@ def test_validate_invalid_filetype(minio_parser):
"invalid_filepath", "invalid_filepath",
[ [
"invalid_filepath", # totally invalid string "invalid_filepath", # totally invalid string
"recordings/46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", "recording/46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
"recordings/46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing extension "recording/46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing extension
"46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing url_encoded_folder_path and extension "46d1a121-2426-484d-8fb3-09b5d886f7a8", # missing url_encoded_folder_path and extension
"", # empty string "", # empty string
"46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", # no folder at all "recording%2F46d1a1212426484d8fb309b5d886f7a8.ogg",
"uploads%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", # wrong folder name
"folder%2Fuploads%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", # nested but no recordings/
], ],
) )
def test_validate_invalid_filepath(invalid_filepath, minio_parser): def test_validate_invalid_filepath(invalid_filepath, minio_parser):
@@ -154,7 +152,7 @@ def test_validate_invalid_filepath(invalid_filepath, minio_parser):
def test_validate_valid_event(minio_parser): def test_validate_valid_event(minio_parser):
"""Test validation with valid event data.""" """Test validation with valid event data."""
event = StorageEvent( event = StorageEvent(
filepath="recordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", filepath="recording%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
filetype="audio/ogg", filetype="audio/ogg",
bucket_name="test-bucket", bucket_name="test-bucket",
metadata=None, metadata=None,
@@ -172,7 +170,7 @@ def test_get_recording_id_success(minio_parser, valid_minio_event):
def test_validate_filepath_with_folder(minio_parser): def test_validate_filepath_with_folder(minio_parser):
"""Test validation of filepath with folder structure.""" """Test validation of filepath with folder structure."""
event = StorageEvent( event = StorageEvent(
filepath="parent_folder%2Frecordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", filepath="parent_folder%2Ffolder%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
filetype="audio/ogg", filetype="audio/ogg",
bucket_name="test-bucket", bucket_name="test-bucket",
metadata=None, metadata=None,
@@ -221,7 +219,7 @@ def test_validate_custom_filetypes():
parser = MinioParser(bucket_name="test-bucket", allowed_filetypes={"audio/mp3"}) parser = MinioParser(bucket_name="test-bucket", allowed_filetypes={"audio/mp3"})
event = StorageEvent( event = StorageEvent(
filepath="parent_folder%2Frecordings%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg", filepath="parent_folder%2Ffolder%2F46d1a121-2426-484d-8fb3-09b5d886f7a8.ogg",
filetype="audio/mp3", filetype="audio/mp3",
bucket_name="test-bucket", bucket_name="test-bucket",
metadata=None, metadata=None,
@@ -14,7 +14,6 @@ from ...factories import RecordingFactory
from ...models import Recording, RecordingStatusChoices from ...models import Recording, RecordingStatusChoices
from ...recording.event.exceptions import ( from ...recording.event.exceptions import (
InvalidBucketError, InvalidBucketError,
InvalidFilepathError,
InvalidFileTypeError, InvalidFileTypeError,
ParsingEventDataError, ParsingEventDataError,
) )
@@ -95,7 +94,7 @@ def test_save_recording_parsing_error(recording_settings, mock_get_parser, clien
) )
assert response.status_code == 403 assert response.status_code == 403
assert response.json() == {"detail": "Invalid request data."} assert response.json() == {"detail": "Invalid request data: Error message"}
def test_save_recording_bucket_error(recording_settings, mock_get_parser, client): def test_save_recording_bucket_error(recording_settings, mock_get_parser, client):
@@ -112,7 +111,7 @@ def test_save_recording_bucket_error(recording_settings, mock_get_parser, client
) )
assert response.status_code == 403 assert response.status_code == 403
assert response.json() == {"detail": "Invalid bucket specified."} assert response.json() == {"detail": "Invalid bucket specified"}
def test_save_recording_filetype_error(recording_settings, mock_get_parser): def test_save_recording_filetype_error(recording_settings, mock_get_parser):
@@ -133,28 +132,7 @@ def test_save_recording_filetype_error(recording_settings, mock_get_parser):
) )
assert response.status_code == 200 assert response.status_code == 200
assert response.json() == {"message": "Notification ignored."} assert response.json() == {"message": "Ignore this file type, unsupported '.json'"}
def test_save_recording_filepath_error(recording_settings, mock_get_parser):
"""Test handling of unsupported filepath in recording event data."""
mock_parser = mock.Mock()
mock_parser.get_recording_id.side_effect = InvalidFilepathError(
"Invalid filepath structure: parent/folder/recording.jpeg"
)
mock_get_parser.return_value = mock_parser
client = APIClient()
response = client.post(
"/api/v1.0/recordings/storage-hook/",
{"recording_data": "valid-data"},
HTTP_AUTHORIZATION="Bearer testAuthToken",
)
assert response.status_code == 200
assert response.json() == {"message": "Notification ignored."}
def test_save_recording_unknown_recording(recording_settings, mock_get_parser, client): def test_save_recording_unknown_recording(recording_settings, mock_get_parser, client):
@@ -240,9 +240,10 @@ def test_api_rooms_invite_error(mock_invite_to_room):
mock_invite_to_room.assert_called_once() mock_invite_to_room.assert_called_once()
@mock.patch("core.services.invitation.EmailMultiAlternatives") @mock.patch("core.services.invitation.send_mail")
def test_api_rooms_invite_success(mock_email_class, settings): def test_api_rooms_invite_success(mock_send_mail, settings):
"""Test privileged users should successfully send invitation emails.""" """Test privileged users should successfully send invitation emails."""
settings.EMAIL_BRAND_NAME = "ACME" settings.EMAIL_BRAND_NAME = "ACME"
settings.EMAIL_LOGO_IMG = "https://acme.com/logo" settings.EMAIL_LOGO_IMG = "https://acme.com/logo"
settings.EMAIL_APP_BASE_URL = "https://acme.com" settings.EMAIL_APP_BASE_URL = "https://acme.com"
@@ -254,6 +255,7 @@ def test_api_rooms_invite_success(mock_email_class, settings):
user = UserFactory() user = UserFactory()
room.accesses.create(user=user, role=random.choice(["administrator", "owner"])) room.accesses.create(user=user, role=random.choice(["administrator", "owner"]))
client.force_login(user) client.force_login(user)
data = {"emails": ["fabien@yopmail.com", "gerald@yopmail.com"]} data = {"emails": ["fabien@yopmail.com", "gerald@yopmail.com"]}
@@ -267,38 +269,26 @@ def test_api_rooms_invite_success(mock_email_class, settings):
assert response.status_code == 200 assert response.status_code == 200
assert response.json() == {"status": "success", "message": "invitations sent"} assert response.json() == {"status": "success", "message": "invitations sent"}
mock_email_class.assert_called_once() mock_send_mail.assert_called_once()
# Check constructor arguments subject, body, sender, recipients = mock_send_mail.call_args[0]
call_kwargs = mock_email_class.call_args[1] # EmailMultiAlternatives(**kwargs)
assert call_kwargs["subject"] == ( assert (
f"Video call in progress: {user.email} is waiting for you to connect" subject == f"Video call in progress: {user.email} is waiting for you to connect"
)
assert call_kwargs["from_email"] == "notifications@acme.com"
assert call_kwargs["to"] == []
assert sorted(call_kwargs["bcc"]) == sorted(
["fabien@yopmail.com", "gerald@yopmail.com"]
) )
# Check plain text body # Verify email contains expected content
plain_body = call_kwargs["body"]
required_content = [ required_content = [
"ACME", "ACME", # Brand name
"https://acme.com/logo", "https://acme.com/logo", # Logo URL
f"https://acme.com/{room.slug}", f"https://acme.com/{room.slug}", # Room url
f"acme.com/{room.slug}", f"acme.com/{room.slug}", # Room link
] ]
for content in required_content:
assert content in plain_body
# Check HTML alternative was attached
mock_instance = mock_email_class.return_value
mock_instance.attach_alternative.assert_called_once()
html_body, mimetype = mock_instance.attach_alternative.call_args[0]
assert mimetype == "text/html"
for content in required_content: for content in required_content:
assert content in html_body assert content in body
# Check send was called assert sender == "notifications@acme.com"
mock_instance.send.assert_called_once()
# Verify all owners received the email (order-independent comparison)
assert sorted(recipients) == sorted(["fabien@yopmail.com", "gerald@yopmail.com"])
@@ -130,11 +130,10 @@ def test_update_participant_success(mock_livekit_client):
"can_publish": True, "can_publish": True,
"can_publish_data": True, "can_publish_data": True,
"can_publish_sources": [ "can_publish_sources": [
"CAMERA", 1,
"MICROPHONE", 2,
], ], # [TrackSource.CAMERA, TrackSource.MICROPHONE]
"can_update_metadata": True, "can_update_metadata": True,
"can_subscribe_metrics": True,
}, },
"name": "John Doe", "name": "John Doe",
} }
@@ -156,14 +155,8 @@ def test_update_participant_success(mock_livekit_client):
{"can_subscribe": True}, {"can_subscribe": True},
{"can_publish": True}, {"can_publish": True},
{"can_publish_data": True}, {"can_publish_data": True},
{ {"can_publish_sources": [1, 2]},
"can_publish_sources": [
"CAMERA",
"MICROPHONE",
]
},
{"can_update_metadata": True}, {"can_update_metadata": True},
{"can_subscribe_metrics": False},
], ],
) )
def test_update_participant_permission_fields_are_optional( def test_update_participant_permission_fields_are_optional(
@@ -271,6 +264,35 @@ def test_update_participant_suspicious_permission_multiple(mock_suspicious):
) )
@pytest.mark.parametrize("value", (False, True))
def test_update_participant_unimplemented_can_subscribe_metrics(value):
"""Test update participant raises 400 when can_subscribe_metrics is set."""
client = APIClient()
room = RoomFactory()
user = UserFactory()
UserResourceAccessFactory(
resource=room, user=user, role=random.choice(["administrator", "owner"])
)
client.force_authenticate(user=user)
payload = {
"participant_identity": str(uuid4()),
"permission": {
"can_subscribe": True,
"can_publish": True,
"can_publish_data": True,
"can_update_metadata": False,
"can_subscribe_metrics": value,
},
}
url = reverse("rooms-update-participant", kwargs={"pk": room.id})
response = client.post(url, payload, format="json")
assert response.status_code == status.HTTP_400_BAD_REQUEST
assert "can_subscribe_metrics" in str(response.data)
def test_update_participant_forbidden_without_access(): def test_update_participant_forbidden_without_access():
"""Test update participant returns 403 when user lacks room privileges.""" """Test update participant returns 403 when user lacks room privileges."""
client = APIClient() client = APIClient()
@@ -232,7 +232,7 @@ def test_api_rooms_retrieve_authenticated_public(mock_token):
""" """
room = RoomFactory( room = RoomFactory(
access_level=RoomAccessLevel.PUBLIC, access_level=RoomAccessLevel.PUBLIC,
configuration={"can_publish_sources": ["mock-source"]}, configuration={"can_publish_sources": ["camera"]},
) )
user = UserFactory() user = UserFactory()
@@ -264,7 +264,7 @@ def test_api_rooms_retrieve_authenticated_public(mock_token):
user=user, user=user,
username=None, username=None,
color=None, color=None,
sources=["mock-source"], sources=["camera"],
is_admin_or_owner=False, is_admin_or_owner=False,
participant_id=None, participant_id=None,
) )
@@ -363,7 +363,7 @@ def test_api_rooms_retrieve_members(mock_token, django_assert_num_queries, setti
other_user = UserFactory() other_user = UserFactory()
room = RoomFactory( room = RoomFactory(
configuration={"can_publish_sources": ["mock-source"]}, configuration={"can_publish_sources": ["camera"]},
) )
UserResourceAccessFactory(resource=room, user=user, role="member") UserResourceAccessFactory(resource=room, user=user, role="member")
UserResourceAccessFactory(resource=room, user=other_user, role="member") UserResourceAccessFactory(resource=room, user=other_user, role="member")
@@ -401,7 +401,7 @@ def test_api_rooms_retrieve_members(mock_token, django_assert_num_queries, setti
user=user, user=user,
username=None, username=None,
color=None, color=None,
sources=["mock-source"], sources=["camera"],
is_admin_or_owner=False, is_admin_or_owner=False,
participant_id=None, participant_id=None,
) )
@@ -205,7 +205,7 @@ def test_start_subtitle_wrong_signature(settings, mock_livekit_token):
"""Test that tokens signed with incorrect signature are rejected.""" """Test that tokens signed with incorrect signature are rejected."""
settings.ROOM_SUBTITLE_ENABLED = True settings.ROOM_SUBTITLE_ENABLED = True
settings.LIVEKIT_CONFIGURATION["api_secret"] = "wrong-secret-padded-to-32-bytes!!" settings.LIVEKIT_CONFIGURATION["api_secret"] = "wrong-secret"
room = RoomFactory() room = RoomFactory()
client = APIClient() client = APIClient()
@@ -95,7 +95,7 @@ def test_api_rooms_update_administrators():
"name": "New name", "name": "New name",
"slug": "should-be-ignored", "slug": "should-be-ignored",
"access_level": RoomAccessLevel.PUBLIC, "access_level": RoomAccessLevel.PUBLIC,
"configuration": {"the_key": "the_value"}, "configuration": {"can_publish_sources": ["camera"]},
}, },
format="json", format="json",
) )
@@ -104,7 +104,7 @@ def test_api_rooms_update_administrators():
assert room.name == "New name" assert room.name == "New name"
assert room.slug == "new-name" assert room.slug == "new-name"
assert room.access_level == RoomAccessLevel.PUBLIC assert room.access_level == RoomAccessLevel.PUBLIC
assert room.configuration == {"the_key": "the_value"} assert room.configuration == {"can_publish_sources": ["camera"]}
def test_api_rooms_update_administrators_of_another(): def test_api_rooms_update_administrators_of_another():
@@ -47,7 +47,7 @@ def mock_livekit_config(settings):
"""Mock LiveKit configuration.""" """Mock LiveKit configuration."""
settings.LIVEKIT_CONFIGURATION = { settings.LIVEKIT_CONFIGURATION = {
"api_key": "test_api_key", "api_key": "test_api_key",
"api_secret": "test_api_secret_padded_to_32bytes!", "api_secret": "test_api_secret",
"url": "https://test-livekit.example.com/", "url": "https://test-livekit.example.com/",
} }
return settings.LIVEKIT_CONFIGURATION return settings.LIVEKIT_CONFIGURATION
@@ -77,6 +77,7 @@ def test_missing_auth_header(client, serialized_event_data, mock_livekit_config)
assert response.status_code == 401 assert response.status_code == 401
assert response.json() == { assert response.json() == {
"status": "error", "status": "error",
"message": "Authorization header missing",
} }
@@ -90,7 +91,7 @@ def test_invalid_payload(client, auth_token, mock_livekit_config):
) )
assert response.status_code == 400 assert response.status_code == 400
assert response.json() == {"status": "error"} assert response.json() == {"status": "error", "message": "Invalid webhook payload"}
def test_unknown_event_type(client, mock_livekit_config): def test_unknown_event_type(client, mock_livekit_config):
@@ -115,6 +116,7 @@ def test_unknown_event_type(client, mock_livekit_config):
assert response.status_code == 422 assert response.status_code == 422
assert response.json() == { assert response.json() == {
"status": "error", "status": "error",
"message": "Unknown webhook type: unknown_event_type",
} }
@@ -1,541 +0,0 @@
"""
Tests for JWT token service.
"""
# pylint: disable=W0212,W0621
import uuid
from unittest import mock
from django.core.exceptions import ImproperlyConfigured
import jwt as pyjwt
import pytest
from freezegun import freeze_time
from core.services.jwt_token import (
JwtTokenService,
TokenDecodeError,
TokenExpiredError,
TokenInvalidError,
)
# -- Fixtures --
@pytest.fixture
def jwt_service():
"""Create a JWT token service for testing."""
return JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="test-issuer",
audience="test-audience",
expiration_seconds=3600,
token_type="Bearer",
)
@pytest.fixture
def mock_user():
"""Create a mock user with a string ID."""
user = mock.Mock()
user.id = "test-user-id"
return user
# -- __init__ / Configuration --
def test_init_missing_secret_key():
"""Missing secret key should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Secret key is required"):
JwtTokenService(
secret_key="",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
def test_init_none_secret_key():
"""None secret key should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Secret key is required"):
JwtTokenService(
secret_key=None,
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
def test_init_missing_algorithm():
"""Missing algorithm should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Algorithm is required"):
JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
def test_init_none_algorithm():
"""None algorithm should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Algorithm is required"):
JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm=None,
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
def test_init_missing_token_type():
"""Missing token type should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Token's type is required"):
JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="",
)
def test_init_none_token_type():
"""None token type should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Token's type is required"):
JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type=None,
)
def test_init_none_expiration_seconds():
"""None expiration seconds should raise ImproperlyConfigured."""
with pytest.raises(ImproperlyConfigured, match="Expiration's seconds is required"):
JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=None,
token_type="Bearer",
)
def test_init_zero_expiration_seconds_is_accepted():
"""expiration_seconds=0 is falsy but should be accepted — token expires immediately."""
service = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=0,
token_type="Bearer",
)
assert service._expiration_seconds == 0
def test_init_stores_config_correctly():
"""All config values should be stored correctly on the instance."""
service = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="my-issuer",
audience="my-audience",
expiration_seconds=1800,
token_type="Bearer",
)
assert service._key == "test-secret-padded-to-32-bytes!!"
assert service._algorithm == "HS256"
assert service._issuer == "my-issuer"
assert service._audience == "my-audience"
assert service._expiration_seconds == 1800
assert service._token_type == "Bearer"
# -- generate_jwt / Return shape --
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_always_returns_required_keys(jwt_service, mock_user):
"""Response always contains access_token, token_type, and expires_in."""
result = jwt_service.generate_jwt(mock_user, scope="read")
assert "access_token" in result
assert "token_type" in result
assert "expires_in" in result
assert result["token_type"] == "Bearer"
assert result["expires_in"] == 3600
assert isinstance(result["access_token"], str)
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_scope_present_when_provided(jwt_service, mock_user):
"""scope key should be present in response when scope is provided."""
result = jwt_service.generate_jwt(mock_user, scope="read write")
assert result["scope"] == "read write"
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_scope_absent_when_empty(jwt_service, mock_user):
"""scope key should be absent from response when scope is empty."""
result = jwt_service.generate_jwt(mock_user, scope="")
assert "scope" not in result
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_scope_absent_when_none(jwt_service, mock_user):
"""scope key should be absent from response when scope is None."""
result = jwt_service.generate_jwt(mock_user, scope=None)
assert "scope" not in result
# -- generate_jwt / Payload correctness --
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_payload_contains_required_claims(jwt_service, mock_user):
"""Payload should always contain iat, exp, and user_id."""
result = jwt_service.generate_jwt(mock_user, scope="read")
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["iat"] == 1673784000
assert payload["exp"] == 1673787600
assert payload["user_id"] == "test-user-id"
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_exp_is_now_plus_expiration_seconds(mock_user):
"""exp should equal iat + expiration_seconds exactly."""
service = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=900,
token_type="Bearer",
)
result = service.generate_jwt(mock_user, scope="read")
payload = service.decode_jwt(result["access_token"])
assert payload["exp"] - payload["iat"] == 900
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_iss_included_when_set(jwt_service, mock_user):
"""iss should be present in payload when issuer is non-empty."""
result = jwt_service.generate_jwt(mock_user, scope="read")
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["iss"] == "test-issuer"
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_aud_included_when_set(jwt_service, mock_user):
"""aud should be present in payload when audience is non-empty."""
result = jwt_service.generate_jwt(mock_user, scope="read")
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["aud"] == "test-audience"
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_iss_absent_when_empty(mock_user):
"""iss should be absent from payload when issuer is empty string."""
service = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="",
audience="",
expiration_seconds=3600,
token_type="Bearer",
)
result = service.generate_jwt(mock_user, scope="read")
payload = pyjwt.decode(
result["access_token"],
"test-secret-padded-to-32-bytes!!",
algorithms=["HS256"],
options={"verify_aud": False},
)
assert "iss" not in payload
assert "aud" not in payload
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_iss_absent_when_none(mock_user):
"""iss should be absent from payload when issuer is None."""
service = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer=None,
audience=None,
expiration_seconds=3600,
token_type="Bearer",
)
result = service.generate_jwt(mock_user, scope="read")
payload = pyjwt.decode(
result["access_token"],
"test-secret-padded-to-32-bytes!!",
algorithms=["HS256"],
options={"verify_aud": False},
)
assert "iss" not in payload
assert "aud" not in payload
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_scope_absent_from_payload_when_empty(jwt_service, mock_user):
"""scope should be absent from payload when not provided."""
result = jwt_service.generate_jwt(mock_user, scope="")
payload = pyjwt.decode(
result["access_token"],
"test-secret-padded-to-32-bytes!!",
algorithms=["HS256"],
issuer="test-issuer",
audience="test-audience",
)
assert "scope" not in payload
# -- generate_jwt / extra_payload handling --
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_extra_payload_none_does_not_crash(jwt_service, mock_user):
"""extra_payload=None should not crash and produce a valid token."""
result = jwt_service.generate_jwt(mock_user, scope="read", extra_payload=None)
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["user_id"] == "test-user-id"
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_extra_payload_non_colliding_keys_preserved(
jwt_service, mock_user
):
"""Non-colliding extra_payload keys should appear in decoded token."""
result = jwt_service.generate_jwt(
mock_user,
scope="read",
extra_payload={"client_id": "my-app", "delegated": True},
)
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["client_id"] == "my-app"
assert payload["delegated"] is True
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_extra_payload_colliding_iat_overwritten(jwt_service, mock_user):
"""iat in extra_payload should be overwritten by the service."""
result = jwt_service.generate_jwt(mock_user, scope="read", extra_payload={"iat": 0})
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["iat"] == 1673784000
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_extra_payload_colliding_exp_overwritten(jwt_service, mock_user):
"""exp in extra_payload should be overwritten by the service."""
result = jwt_service.generate_jwt(
mock_user, scope="read", extra_payload={"exp": 9999999999}
)
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["exp"] == 1673787600
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_extra_payload_colliding_user_id_overwritten(
jwt_service, mock_user
):
"""user_id in extra_payload should be overwritten by the service."""
result = jwt_service.generate_jwt(
mock_user, scope="read", extra_payload={"user_id": "hacked"}
)
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["user_id"] == "test-user-id"
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_extra_payload_not_mutated(jwt_service, mock_user):
"""generate_jwt should not mutate the original extra_payload dict."""
extra = {"client_id": "my-app"}
jwt_service.generate_jwt(mock_user, scope="read", extra_payload=extra)
assert extra == {"client_id": "my-app"}
# -- generate_jwt / user.id casting --
@freeze_time("2023-01-15 12:00:00")
def test_generate_jwt_user_id_cast_from_uuid(jwt_service):
"""user.id as UUID should be cast to str in payload."""
user = mock.Mock()
user.id = uuid.UUID("12345678-1234-5678-1234-567812345678")
result = jwt_service.generate_jwt(user, scope="read")
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["user_id"] == "12345678-1234-5678-1234-567812345678"
# -- decode_jwt / Happy path --
def test_decode_jwt_roundtrip(jwt_service, mock_user):
"""Valid token should decode to correct payload."""
with freeze_time("2023-01-15 12:00:00"):
result = jwt_service.generate_jwt(
mock_user, scope="read", extra_payload={"client_id": "my-app"}
)
with freeze_time("2023-01-15 12:30:00"):
payload = jwt_service.decode_jwt(result["access_token"])
assert payload["user_id"] == "test-user-id"
assert payload["scope"] == "read"
assert payload["client_id"] == "my-app"
assert payload["iss"] == "test-issuer"
assert payload["aud"] == "test-audience"
# -- decode_jwt / Error mapping --
def test_decode_jwt_expired_raises_token_expired_error(jwt_service, mock_user):
"""Expired token should raise TokenExpiredError."""
with freeze_time("2023-01-15 12:00:00"):
result = jwt_service.generate_jwt(mock_user, scope="read")
with freeze_time("2099-01-01 00:00:00"):
with pytest.raises(TokenExpiredError):
jwt_service.decode_jwt(result["access_token"])
def test_decode_jwt_wrong_issuer_raises_token_invalid_error(mock_user):
"""Token with wrong issuer should raise TokenInvalidError."""
service_a = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer-a",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
service_b = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer-b",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
result = service_a.generate_jwt(mock_user, scope="read")
with pytest.raises(TokenInvalidError):
service_b.decode_jwt(result["access_token"])
def test_decode_jwt_wrong_audience_raises_token_invalid_error(mock_user):
"""Token with wrong audience should raise TokenInvalidError."""
service_a = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience-a",
expiration_seconds=3600,
token_type="Bearer",
)
service_b = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience-b",
expiration_seconds=3600,
token_type="Bearer",
)
result = service_a.generate_jwt(mock_user, scope="read")
with pytest.raises(TokenInvalidError):
service_b.decode_jwt(result["access_token"])
def test_decode_jwt_tampered_signature_raises_token_decode_error(
jwt_service, mock_user
):
"""Token with tampered signature should raise TokenDecodeError."""
result = jwt_service.generate_jwt(mock_user, scope="read")
header, payload, _ = result["access_token"].split(".")
tampered_token = f"{header}.{payload}.invalidsignature"
with pytest.raises(TokenDecodeError):
jwt_service.decode_jwt(tampered_token)
def test_decode_jwt_garbage_string_raises_token_decode_error(jwt_service):
"""Garbage string should raise TokenDecodeError."""
with pytest.raises(TokenDecodeError):
jwt_service.decode_jwt("this.is.not.a.valid.token")
def test_decode_jwt_empty_string_raises_token_decode_error(jwt_service):
"""Empty string should raise TokenDecodeError."""
with pytest.raises(TokenDecodeError):
jwt_service.decode_jwt("")
def test_decode_jwt_none_raises_token_decode_error(jwt_service):
"""None should raise TokenDecodeError."""
with pytest.raises(TokenDecodeError):
jwt_service.decode_jwt(None)
def test_algorithm_mismatch_raises_token_decode_error(mock_user):
"""Token encoded with HS256 decoded expecting RS256 should raise TokenDecodeError."""
service_hs256 = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="HS256",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
service_rs256 = JwtTokenService(
secret_key="test-secret-padded-to-32-bytes!!",
algorithm="RS256",
issuer="issuer",
audience="audience",
expiration_seconds=3600,
token_type="Bearer",
)
result = service_hs256.generate_jwt(mock_user, scope="read")
with pytest.raises(TokenDecodeError):
service_rs256.decode_jwt(result["access_token"])
@@ -713,7 +713,7 @@ def test_api_rooms_token_invalid_signature(mock_rs_authenticate, settings):
} }
token = jwt.encode( token = jwt.encode(
payload, payload,
"invalid-private-key-padded-to-32b!", "invalid-private-key",
algorithm=settings.APPLICATION_JWT_ALG, algorithm=settings.APPLICATION_JWT_ALG,
) )
@@ -904,7 +904,7 @@ def test_api_rooms_token_unknown_application(settings):
def test_api_rooms_token_inactive_application(settings): def test_api_rooms_token_inactive_application(settings):
"""Token for inactive application should be rejected.""" """Token for inactive application should be rejected."""
application = ApplicationFactory(is_active=False) application = ApplicationFactory(active=False)
now = datetime.now(timezone.utc) now = datetime.now(timezone.utc)
payload = { payload = {
@@ -23,7 +23,7 @@ def test_api_applications_generate_token_success(settings):
"""Valid credentials should return a JWT token.""" """Valid credentials should return a JWT token."""
UserFactory(email="User.Family@example.com") UserFactory(email="User.Family@example.com")
application = ApplicationFactory( application = ApplicationFactory(
is_active=True, active=True,
scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE], scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE],
) )
@@ -79,7 +79,7 @@ def test_api_applications_generate_token_invalid_client_id():
def test_api_applications_generate_token_invalid_client_secret(): def test_api_applications_generate_token_invalid_client_secret():
"""Invalid client_secret should return 401.""" """Invalid client_secret should return 401."""
user = UserFactory(email="user@example.com") user = UserFactory(email="user@example.com")
application = ApplicationFactory(is_active=True) application = ApplicationFactory(active=True)
client = APIClient() client = APIClient()
response = client.post( response = client.post(
@@ -100,7 +100,7 @@ def test_api_applications_generate_token_invalid_client_secret():
def test_api_applications_generate_token_inactive_application(): def test_api_applications_generate_token_inactive_application():
"""Inactive application should return 401.""" """Inactive application should return 401."""
user = UserFactory(email="user@example.com") user = UserFactory(email="user@example.com")
application = ApplicationFactory(is_active=False) application = ApplicationFactory(active=False)
plain_secret = "test-secret-123" plain_secret = "test-secret-123"
application.client_secret = plain_secret application.client_secret = plain_secret
@@ -122,31 +122,9 @@ def test_api_applications_generate_token_inactive_application():
assert "Application is inactive" in str(response.data) assert "Application is inactive" in str(response.data)
def test_api_applications_generate_token_inactive_application_wrong_secret():
"""An inactive application with a wrong secret should return 401."""
user = UserFactory(email="user@example.com")
application = ApplicationFactory(is_active=False)
client = APIClient()
response = client.post(
"/external-api/v1.0/application/token/",
{
"client_id": application.client_id,
"client_secret": "wrong-secret",
"grant_type": "client_credentials",
"scope": user.email,
},
format="json",
)
assert response.status_code == 401
assert "Invalid credentials" in str(response.data)
assert "inactive" not in str(response.data).lower()
def test_api_applications_generate_token_invalid_email_format(): def test_api_applications_generate_token_invalid_email_format():
"""Invalid email format should return 400.""" """Invalid email format should return 400."""
application = ApplicationFactory(is_active=True) application = ApplicationFactory(active=True)
plain_secret = "test-secret-123" plain_secret = "test-secret-123"
application.client_secret = plain_secret application.client_secret = plain_secret
@@ -171,7 +149,7 @@ def test_api_applications_generate_token_invalid_email_format():
def test_api_applications_generate_token_domain_not_authorized(): def test_api_applications_generate_token_domain_not_authorized():
"""Application without domain authorization should return 403.""" """Application without domain authorization should return 403."""
user = UserFactory(email="user@denied.com") user = UserFactory(email="user@denied.com")
application = ApplicationFactory(is_active=True) application = ApplicationFactory(active=True)
ApplicationDomainFactory(application=application, domain="allowed.com") ApplicationDomainFactory(application=application, domain="allowed.com")
plain_secret = "test-secret-123" plain_secret = "test-secret-123"
@@ -198,7 +176,7 @@ def test_api_applications_generate_token_domain_authorized():
"""Application with domain authorization should succeed.""" """Application with domain authorization should succeed."""
user = UserFactory(email="user@allowed.com") user = UserFactory(email="user@allowed.com")
application = ApplicationFactory( application = ApplicationFactory(
is_active=True, active=True,
scopes=[ApplicationScope.ROOMS_LIST], scopes=[ApplicationScope.ROOMS_LIST],
) )
ApplicationDomainFactory(application=application, domain="allowed.com") ApplicationDomainFactory(application=application, domain="allowed.com")
@@ -225,7 +203,7 @@ def test_api_applications_generate_token_domain_authorized():
def test_api_applications_generate_token_user_not_found(): def test_api_applications_generate_token_user_not_found():
"""Non-existent user should return 404.""" """Non-existent user should return 404."""
application = ApplicationFactory(is_active=True) application = ApplicationFactory(active=True)
plain_secret = "test-secret-123" plain_secret = "test-secret-123"
application.client_secret = plain_secret application.client_secret = plain_secret
@@ -253,7 +231,7 @@ def test_api_applications_token_payload_structure(settings):
user = UserFactory(email="user@example.com") user = UserFactory(email="user@example.com")
application = ApplicationFactory( application = ApplicationFactory(
is_active=True, active=True,
scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE], scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE],
) )
@@ -306,7 +284,7 @@ def test_api_applications_token_new_user(settings):
assert len(User.objects.all()) == 0 assert len(User.objects.all()) == 0
application = ApplicationFactory( application = ApplicationFactory(
is_active=True, active=True,
scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE], scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE],
) )
@@ -364,7 +342,7 @@ def test_api_applications_token_existing_user(settings):
assert len(User.objects.all()) == 1 assert len(User.objects.all()) == 1
application = ApplicationFactory( application = ApplicationFactory(
is_active=True, active=True,
scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE], scopes=[ApplicationScope.ROOMS_LIST, ApplicationScope.ROOMS_CREATE],
) )
@@ -41,7 +41,7 @@ def test_models_application_name_maxlength():
def test_models_application_active_default(): def test_models_application_active_default():
"""An application should be active by default.""" """An application should be active by default."""
application = Application.objects.create(name="Test App") application = Application.objects.create(name="Test App")
assert application.is_active is True assert application.active is True
def test_models_application_scopes_default(): def test_models_application_scopes_default():
Binary file not shown.
+96 -115
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-12 13:46+0000\n" "POT-Creation-Date: 2026-02-26 17:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -29,11 +29,11 @@ msgstr "Berechtigungen"
msgid "Important dates" msgid "Important dates"
msgstr "Wichtige Daten" msgstr "Wichtige Daten"
#: core/admin.py:132 core/admin.py:275 #: core/admin.py:132 core/admin.py:243
msgid "No owner" msgid "No owner"
msgstr "Kein Eigentümer" msgstr "Kein Eigentümer"
#: core/admin.py:135 core/admin.py:278 #: core/admin.py:135 core/admin.py:246
msgid "Multiple owners" msgid "Multiple owners"
msgstr "Mehrere Eigentümer" msgstr "Mehrere Eigentümer"
@@ -61,136 +61,117 @@ msgstr "Benachrichtigungen für %(count)s Aufnahme(n) erfolgreich gesendet."
msgid "Skipped %(count)s expired recording(s)." msgid "Skipped %(count)s expired recording(s)."
msgstr "%(count)s abgelaufene Aufnahme(n) übersprungen." msgstr "%(count)s abgelaufene Aufnahme(n) übersprungen."
#: core/admin.py:200 #: core/admin.py:309
msgid "Mark selected recordings as 'Failed to Stop'"
msgstr "Ausgewählte Aufnahmen als Fehler beim Stoppen markieren"
#: core/admin.py:218
#, python-format
msgid "%(count)s recording(s) successfully marked as 'Failed to Stop'."
msgstr "%(count)s Aufnahme(n) erfolgreich als Fehler beim Stoppen markiert."
#: core/admin.py:226
#, fuzzy, python-format
#| msgid "Skipped %(count)s expired recording(s)."
msgid "Skipped %(count)s recording(s) with an ineligible status."
msgstr "%(count)s abgelaufene Aufnahme(n) übersprungen."
#: core/admin.py:342
msgid "No scopes" msgid "No scopes"
msgstr "Keine Scopes" msgstr "Keine Scopes"
#: core/admin.py:344 #: core/admin.py:311
msgid "Scopes" msgid "Scopes"
msgstr "Scopes" msgstr "Scopes"
#: core/api/filters.py:25 #: core/api/filters.py:24
msgid "Creator is me" msgid "Creator is me"
msgstr "Ersteller bin ich" msgstr "Ersteller bin ich"
#: core/api/serializers.py:88 #: core/api/serializers.py:84
msgid "You must be administrator or owner of a room to add accesses to it." msgid "You must be administrator or owner of a room to add accesses to it."
msgstr "" msgstr ""
"Sie müssen Administrator oder Eigentümer eines Raums sein, um Zugriffe " "Sie müssen Administrator oder Eigentümer eines Raums sein, um Zugriffe "
"hinzuzufügen." "hinzuzufügen."
#: core/api/serializers.py:516 #: core/api/serializers.py:443
msgid "This file extension is not allowed." msgid "This file extension is not allowed."
msgstr "Diese Dateiendung ist nicht erlaubt." msgstr "Diese Dateiendung ist nicht erlaubt."
#: core/api/serializers.py:533 #: core/models.py:35
msgid "You have reached the maximum number of files for this type."
msgstr "Sie haben die maximale Anzahl an Dateien dieses Typs erreicht."
#: core/models.py:37
msgid "Member" msgid "Member"
msgstr "Mitglied" msgstr "Mitglied"
#: core/models.py:38 #: core/models.py:36
msgid "Administrator" msgid "Administrator"
msgstr "Administrator" msgstr "Administrator"
#: core/models.py:39 #: core/models.py:37
msgid "Owner" msgid "Owner"
msgstr "Eigentümer" msgstr "Eigentümer"
#: core/models.py:55 #: core/models.py:53
msgid "Initiated" msgid "Initiated"
msgstr "Gestartet" msgstr "Gestartet"
#: core/models.py:56 #: core/models.py:54
msgid "Active" msgid "Active"
msgstr "Aktiv" msgstr "Aktiv"
#: core/models.py:57 #: core/models.py:55
msgid "Stopped" msgid "Stopped"
msgstr "Beendet" msgstr "Beendet"
#: core/models.py:58 #: core/models.py:56
msgid "Saved" msgid "Saved"
msgstr "Gespeichert" msgstr "Gespeichert"
#: core/models.py:59 #: core/models.py:57
msgid "Aborted" msgid "Aborted"
msgstr "Abgebrochen" msgstr "Abgebrochen"
#: core/models.py:60 #: core/models.py:58
msgid "Failed to Start" msgid "Failed to Start"
msgstr "Start fehlgeschlagen" msgstr "Start fehlgeschlagen"
#: core/models.py:61 #: core/models.py:59
msgid "Failed to Stop" msgid "Failed to Stop"
msgstr "Stopp fehlgeschlagen" msgstr "Stopp fehlgeschlagen"
#: core/models.py:62 #: core/models.py:60
msgid "Notification succeeded" msgid "Notification succeeded"
msgstr "Benachrichtigung erfolgreich" msgstr "Benachrichtigung erfolgreich"
#: core/models.py:89 #: core/models.py:87
msgid "SCREEN_RECORDING" msgid "SCREEN_RECORDING"
msgstr "BILDSCHIRMAUFZEICHNUNG" msgstr "BILDSCHIRMAUFZEICHNUNG"
#: core/models.py:90 #: core/models.py:88
msgid "TRANSCRIPT" msgid "TRANSCRIPT"
msgstr "TRANSKRIPT" msgstr "TRANSKRIPT"
#: core/models.py:96 #: core/models.py:94
msgid "Public Access" msgid "Public Access"
msgstr "Öffentlicher Zugriff" msgstr "Öffentlicher Zugriff"
#: core/models.py:97 #: core/models.py:95
msgid "Trusted Access" msgid "Trusted Access"
msgstr "Vertrauenswürdiger Zugriff" msgstr "Vertrauenswürdiger Zugriff"
#: core/models.py:98 #: core/models.py:96
msgid "Restricted Access" msgid "Restricted Access"
msgstr "Eingeschränkter Zugriff" msgstr "Eingeschränkter Zugriff"
#: core/models.py:110 #: core/models.py:108
msgid "id" msgid "id"
msgstr "ID" msgstr "ID"
#: core/models.py:111 #: core/models.py:109
msgid "primary key for the record as UUID" msgid "primary key for the record as UUID"
msgstr "Primärschlüssel des Eintrags als UUID" msgstr "Primärschlüssel des Eintrags als UUID"
#: core/models.py:117 #: core/models.py:115
msgid "created on" msgid "created on"
msgstr "erstellt am" msgstr "erstellt am"
#: core/models.py:118 #: core/models.py:116
msgid "date and time at which a record was created" msgid "date and time at which a record was created"
msgstr "Datum und Uhrzeit der Erstellung eines Eintrags" msgstr "Datum und Uhrzeit der Erstellung eines Eintrags"
#: core/models.py:123 #: core/models.py:121
msgid "updated on" msgid "updated on"
msgstr "aktualisiert am" msgstr "aktualisiert am"
#: core/models.py:124 #: core/models.py:122
msgid "date and time at which a record was last updated" msgid "date and time at which a record was last updated"
msgstr "Datum und Uhrzeit der letzten Aktualisierung eines Eintrags" msgstr "Datum und Uhrzeit der letzten Aktualisierung eines Eintrags"
#: core/models.py:144 #: core/models.py:142
msgid "" msgid ""
"Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/" "Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/"
"_ characters." "_ characters."
@@ -198,11 +179,11 @@ msgstr ""
"Geben Sie einen gültigen Sub ein. Dieser Wert darf nur Buchstaben, Zahlen " "Geben Sie einen gültigen Sub ein. Dieser Wert darf nur Buchstaben, Zahlen "
"und die Zeichen @/./+/-/_ enthalten." "und die Zeichen @/./+/-/_ enthalten."
#: core/models.py:150 #: core/models.py:148
msgid "sub" msgid "sub"
msgstr "Sub" msgstr "Sub"
#: core/models.py:152 #: core/models.py:150
msgid "" msgid ""
"Optional for pending users; required upon account activation. 255 characters " "Optional for pending users; required upon account activation. 255 characters "
"or fewer. Letters, numbers, and @/./+/-/_ characters only." "or fewer. Letters, numbers, and @/./+/-/_ characters only."
@@ -210,55 +191,55 @@ msgstr ""
"Optional für ausstehende Benutzer; erforderlich nach Kontoaktivierung. " "Optional für ausstehende Benutzer; erforderlich nach Kontoaktivierung. "
"Maximal 255 Zeichen. Nur Buchstaben, Zahlen und @/./+/-/_ Zeichen erlaubt." "Maximal 255 Zeichen. Nur Buchstaben, Zahlen und @/./+/-/_ Zeichen erlaubt."
#: core/models.py:161 #: core/models.py:159
msgid "identity email address" msgid "identity email address"
msgstr "Identitäts-E-Mail-Adresse" msgstr "Identitäts-E-Mail-Adresse"
#: core/models.py:166 #: core/models.py:164
msgid "admin email address" msgid "admin email address"
msgstr "Administrator-E-Mail-Adresse" msgstr "Administrator-E-Mail-Adresse"
#: core/models.py:168 #: core/models.py:166
msgid "full name" msgid "full name"
msgstr "Vollständiger Name" msgstr "Vollständiger Name"
#: core/models.py:170 #: core/models.py:168
msgid "short name" msgid "short name"
msgstr "Kurzname" msgstr "Kurzname"
#: core/models.py:176 #: core/models.py:174
msgid "language" msgid "language"
msgstr "Sprache" msgstr "Sprache"
#: core/models.py:177 #: core/models.py:175
msgid "The language in which the user wants to see the interface." msgid "The language in which the user wants to see the interface."
msgstr "Die Sprache, in der der Benutzer die Oberfläche sehen möchte." msgstr "Die Sprache, in der der Benutzer die Oberfläche sehen möchte."
#: core/models.py:183 #: core/models.py:181
msgid "The timezone in which the user wants to see times." msgid "The timezone in which the user wants to see times."
msgstr "Die Zeitzone, in der der Benutzer die Zeiten sehen möchte." msgstr "Die Zeitzone, in der der Benutzer die Zeiten sehen möchte."
#: core/models.py:186 #: core/models.py:184
msgid "device" msgid "device"
msgstr "Gerät" msgstr "Gerät"
#: core/models.py:188 #: core/models.py:186
msgid "Whether the user is a device or a real user." msgid "Whether the user is a device or a real user."
msgstr "Ob es sich um ein Gerät oder einen echten Benutzer handelt." msgstr "Ob es sich um ein Gerät oder einen echten Benutzer handelt."
#: core/models.py:191 #: core/models.py:189
msgid "staff status" msgid "staff status"
msgstr "Mitarbeiterstatus" msgstr "Mitarbeiterstatus"
#: core/models.py:193 #: core/models.py:191
msgid "Whether the user can log into this admin site." msgid "Whether the user can log into this admin site."
msgstr "Ob der Benutzer sich bei dieser Admin-Seite anmelden kann." msgstr "Ob der Benutzer sich bei dieser Admin-Seite anmelden kann."
#: core/models.py:196 #: core/models.py:194
msgid "active" msgid "active"
msgstr "aktiv" msgstr "aktiv"
#: core/models.py:199 #: core/models.py:197
msgid "" msgid ""
"Whether this user should be treated as active. Unselect this instead of " "Whether this user should be treated as active. Unselect this instead of "
"deleting accounts." "deleting accounts."
@@ -266,66 +247,66 @@ msgstr ""
"Ob dieser Benutzer als aktiv behandelt werden soll. Deaktivieren Sie dies " "Ob dieser Benutzer als aktiv behandelt werden soll. Deaktivieren Sie dies "
"anstelle des Löschens des Kontos." "anstelle des Löschens des Kontos."
#: core/models.py:212 #: core/models.py:210
msgid "user" msgid "user"
msgstr "Benutzer" msgstr "Benutzer"
#: core/models.py:213 #: core/models.py:211
msgid "users" msgid "users"
msgstr "Benutzer" msgstr "Benutzer"
#: core/models.py:272 #: core/models.py:270
msgid "Resource" msgid "Resource"
msgstr "Ressource" msgstr "Ressource"
#: core/models.py:273 #: core/models.py:271
msgid "Resources" msgid "Resources"
msgstr "Ressourcen" msgstr "Ressourcen"
#: core/models.py:331 #: core/models.py:329
msgid "Resource access" msgid "Resource access"
msgstr "Ressourcenzugriff" msgstr "Ressourcenzugriff"
#: core/models.py:332 #: core/models.py:330
msgid "Resource accesses" msgid "Resource accesses"
msgstr "Ressourcenzugriffe" msgstr "Ressourcenzugriffe"
#: core/models.py:338 #: core/models.py:336
msgid "Resource access with this User and Resource already exists." msgid "Resource access with this User and Resource already exists."
msgstr "" msgstr ""
"Ein Ressourcenzugriff mit diesem Benutzer und dieser Ressource existiert " "Ein Ressourcenzugriff mit diesem Benutzer und dieser Ressource existiert "
"bereits." "bereits."
#: core/models.py:394 #: core/models.py:392
msgid "Visio room configuration" msgid "Visio room configuration"
msgstr "Visio-Raumkonfiguration" msgstr "Visio-Raumkonfiguration"
#: core/models.py:395 #: core/models.py:393
msgid "Values for Visio parameters to configure the room." msgid "Values for Visio parameters to configure the room."
msgstr "Werte für Visio-Parameter zur Konfiguration des Raums." msgstr "Werte für Visio-Parameter zur Konfiguration des Raums."
#: core/models.py:402 #: core/models.py:400
msgid "Room PIN code" msgid "Room PIN code"
msgstr "PIN-Code für den Raum" msgstr "PIN-Code für den Raum"
#: core/models.py:403 #: core/models.py:401
msgid "Unique n-digit code that identifies this room in telephony mode." msgid "Unique n-digit code that identifies this room in telephony mode."
msgstr "" msgstr ""
"Eindeutiger n-stelliger Code, der diesen Raum im Telephonmodus identifiziert." "Eindeutiger n-stelliger Code, der diesen Raum im Telephonmodus identifiziert."
#: core/models.py:409 core/models.py:563 #: core/models.py:407 core/models.py:561
msgid "Room" msgid "Room"
msgstr "Raum" msgstr "Raum"
#: core/models.py:410 #: core/models.py:408
msgid "Rooms" msgid "Rooms"
msgstr "Räume" msgstr "Räume"
#: core/models.py:574 #: core/models.py:572
msgid "Worker ID" msgid "Worker ID"
msgstr "Worker-ID" msgstr "Worker-ID"
#: core/models.py:576 #: core/models.py:574
msgid "" msgid ""
"Enter an identifier for the worker recording.This ID is retained even when " "Enter an identifier for the worker recording.This ID is retained even when "
"the worker stops, allowing for easy tracking." "the worker stops, allowing for easy tracking."
@@ -334,120 +315,120 @@ msgstr ""
"erhalten, auch wenn der Worker stoppt, was ein einfaches Nachverfolgen " "erhalten, auch wenn der Worker stoppt, was ein einfaches Nachverfolgen "
"ermöglicht." "ermöglicht."
#: core/models.py:584 #: core/models.py:582
msgid "Recording mode" msgid "Recording mode"
msgstr "Aufzeichnungsmodus" msgstr "Aufzeichnungsmodus"
#: core/models.py:585 #: core/models.py:583
msgid "Defines the mode of recording being called." msgid "Defines the mode of recording being called."
msgstr "Definiert den aufgerufenen Aufzeichnungsmodus." msgstr "Definiert den aufgerufenen Aufzeichnungsmodus."
#: core/models.py:590 core/models.py:591 #: core/models.py:588 core/models.py:589
msgid "Recording options" msgid "Recording options"
msgstr "Aufnahmeoptionen" msgstr "Aufnahmeoptionen"
#: core/models.py:597 #: core/models.py:595
msgid "Recording" msgid "Recording"
msgstr "Aufzeichnung" msgstr "Aufzeichnung"
#: core/models.py:598 #: core/models.py:596
msgid "Recordings" msgid "Recordings"
msgstr "Aufzeichnungen" msgstr "Aufzeichnungen"
#: core/models.py:706 #: core/models.py:704
msgid "Recording/user relation" msgid "Recording/user relation"
msgstr "Beziehung Aufzeichnung/Benutzer" msgstr "Beziehung Aufzeichnung/Benutzer"
#: core/models.py:707 #: core/models.py:705
msgid "Recording/user relations" msgid "Recording/user relations"
msgstr "Beziehungen Aufzeichnung/Benutzer" msgstr "Beziehungen Aufzeichnung/Benutzer"
#: core/models.py:713 #: core/models.py:711
msgid "This user is already in this recording." msgid "This user is already in this recording."
msgstr "Dieser Benutzer ist bereits Teil dieser Aufzeichnung." msgstr "Dieser Benutzer ist bereits Teil dieser Aufzeichnung."
#: core/models.py:719 #: core/models.py:717
msgid "This team is already in this recording." msgid "This team is already in this recording."
msgstr "Dieses Team ist bereits Teil dieser Aufzeichnung." msgstr "Dieses Team ist bereits Teil dieser Aufzeichnung."
#: core/models.py:725 #: core/models.py:723
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "Entweder Benutzer oder Team muss festgelegt werden, nicht beides." msgstr "Entweder Benutzer oder Team muss festgelegt werden, nicht beides."
#: core/models.py:742 #: core/models.py:740
msgid "Create rooms" msgid "Create rooms"
msgstr "Räume erstellen" msgstr "Räume erstellen"
#: core/models.py:743 #: core/models.py:741
msgid "List rooms" msgid "List rooms"
msgstr "Räume auflisten" msgstr "Räume auflisten"
#: core/models.py:744 #: core/models.py:742
msgid "Retrieve room details" msgid "Retrieve room details"
msgstr "Raumdetails abrufen" msgstr "Raumdetails abrufen"
#: core/models.py:745 #: core/models.py:743
msgid "Update rooms" msgid "Update rooms"
msgstr "Räume aktualisieren" msgstr "Räume aktualisieren"
#: core/models.py:746 #: core/models.py:744
msgid "Delete rooms" msgid "Delete rooms"
msgstr "Räume löschen" msgstr "Räume löschen"
#: core/models.py:759 #: core/models.py:757
msgid "Application name" msgid "Application name"
msgstr "Anwendungsname" msgstr "Anwendungsname"
#: core/models.py:760 #: core/models.py:758
msgid "Descriptive name for this application." msgid "Descriptive name for this application."
msgstr "Beschreibender Name für diese Anwendung." msgstr "Beschreibender Name für diese Anwendung."
#: core/models.py:770 #: core/models.py:768
msgid "Hashed on Save. Copy it now if this is a new secret." msgid "Hashed on Save. Copy it now if this is a new secret."
msgstr "" msgstr ""
"Beim Speichern gehasht. Jetzt kopieren, wenn dies ein neues Geheimnis ist." "Beim Speichern gehasht. Jetzt kopieren, wenn dies ein neues Geheimnis ist."
#: core/models.py:781 #: core/models.py:779
msgid "Application" msgid "Application"
msgstr "Anwendung" msgstr "Anwendung"
#: core/models.py:782 #: core/models.py:780
msgid "Applications" msgid "Applications"
msgstr "Anwendungen" msgstr "Anwendungen"
#: core/models.py:805 #: core/models.py:803
msgid "Enter a valid domain" msgid "Enter a valid domain"
msgstr "Geben Sie eine gültige Domain ein" msgstr "Geben Sie eine gültige Domain ein"
#: core/models.py:808 #: core/models.py:806
msgid "Domain" msgid "Domain"
msgstr "Domain" msgstr "Domain"
#: core/models.py:809 #: core/models.py:807
msgid "Email domain this application can act on behalf of." msgid "Email domain this application can act on behalf of."
msgstr "E-Mail-Domain, im Namen der diese Anwendung handeln kann." msgstr "E-Mail-Domain, im Namen der diese Anwendung handeln kann."
#: core/models.py:821 #: core/models.py:819
msgid "Application domain" msgid "Application domain"
msgstr "Anwendungsdomain" msgstr "Anwendungsdomain"
#: core/models.py:822 #: core/models.py:820
msgid "Application domains" msgid "Application domains"
msgstr "Anwendungsdomains" msgstr "Anwendungsdomains"
#: core/models.py:840 #: core/models.py:838
msgid "Pending" msgid "Pending"
msgstr "Ausstehend" msgstr "Ausstehend"
#: core/models.py:848 #: core/models.py:846
msgid "Ready" msgid "Ready"
msgstr "Bereit" msgstr "Bereit"
#: core/models.py:854 #: core/models.py:852
msgid "Background image" msgid "Background image"
msgstr "Hintergrundbild" msgstr "Hintergrundbild"
#: core/models.py:866 #: core/models.py:864
msgid "title" msgid "title"
msgstr "Titel" msgstr "Titel"
@@ -464,11 +445,11 @@ msgstr "Datei"
msgid "Files" msgid "Files"
msgstr "Dateien" msgstr "Dateien"
#: core/models.py:1000 #: core/models.py:970
msgid "This file is already hard deleted." msgid "This file is already hard deleted."
msgstr "Diese Datei wurde bereits endgültig gelöscht." msgstr "Diese Datei wurde bereits endgültig gelöscht."
#: core/models.py:1010 #: core/models.py:980
#, fuzzy #, fuzzy
#| msgid "To hard delete a file, it must first be soft deleted." #| msgid "To hard delete a file, it must first be soft deleted."
msgid "To hard delete a file, it must first be soft deleted." msgid "To hard delete a file, it must first be soft deleted."
@@ -604,18 +585,18 @@ msgstr ""
" Wenn Sie Fragen haben oder Unterstützung benötigen, wenden Sie sich bitte " " Wenn Sie Fragen haben oder Unterstützung benötigen, wenden Sie sich bitte "
"an unser Support-Team unter %(support_email)s. " "an unser Support-Team unter %(support_email)s. "
#: meet/settings.py:223 #: meet/settings.py:224
msgid "English" msgid "English"
msgstr "Englisch" msgstr "Englisch"
#: meet/settings.py:224 #: meet/settings.py:225
msgid "French" msgid "French"
msgstr "Französisch" msgstr "Französisch"
#: meet/settings.py:225 #: meet/settings.py:226
msgid "Dutch" msgid "Dutch"
msgstr "Niederländisch" msgstr "Niederländisch"
#: meet/settings.py:226 #: meet/settings.py:227
msgid "German" msgid "German"
msgstr "Deutsch" msgstr "Deutsch"
Binary file not shown.
+96 -115
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-12 13:46+0000\n" "POT-Creation-Date: 2026-02-26 17:26+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -29,11 +29,11 @@ msgstr "Permissions"
msgid "Important dates" msgid "Important dates"
msgstr "Important dates" msgstr "Important dates"
#: core/admin.py:132 core/admin.py:275 #: core/admin.py:132 core/admin.py:243
msgid "No owner" msgid "No owner"
msgstr "No owner" msgstr "No owner"
#: core/admin.py:135 core/admin.py:278 #: core/admin.py:135 core/admin.py:246
msgid "Multiple owners" msgid "Multiple owners"
msgstr "Multiple owners" msgstr "Multiple owners"
@@ -61,134 +61,115 @@ msgstr "Successfully sent notifications for %(count)s recording(s)."
msgid "Skipped %(count)s expired recording(s)." msgid "Skipped %(count)s expired recording(s)."
msgstr "Skipped %(count)s expired recording(s)." msgstr "Skipped %(count)s expired recording(s)."
#: core/admin.py:200 #: core/admin.py:309
msgid "Mark selected recordings as 'Failed to Stop'"
msgstr "Mark selected recordings as 'Failed to Stop'"
#: core/admin.py:218
#, python-format
msgid "%(count)s recording(s) successfully marked as 'Failed to Stop'."
msgstr "%(count)s recording(s) successfully marked as 'Failed to Stop'."
#: core/admin.py:226
#, fuzzy, python-format
#| msgid "Skipped %(count)s expired recording(s)."
msgid "Skipped %(count)s recording(s) with an ineligible status."
msgstr "Skipped %(count)s expired recording(s)."
#: core/admin.py:342
msgid "No scopes" msgid "No scopes"
msgstr "No scopes" msgstr "No scopes"
#: core/admin.py:344 #: core/admin.py:311
msgid "Scopes" msgid "Scopes"
msgstr "Scopes" msgstr "Scopes"
#: core/api/filters.py:25 #: core/api/filters.py:24
msgid "Creator is me" msgid "Creator is me"
msgstr "Creator is me" msgstr "Creator is me"
#: core/api/serializers.py:88 #: core/api/serializers.py:84
msgid "You must be administrator or owner of a room to add accesses to it." msgid "You must be administrator or owner of a room to add accesses to it."
msgstr "You must be administrator or owner of a room to add accesses to it." msgstr "You must be administrator or owner of a room to add accesses to it."
#: core/api/serializers.py:516 #: core/api/serializers.py:443
msgid "This file extension is not allowed." msgid "This file extension is not allowed."
msgstr "This file extension is not allowed." msgstr "This file extension is not allowed."
#: core/api/serializers.py:533 #: core/models.py:35
msgid "You have reached the maximum number of files for this type."
msgstr "You have reached the maximum number of files for this type."
#: core/models.py:37
msgid "Member" msgid "Member"
msgstr "Member" msgstr "Member"
#: core/models.py:38 #: core/models.py:36
msgid "Administrator" msgid "Administrator"
msgstr "Administrator" msgstr "Administrator"
#: core/models.py:39 #: core/models.py:37
msgid "Owner" msgid "Owner"
msgstr "Owner" msgstr "Owner"
#: core/models.py:55 #: core/models.py:53
msgid "Initiated" msgid "Initiated"
msgstr "Initiated" msgstr "Initiated"
#: core/models.py:56 #: core/models.py:54
msgid "Active" msgid "Active"
msgstr "Active" msgstr "Active"
#: core/models.py:57 #: core/models.py:55
msgid "Stopped" msgid "Stopped"
msgstr "Stopped" msgstr "Stopped"
#: core/models.py:58 #: core/models.py:56
msgid "Saved" msgid "Saved"
msgstr "Saved" msgstr "Saved"
#: core/models.py:59 #: core/models.py:57
msgid "Aborted" msgid "Aborted"
msgstr "Aborted" msgstr "Aborted"
#: core/models.py:60 #: core/models.py:58
msgid "Failed to Start" msgid "Failed to Start"
msgstr "Failed to Start" msgstr "Failed to Start"
#: core/models.py:61 #: core/models.py:59
msgid "Failed to Stop" msgid "Failed to Stop"
msgstr "Failed to Stop" msgstr "Failed to Stop"
#: core/models.py:62 #: core/models.py:60
msgid "Notification succeeded" msgid "Notification succeeded"
msgstr "Notification succeeded" msgstr "Notification succeeded"
#: core/models.py:89 #: core/models.py:87
msgid "SCREEN_RECORDING" msgid "SCREEN_RECORDING"
msgstr "SCREEN_RECORDING" msgstr "SCREEN_RECORDING"
#: core/models.py:90 #: core/models.py:88
msgid "TRANSCRIPT" msgid "TRANSCRIPT"
msgstr "TRANSCRIPT" msgstr "TRANSCRIPT"
#: core/models.py:96 #: core/models.py:94
msgid "Public Access" msgid "Public Access"
msgstr "Public Access" msgstr "Public Access"
#: core/models.py:97 #: core/models.py:95
msgid "Trusted Access" msgid "Trusted Access"
msgstr "Trusted Access" msgstr "Trusted Access"
#: core/models.py:98 #: core/models.py:96
msgid "Restricted Access" msgid "Restricted Access"
msgstr "Restricted Access" msgstr "Restricted Access"
#: core/models.py:110 #: core/models.py:108
msgid "id" msgid "id"
msgstr "id" msgstr "id"
#: core/models.py:111 #: core/models.py:109
msgid "primary key for the record as UUID" msgid "primary key for the record as UUID"
msgstr "primary key for the record as UUID" msgstr "primary key for the record as UUID"
#: core/models.py:117 #: core/models.py:115
msgid "created on" msgid "created on"
msgstr "created on" msgstr "created on"
#: core/models.py:118 #: core/models.py:116
msgid "date and time at which a record was created" msgid "date and time at which a record was created"
msgstr "date and time at which a record was created" msgstr "date and time at which a record was created"
#: core/models.py:123 #: core/models.py:121
msgid "updated on" msgid "updated on"
msgstr "updated on" msgstr "updated on"
#: core/models.py:124 #: core/models.py:122
msgid "date and time at which a record was last updated" msgid "date and time at which a record was last updated"
msgstr "date and time at which a record was last updated" msgstr "date and time at which a record was last updated"
#: core/models.py:144 #: core/models.py:142
msgid "" msgid ""
"Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/" "Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/"
"_ characters." "_ characters."
@@ -196,11 +177,11 @@ msgstr ""
"Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/" "Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/"
"_ characters." "_ characters."
#: core/models.py:150 #: core/models.py:148
msgid "sub" msgid "sub"
msgstr "sub" msgstr "sub"
#: core/models.py:152 #: core/models.py:150
msgid "" msgid ""
"Optional for pending users; required upon account activation. 255 characters " "Optional for pending users; required upon account activation. 255 characters "
"or fewer. Letters, numbers, and @/./+/-/_ characters only." "or fewer. Letters, numbers, and @/./+/-/_ characters only."
@@ -208,55 +189,55 @@ msgstr ""
"Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_ " "Required. 255 characters or fewer. Letters, numbers, and @/./+/-/_ "
"characters only." "characters only."
#: core/models.py:161 #: core/models.py:159
msgid "identity email address" msgid "identity email address"
msgstr "identity email address" msgstr "identity email address"
#: core/models.py:166 #: core/models.py:164
msgid "admin email address" msgid "admin email address"
msgstr "admin email address" msgstr "admin email address"
#: core/models.py:168 #: core/models.py:166
msgid "full name" msgid "full name"
msgstr "full name" msgstr "full name"
#: core/models.py:170 #: core/models.py:168
msgid "short name" msgid "short name"
msgstr "short name" msgstr "short name"
#: core/models.py:176 #: core/models.py:174
msgid "language" msgid "language"
msgstr "language" msgstr "language"
#: core/models.py:177 #: core/models.py:175
msgid "The language in which the user wants to see the interface." msgid "The language in which the user wants to see the interface."
msgstr "The language in which the user wants to see the interface." msgstr "The language in which the user wants to see the interface."
#: core/models.py:183 #: core/models.py:181
msgid "The timezone in which the user wants to see times." msgid "The timezone in which the user wants to see times."
msgstr "The timezone in which the user wants to see times." msgstr "The timezone in which the user wants to see times."
#: core/models.py:186 #: core/models.py:184
msgid "device" msgid "device"
msgstr "device" msgstr "device"
#: core/models.py:188 #: core/models.py:186
msgid "Whether the user is a device or a real user." msgid "Whether the user is a device or a real user."
msgstr "Whether the user is a device or a real user." msgstr "Whether the user is a device or a real user."
#: core/models.py:191 #: core/models.py:189
msgid "staff status" msgid "staff status"
msgstr "staff status" msgstr "staff status"
#: core/models.py:193 #: core/models.py:191
msgid "Whether the user can log into this admin site." msgid "Whether the user can log into this admin site."
msgstr "Whether the user can log into this admin site." msgstr "Whether the user can log into this admin site."
#: core/models.py:196 #: core/models.py:194
msgid "active" msgid "active"
msgstr "active" msgstr "active"
#: core/models.py:199 #: core/models.py:197
msgid "" msgid ""
"Whether this user should be treated as active. Unselect this instead of " "Whether this user should be treated as active. Unselect this instead of "
"deleting accounts." "deleting accounts."
@@ -264,63 +245,63 @@ msgstr ""
"Whether this user should be treated as active. Unselect this instead of " "Whether this user should be treated as active. Unselect this instead of "
"deleting accounts." "deleting accounts."
#: core/models.py:212 #: core/models.py:210
msgid "user" msgid "user"
msgstr "user" msgstr "user"
#: core/models.py:213 #: core/models.py:211
msgid "users" msgid "users"
msgstr "users" msgstr "users"
#: core/models.py:272 #: core/models.py:270
msgid "Resource" msgid "Resource"
msgstr "Resource" msgstr "Resource"
#: core/models.py:273 #: core/models.py:271
msgid "Resources" msgid "Resources"
msgstr "Resources" msgstr "Resources"
#: core/models.py:331 #: core/models.py:329
msgid "Resource access" msgid "Resource access"
msgstr "Resource access" msgstr "Resource access"
#: core/models.py:332 #: core/models.py:330
msgid "Resource accesses" msgid "Resource accesses"
msgstr "Resource accesses" msgstr "Resource accesses"
#: core/models.py:338 #: core/models.py:336
msgid "Resource access with this User and Resource already exists." msgid "Resource access with this User and Resource already exists."
msgstr "Resource access with this User and Resource already exists." msgstr "Resource access with this User and Resource already exists."
#: core/models.py:394 #: core/models.py:392
msgid "Visio room configuration" msgid "Visio room configuration"
msgstr "Visio room configuration" msgstr "Visio room configuration"
#: core/models.py:395 #: core/models.py:393
msgid "Values for Visio parameters to configure the room." msgid "Values for Visio parameters to configure the room."
msgstr "Values for Visio parameters to configure the room." msgstr "Values for Visio parameters to configure the room."
#: core/models.py:402 #: core/models.py:400
msgid "Room PIN code" msgid "Room PIN code"
msgstr "Room PIN code" msgstr "Room PIN code"
#: core/models.py:403 #: core/models.py:401
msgid "Unique n-digit code that identifies this room in telephony mode." msgid "Unique n-digit code that identifies this room in telephony mode."
msgstr "Unique n-digit code that identifies this room in telephony mode." msgstr "Unique n-digit code that identifies this room in telephony mode."
#: core/models.py:409 core/models.py:563 #: core/models.py:407 core/models.py:561
msgid "Room" msgid "Room"
msgstr "Room" msgstr "Room"
#: core/models.py:410 #: core/models.py:408
msgid "Rooms" msgid "Rooms"
msgstr "Rooms" msgstr "Rooms"
#: core/models.py:574 #: core/models.py:572
msgid "Worker ID" msgid "Worker ID"
msgstr "Worker ID" msgstr "Worker ID"
#: core/models.py:576 #: core/models.py:574
msgid "" msgid ""
"Enter an identifier for the worker recording.This ID is retained even when " "Enter an identifier for the worker recording.This ID is retained even when "
"the worker stops, allowing for easy tracking." "the worker stops, allowing for easy tracking."
@@ -328,125 +309,125 @@ msgstr ""
"Enter an identifier for the worker recording.This ID is retained even when " "Enter an identifier for the worker recording.This ID is retained even when "
"the worker stops, allowing for easy tracking." "the worker stops, allowing for easy tracking."
#: core/models.py:584 #: core/models.py:582
msgid "Recording mode" msgid "Recording mode"
msgstr "Recording mode" msgstr "Recording mode"
#: core/models.py:585 #: core/models.py:583
msgid "Defines the mode of recording being called." msgid "Defines the mode of recording being called."
msgstr "Defines the mode of recording being called." msgstr "Defines the mode of recording being called."
#: core/models.py:590 core/models.py:591 #: core/models.py:588 core/models.py:589
msgid "Recording options" msgid "Recording options"
msgstr "Recording options" msgstr "Recording options"
#: core/models.py:597 #: core/models.py:595
msgid "Recording" msgid "Recording"
msgstr "Recording" msgstr "Recording"
#: core/models.py:598 #: core/models.py:596
msgid "Recordings" msgid "Recordings"
msgstr "Recordings" msgstr "Recordings"
#: core/models.py:706 #: core/models.py:704
msgid "Recording/user relation" msgid "Recording/user relation"
msgstr "Recording/user relation" msgstr "Recording/user relation"
#: core/models.py:707 #: core/models.py:705
msgid "Recording/user relations" msgid "Recording/user relations"
msgstr "Recording/user relations" msgstr "Recording/user relations"
#: core/models.py:713 #: core/models.py:711
msgid "This user is already in this recording." msgid "This user is already in this recording."
msgstr "This user is already in this recording." msgstr "This user is already in this recording."
#: core/models.py:719 #: core/models.py:717
msgid "This team is already in this recording." msgid "This team is already in this recording."
msgstr "This team is already in this recording." msgstr "This team is already in this recording."
#: core/models.py:725 #: core/models.py:723
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "Either user or team must be set, not both." msgstr "Either user or team must be set, not both."
#: core/models.py:742 #: core/models.py:740
#, fuzzy #, fuzzy
#| msgid "created on" #| msgid "created on"
msgid "Create rooms" msgid "Create rooms"
msgstr "Create rooms" msgstr "Create rooms"
#: core/models.py:743 #: core/models.py:741
msgid "List rooms" msgid "List rooms"
msgstr "List rooms" msgstr "List rooms"
#: core/models.py:744 #: core/models.py:742
msgid "Retrieve room details" msgid "Retrieve room details"
msgstr "Retrieve room details" msgstr "Retrieve room details"
#: core/models.py:745 #: core/models.py:743
#, fuzzy #, fuzzy
#| msgid "updated on" #| msgid "updated on"
msgid "Update rooms" msgid "Update rooms"
msgstr "Update rooms" msgstr "Update rooms"
#: core/models.py:746 #: core/models.py:744
msgid "Delete rooms" msgid "Delete rooms"
msgstr "Delete rooms" msgstr "Delete rooms"
#: core/models.py:759 #: core/models.py:757
msgid "Application name" msgid "Application name"
msgstr "Application name" msgstr "Application name"
#: core/models.py:760 #: core/models.py:758
msgid "Descriptive name for this application." msgid "Descriptive name for this application."
msgstr "Descriptive name for this application." msgstr "Descriptive name for this application."
#: core/models.py:770 #: core/models.py:768
msgid "Hashed on Save. Copy it now if this is a new secret." msgid "Hashed on Save. Copy it now if this is a new secret."
msgstr "Hashed on Save. Copy it now if this is a new secret." msgstr "Hashed on Save. Copy it now if this is a new secret."
#: core/models.py:781 #: core/models.py:779
msgid "Application" msgid "Application"
msgstr "Application" msgstr "Application"
#: core/models.py:782 #: core/models.py:780
msgid "Applications" msgid "Applications"
msgstr "Applications" msgstr "Applications"
#: core/models.py:805 #: core/models.py:803
msgid "Enter a valid domain" msgid "Enter a valid domain"
msgstr "Enter a valid domain" msgstr "Enter a valid domain"
#: core/models.py:808 #: core/models.py:806
msgid "Domain" msgid "Domain"
msgstr "Domain" msgstr "Domain"
#: core/models.py:809 #: core/models.py:807
msgid "Email domain this application can act on behalf of." msgid "Email domain this application can act on behalf of."
msgstr "Email domain this application can act on behalf of." msgstr "Email domain this application can act on behalf of."
#: core/models.py:821 #: core/models.py:819
msgid "Application domain" msgid "Application domain"
msgstr "Application domain" msgstr "Application domain"
#: core/models.py:822 #: core/models.py:820
msgid "Application domains" msgid "Application domains"
msgstr "Application domains" msgstr "Application domains"
#: core/models.py:840 #: core/models.py:838
#, fuzzy #, fuzzy
#| msgid "Recording" #| msgid "Recording"
msgid "Pending" msgid "Pending"
msgstr "Pending" msgstr "Pending"
#: core/models.py:848 #: core/models.py:846
msgid "Ready" msgid "Ready"
msgstr "Ready" msgstr "Ready"
#: core/models.py:854 #: core/models.py:852
msgid "Background image" msgid "Background image"
msgstr "Background image" msgstr "Background image"
#: core/models.py:866 #: core/models.py:864
msgid "title" msgid "title"
msgstr "title" msgstr "title"
@@ -462,13 +443,13 @@ msgstr "File"
msgid "Files" msgid "Files"
msgstr "Files" msgstr "Files"
#: core/models.py:1000 #: core/models.py:970
#, fuzzy #, fuzzy
#| msgid "This user is already in this recording." #| msgid "This user is already in this recording."
msgid "This file is already hard deleted." msgid "This file is already hard deleted."
msgstr "This file is already hard deleted." msgstr "This file is already hard deleted."
#: core/models.py:1010 #: core/models.py:980
msgid "To hard delete a file, it must first be soft deleted." msgid "To hard delete a file, it must first be soft deleted."
msgstr "To hard delete a file, it must first be soft deleted." msgstr "To hard delete a file, it must first be soft deleted."
@@ -600,18 +581,18 @@ msgstr ""
" If you have any questions or need assistance, please contact our support " " If you have any questions or need assistance, please contact our support "
"team at %(support_email)s. " "team at %(support_email)s. "
#: meet/settings.py:223 #: meet/settings.py:224
msgid "English" msgid "English"
msgstr "English" msgstr "English"
#: meet/settings.py:224 #: meet/settings.py:225
msgid "French" msgid "French"
msgstr "French" msgstr "French"
#: meet/settings.py:225 #: meet/settings.py:226
msgid "Dutch" msgid "Dutch"
msgstr "Dutch" msgstr "Dutch"
#: meet/settings.py:226 #: meet/settings.py:227
msgid "German" msgid "German"
msgstr "German" msgstr "German"
Binary file not shown.
+98 -121
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-12 13:46+0000\n" "POT-Creation-Date: 2026-02-26 17:26+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: antoine.lebaud@mail.numerique.gouv.fr\n" "Last-Translator: antoine.lebaud@mail.numerique.gouv.fr\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -29,11 +29,11 @@ msgstr "Permissions"
msgid "Important dates" msgid "Important dates"
msgstr "Dates importantes" msgstr "Dates importantes"
#: core/admin.py:132 core/admin.py:275 #: core/admin.py:132 core/admin.py:243
msgid "No owner" msgid "No owner"
msgstr "Pas de propriétaire" msgstr "Pas de propriétaire"
#: core/admin.py:135 core/admin.py:278 #: core/admin.py:135 core/admin.py:246
msgid "Multiple owners" msgid "Multiple owners"
msgstr "Plusieurs propriétaires" msgstr "Plusieurs propriétaires"
@@ -61,139 +61,119 @@ msgstr "Notifications envoyées avec succès pour %(count)s enregistrement(s)."
msgid "Skipped %(count)s expired recording(s)." msgid "Skipped %(count)s expired recording(s)."
msgstr "%(count)s enregistrement(s) expiré(s) ignoré(s)." msgstr "%(count)s enregistrement(s) expiré(s) ignoré(s)."
#: core/admin.py:200 #: core/admin.py:309
msgid "Mark selected recordings as 'Failed to Stop'"
msgstr "Marquer les enregistrements sélectionnés comme « Échec darrêt »"
#: core/admin.py:218
#, python-format
msgid "%(count)s recording(s) successfully marked as 'Failed to Stop'."
msgstr ""
"%(count)s enregistrement(s) marqué(s) avec succès comme « Échec darrêt »."
#: core/admin.py:226
#, fuzzy, python-format
#| msgid "Skipped %(count)s expired recording(s)."
msgid "Skipped %(count)s recording(s) with an ineligible status."
msgstr "%(count)s enregistrement(s) avec un statut inéligible ignoré(s)."
#: core/admin.py:342
msgid "No scopes" msgid "No scopes"
msgstr "Aucun scopes" msgstr "Aucun scopes"
#: core/admin.py:344 #: core/admin.py:311
msgid "Scopes" msgid "Scopes"
msgstr "Scopes" msgstr "Scopes"
#: core/api/filters.py:25 #: core/api/filters.py:24
msgid "Creator is me" msgid "Creator is me"
msgstr "Je suis le créateur" msgstr "Je suis le créateur"
#: core/api/serializers.py:88 #: core/api/serializers.py:84
msgid "You must be administrator or owner of a room to add accesses to it." msgid "You must be administrator or owner of a room to add accesses to it."
msgstr "" msgstr ""
"Vous devez être administrateur ou propriétaire d'une salle pour y ajouter " "Vous devez être administrateur ou propriétaire d'une salle pour y ajouter "
"des accès." "des accès."
#: core/api/serializers.py:516 #: core/api/serializers.py:443
msgid "This file extension is not allowed." msgid "This file extension is not allowed."
msgstr "Cette extension n'est pas autorisée" msgstr "Cette extension n'est pas autorisée"
#: core/api/serializers.py:533 #: core/models.py:35
msgid "You have reached the maximum number of files for this type."
msgstr "Vous avez atteint le nombre maximum de fichiers de ce type"
#: core/models.py:37
msgid "Member" msgid "Member"
msgstr "Membre" msgstr "Membre"
#: core/models.py:38 #: core/models.py:36
msgid "Administrator" msgid "Administrator"
msgstr "Administrateur" msgstr "Administrateur"
#: core/models.py:39 #: core/models.py:37
msgid "Owner" msgid "Owner"
msgstr "Propriétaire" msgstr "Propriétaire"
#: core/models.py:55 #: core/models.py:53
msgid "Initiated" msgid "Initiated"
msgstr "Initié" msgstr "Initié"
#: core/models.py:56 #: core/models.py:54
msgid "Active" msgid "Active"
msgstr "Actif" msgstr "Actif"
#: core/models.py:57 #: core/models.py:55
msgid "Stopped" msgid "Stopped"
msgstr "Arrêté" msgstr "Arrêté"
#: core/models.py:58 #: core/models.py:56
msgid "Saved" msgid "Saved"
msgstr "Enregistré" msgstr "Enregistré"
#: core/models.py:59 #: core/models.py:57
msgid "Aborted" msgid "Aborted"
msgstr "Abandonné" msgstr "Abandonné"
#: core/models.py:60 #: core/models.py:58
msgid "Failed to Start" msgid "Failed to Start"
msgstr "Échec au démarrage" msgstr "Échec au démarrage"
#: core/models.py:61 #: core/models.py:59
msgid "Failed to Stop" msgid "Failed to Stop"
msgstr "Échec à l'arrêt" msgstr "Échec à l'arrêt"
#: core/models.py:62 #: core/models.py:60
msgid "Notification succeeded" msgid "Notification succeeded"
msgstr "Notification réussie" msgstr "Notification réussie"
#: core/models.py:89 #: core/models.py:87
msgid "SCREEN_RECORDING" msgid "SCREEN_RECORDING"
msgstr "ENREGISTREMENT_ÉCRAN" msgstr "ENREGISTREMENT_ÉCRAN"
#: core/models.py:90 #: core/models.py:88
msgid "TRANSCRIPT" msgid "TRANSCRIPT"
msgstr "TRANSCRIPTION" msgstr "TRANSCRIPTION"
#: core/models.py:96 #: core/models.py:94
msgid "Public Access" msgid "Public Access"
msgstr "Accès public" msgstr "Accès public"
#: core/models.py:97 #: core/models.py:95
msgid "Trusted Access" msgid "Trusted Access"
msgstr "Accès de confiance" msgstr "Accès de confiance"
#: core/models.py:98 #: core/models.py:96
msgid "Restricted Access" msgid "Restricted Access"
msgstr "Accès restreint" msgstr "Accès restreint"
#: core/models.py:110 #: core/models.py:108
msgid "id" msgid "id"
msgstr "id" msgstr "id"
#: core/models.py:111 #: core/models.py:109
msgid "primary key for the record as UUID" msgid "primary key for the record as UUID"
msgstr "clé primaire pour l'enregistrement sous forme d'UUID" msgstr "clé primaire pour l'enregistrement sous forme d'UUID"
#: core/models.py:117 #: core/models.py:115
msgid "created on" msgid "created on"
msgstr "créé le" msgstr "créé le"
#: core/models.py:118 #: core/models.py:116
msgid "date and time at which a record was created" msgid "date and time at which a record was created"
msgstr "date et heure auxquelles un enregistrement a été créé" msgstr "date et heure auxquelles un enregistrement a été créé"
#: core/models.py:123 #: core/models.py:121
msgid "updated on" msgid "updated on"
msgstr "mis à jour le" msgstr "mis à jour le"
#: core/models.py:124 #: core/models.py:122
msgid "date and time at which a record was last updated" msgid "date and time at which a record was last updated"
msgstr "" msgstr ""
"date et heure auxquelles un enregistrement a été mis à jour pour la dernière " "date et heure auxquelles un enregistrement a été mis à jour pour la dernière "
"fois" "fois"
#: core/models.py:144 #: core/models.py:142
msgid "" msgid ""
"Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/" "Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/"
"_ characters." "_ characters."
@@ -201,11 +181,11 @@ msgstr ""
"Entrez un sub valide. Cette valeur ne peut contenir que des lettres, des " "Entrez un sub valide. Cette valeur ne peut contenir que des lettres, des "
"chiffres et les caractères @/./+/-/_." "chiffres et les caractères @/./+/-/_."
#: core/models.py:150 #: core/models.py:148
msgid "sub" msgid "sub"
msgstr "sub" msgstr "sub"
#: core/models.py:152 #: core/models.py:150
msgid "" msgid ""
"Optional for pending users; required upon account activation. 255 characters " "Optional for pending users; required upon account activation. 255 characters "
"or fewer. Letters, numbers, and @/./+/-/_ characters only." "or fewer. Letters, numbers, and @/./+/-/_ characters only."
@@ -213,55 +193,55 @@ msgstr ""
"Optionnel pour les utilisateurs en attente ; requis lors de l'activation du " "Optionnel pour les utilisateurs en attente ; requis lors de l'activation du "
"compte. 255 caractères maximum. Lettres, chiffres et @/./+/-/_ uniquement." "compte. 255 caractères maximum. Lettres, chiffres et @/./+/-/_ uniquement."
#: core/models.py:161 #: core/models.py:159
msgid "identity email address" msgid "identity email address"
msgstr "adresse e-mail d'identité" msgstr "adresse e-mail d'identité"
#: core/models.py:166 #: core/models.py:164
msgid "admin email address" msgid "admin email address"
msgstr "adresse e-mail d'administrateur" msgstr "adresse e-mail d'administrateur"
#: core/models.py:168 #: core/models.py:166
msgid "full name" msgid "full name"
msgstr "nom complet" msgstr "nom complet"
#: core/models.py:170 #: core/models.py:168
msgid "short name" msgid "short name"
msgstr "nom court" msgstr "nom court"
#: core/models.py:176 #: core/models.py:174
msgid "language" msgid "language"
msgstr "langue" msgstr "langue"
#: core/models.py:177 #: core/models.py:175
msgid "The language in which the user wants to see the interface." msgid "The language in which the user wants to see the interface."
msgstr "La langue dans laquelle l'utilisateur souhaite voir l'interface." msgstr "La langue dans laquelle l'utilisateur souhaite voir l'interface."
#: core/models.py:183 #: core/models.py:181
msgid "The timezone in which the user wants to see times." msgid "The timezone in which the user wants to see times."
msgstr "Le fuseau horaire dans lequel l'utilisateur souhaite voir les heures." msgstr "Le fuseau horaire dans lequel l'utilisateur souhaite voir les heures."
#: core/models.py:186 #: core/models.py:184
msgid "device" msgid "device"
msgstr "appareil" msgstr "appareil"
#: core/models.py:188 #: core/models.py:186
msgid "Whether the user is a device or a real user." msgid "Whether the user is a device or a real user."
msgstr "Si l'utilisateur est un appareil ou un utilisateur réel." msgstr "Si l'utilisateur est un appareil ou un utilisateur réel."
#: core/models.py:191 #: core/models.py:189
msgid "staff status" msgid "staff status"
msgstr "statut du personnel" msgstr "statut du personnel"
#: core/models.py:193 #: core/models.py:191
msgid "Whether the user can log into this admin site." msgid "Whether the user can log into this admin site."
msgstr "Si l'utilisateur peut se connecter à ce site d'administration." msgstr "Si l'utilisateur peut se connecter à ce site d'administration."
#: core/models.py:196 #: core/models.py:194
msgid "active" msgid "active"
msgstr "actif" msgstr "actif"
#: core/models.py:199 #: core/models.py:197
msgid "" msgid ""
"Whether this user should be treated as active. Unselect this instead of " "Whether this user should be treated as active. Unselect this instead of "
"deleting accounts." "deleting accounts."
@@ -269,65 +249,65 @@ msgstr ""
"Si cet utilisateur doit être traité comme actif. Désélectionnez cette option " "Si cet utilisateur doit être traité comme actif. Désélectionnez cette option "
"au lieu de supprimer des comptes." "au lieu de supprimer des comptes."
#: core/models.py:212 #: core/models.py:210
msgid "user" msgid "user"
msgstr "utilisateur" msgstr "utilisateur"
#: core/models.py:213 #: core/models.py:211
msgid "users" msgid "users"
msgstr "utilisateurs" msgstr "utilisateurs"
#: core/models.py:272 #: core/models.py:270
msgid "Resource" msgid "Resource"
msgstr "Ressource" msgstr "Ressource"
#: core/models.py:273 #: core/models.py:271
msgid "Resources" msgid "Resources"
msgstr "Ressources" msgstr "Ressources"
#: core/models.py:331 #: core/models.py:329
msgid "Resource access" msgid "Resource access"
msgstr "Accès aux ressources" msgstr "Accès aux ressources"
#: core/models.py:332 #: core/models.py:330
msgid "Resource accesses" msgid "Resource accesses"
msgstr "Accès aux ressources" msgstr "Accès aux ressources"
#: core/models.py:338 #: core/models.py:336
msgid "Resource access with this User and Resource already exists." msgid "Resource access with this User and Resource already exists."
msgstr "" msgstr ""
"L'accès à la ressource avec cet utilisateur et cette ressource existe déjà." "L'accès à la ressource avec cet utilisateur et cette ressource existe déjà."
#: core/models.py:394 #: core/models.py:392
msgid "Visio room configuration" msgid "Visio room configuration"
msgstr "Configuration de la salle de visioconférence" msgstr "Configuration de la salle de visioconférence"
#: core/models.py:395 #: core/models.py:393
msgid "Values for Visio parameters to configure the room." msgid "Values for Visio parameters to configure the room."
msgstr "Valeurs des paramètres de visioconférence pour configurer la salle." msgstr "Valeurs des paramètres de visioconférence pour configurer la salle."
#: core/models.py:402 #: core/models.py:400
msgid "Room PIN code" msgid "Room PIN code"
msgstr "Code PIN de la salle" msgstr "Code PIN de la salle"
#: core/models.py:403 #: core/models.py:401
msgid "Unique n-digit code that identifies this room in telephony mode." msgid "Unique n-digit code that identifies this room in telephony mode."
msgstr "" msgstr ""
"Code unique à n chiffres qui identifie cette salle en mode téléphonique." "Code unique à n chiffres qui identifie cette salle en mode téléphonique."
#: core/models.py:409 core/models.py:563 #: core/models.py:407 core/models.py:561
msgid "Room" msgid "Room"
msgstr "Salle" msgstr "Salle"
#: core/models.py:410 #: core/models.py:408
msgid "Rooms" msgid "Rooms"
msgstr "Salles" msgstr "Salles"
#: core/models.py:574 #: core/models.py:572
msgid "Worker ID" msgid "Worker ID"
msgstr "ID du Worker" msgstr "ID du Worker"
#: core/models.py:576 #: core/models.py:574
msgid "" msgid ""
"Enter an identifier for the worker recording.This ID is retained even when " "Enter an identifier for the worker recording.This ID is retained even when "
"the worker stops, allowing for easy tracking." "the worker stops, allowing for easy tracking."
@@ -335,128 +315,127 @@ msgstr ""
"Entrez un identifiant pour l'enregistrement du Worker. Cet identifiant est " "Entrez un identifiant pour l'enregistrement du Worker. Cet identifiant est "
"conservé même lorsque le Worker s'arrête, permettant un suivi facile." "conservé même lorsque le Worker s'arrête, permettant un suivi facile."
#: core/models.py:584 #: core/models.py:582
msgid "Recording mode" msgid "Recording mode"
msgstr "Mode d'enregistrement" msgstr "Mode d'enregistrement"
#: core/models.py:585 #: core/models.py:583
msgid "Defines the mode of recording being called." msgid "Defines the mode of recording being called."
msgstr "Définit le mode d'enregistrement appelé." msgstr "Définit le mode d'enregistrement appelé."
#: core/models.py:590 core/models.py:591 #: core/models.py:588 core/models.py:589
msgid "Recording options" msgid "Recording options"
msgstr "Options d'enregistrement" msgstr "Options d'enregistrement"
#: core/models.py:597 #: core/models.py:595
msgid "Recording" msgid "Recording"
msgstr "Enregistrement" msgstr "Enregistrement"
#: core/models.py:598 #: core/models.py:596
msgid "Recordings" msgid "Recordings"
msgstr "Enregistrements" msgstr "Enregistrements"
#: core/models.py:706 #: core/models.py:704
msgid "Recording/user relation" msgid "Recording/user relation"
msgstr "Relation enregistrement/utilisateur" msgstr "Relation enregistrement/utilisateur"
#: core/models.py:707 #: core/models.py:705
msgid "Recording/user relations" msgid "Recording/user relations"
msgstr "Relations enregistrement/utilisateur" msgstr "Relations enregistrement/utilisateur"
#: core/models.py:713 #: core/models.py:711
msgid "This user is already in this recording." msgid "This user is already in this recording."
msgstr "Cet utilisateur est déjà dans cet enregistrement." msgstr "Cet utilisateur est déjà dans cet enregistrement."
#: core/models.py:719 #: core/models.py:717
msgid "This team is already in this recording." msgid "This team is already in this recording."
msgstr "Cette équipe est déjà dans cet enregistrement." msgstr "Cette équipe est déjà dans cet enregistrement."
#: core/models.py:725 #: core/models.py:723
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "Soit l'utilisateur, soit l'équipe doit être défini, pas les deux." msgstr "Soit l'utilisateur, soit l'équipe doit être défini, pas les deux."
#: core/models.py:742 #: core/models.py:740
msgid "Create rooms" msgid "Create rooms"
msgstr "Créer des salles" msgstr "Créer des salles"
#: core/models.py:743 #: core/models.py:741
msgid "List rooms" msgid "List rooms"
msgstr "Lister les salles" msgstr "Lister les salles"
#: core/models.py:744 #: core/models.py:742
msgid "Retrieve room details" msgid "Retrieve room details"
msgstr "Afficher les détails dune salle" msgstr "Afficher les détails dune salle"
#: core/models.py:745 #: core/models.py:743
msgid "Update rooms" msgid "Update rooms"
msgstr "Mettre à jour les salles" msgstr "Mettre à jour les salles"
#: core/models.py:746 #: core/models.py:744
msgid "Delete rooms" msgid "Delete rooms"
msgstr "Supprimer les salles" msgstr "Supprimer les salles"
#: core/models.py:759 #: core/models.py:757
msgid "Application name" msgid "Application name"
msgstr "Nom de lapplication" msgstr "Nom de lapplication"
#: core/models.py:760 #: core/models.py:758
msgid "Descriptive name for this application." msgid "Descriptive name for this application."
msgstr "Nom descriptif de cette application." msgstr "Nom descriptif de cette application."
#: core/models.py:770 #: core/models.py:768
msgid "Hashed on Save. Copy it now if this is a new secret." msgid "Hashed on Save. Copy it now if this is a new secret."
msgstr "" msgstr ""
"Haché lors de lenregistrement. Copiez-le maintenant sil sagit dun " "Haché lors de lenregistrement. Copiez-le maintenant sil sagit dun "
"nouveau secret." "nouveau secret."
#: core/models.py:781 #: core/models.py:779
msgid "Application" msgid "Application"
msgstr "Application" msgstr "Application"
#: core/models.py:782 #: core/models.py:780
msgid "Applications" msgid "Applications"
msgstr "Applications" msgstr "Applications"
#: core/models.py:805 #: core/models.py:803
msgid "Enter a valid domain" msgid "Enter a valid domain"
msgstr "Saisissez un domaine valide" msgstr "Saisissez un domaine valide"
#: core/models.py:808 #: core/models.py:806
msgid "Domain" msgid "Domain"
msgstr "Domaine" msgstr "Domaine"
#: core/models.py:809 #: core/models.py:807
msgid "Email domain this application can act on behalf of." msgid "Email domain this application can act on behalf of."
msgstr "Domaine de messagerie au nom duquel cette application peut agir." msgstr "Domaine de messagerie au nom duquel cette application peut agir."
#: core/models.py:821 #: core/models.py:819
msgid "Application domain" msgid "Application domain"
msgstr "Domaine dapplication" msgstr "Domaine dapplication"
#: core/models.py:822 #: core/models.py:820
msgid "Application domains" msgid "Application domains"
msgstr "Domaines dapplication" msgstr "Domaines dapplication"
#: core/models.py:840 #: core/models.py:838
msgid "Pending" msgid "Pending"
msgstr "En attente" msgstr "En attente"
#: core/models.py:848 #: core/models.py:846
msgid "Ready" msgid "Ready"
msgstr "Prêt" msgstr "Prêt"
#: core/models.py:854 #: core/models.py:852
msgid "Background image" msgid "Background image"
msgstr "Image de fond" msgstr "Image de fond"
#: core/models.py:866 #: core/models.py:864
msgid "title" msgid "title"
msgstr "Titre" msgstr "Titre"
#: core/models.py:890 #: core/models.py:890
msgid "Malware detection info when the analysis status is unsafe." msgid "Malware detection info when the analysis status is unsafe."
msgstr "" msgstr "Information concernant la détection de Malware cand le statut n'est pas sain"
"Information concernant la détection de Malware cand le statut n'est pas sain"
#: core/models.py:895 #: core/models.py:895
msgid "File" msgid "File"
@@ -466,17 +445,15 @@ msgstr "Fichier"
msgid "Files" msgid "Files"
msgstr "Fichiers" msgstr "Fichiers"
#: core/models.py:1000 #: core/models.py:970
#, fuzzy #, fuzzy
#| msgid "This user is already in this recording." #| msgid "This user is already in this recording."
msgid "This file is already hard deleted." msgid "This file is already hard deleted."
msgstr "Ce fichier a été supprimé." msgstr "Ce fichier a été supprimé."
#: core/models.py:1010 #: core/models.py:980
msgid "To hard delete a file, it must first be soft deleted." msgid "To hard delete a file, it must first be soft deleted."
msgstr "" msgstr "Pour supprimer définitivement un fichier il doit d'abord avoir été marqué comme supprimé (soft delete)"
"Pour supprimer définitivement un fichier il doit d'abord avoir été marqué "
"comme supprimé (soft delete)"
#: core/recording/event/notification.py:116 #: core/recording/event/notification.py:116
msgid "Your recording is ready" msgid "Your recording is ready"
@@ -606,18 +583,18 @@ msgstr ""
" Si vous avez des questions ou besoin d'assistance, veuillez contacter notre " " Si vous avez des questions ou besoin d'assistance, veuillez contacter notre "
"équipe d'assistance à %(support_email)s. " "équipe d'assistance à %(support_email)s. "
#: meet/settings.py:223 #: meet/settings.py:224
msgid "English" msgid "English"
msgstr "Anglais" msgstr "Anglais"
#: meet/settings.py:224 #: meet/settings.py:225
msgid "French" msgid "French"
msgstr "Français" msgstr "Français"
#: meet/settings.py:225 #: meet/settings.py:226
msgid "Dutch" msgid "Dutch"
msgstr "Néerlandais" msgstr "Néerlandais"
#: meet/settings.py:226 #: meet/settings.py:227
msgid "German" msgid "German"
msgstr "Allemand" msgstr "Allemand"
Binary file not shown.
+96 -115
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-12 13:46+0000\n" "POT-Creation-Date: 2026-02-26 17:34+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -29,11 +29,11 @@ msgstr "Rechten"
msgid "Important dates" msgid "Important dates"
msgstr "Belangrijke datums" msgstr "Belangrijke datums"
#: core/admin.py:132 core/admin.py:275 #: core/admin.py:132 core/admin.py:243
msgid "No owner" msgid "No owner"
msgstr "Geen eigenaar" msgstr "Geen eigenaar"
#: core/admin.py:135 core/admin.py:278 #: core/admin.py:135 core/admin.py:246
msgid "Multiple owners" msgid "Multiple owners"
msgstr "Meerdere eigenaren" msgstr "Meerdere eigenaren"
@@ -61,135 +61,116 @@ msgstr "Meldingen succesvol verzonden voor %(count)s opname(n)."
msgid "Skipped %(count)s expired recording(s)." msgid "Skipped %(count)s expired recording(s)."
msgstr "%(count)s verlopen opname(n) overgeslagen." msgstr "%(count)s verlopen opname(n) overgeslagen."
#: core/admin.py:200 #: core/admin.py:309
msgid "Mark selected recordings as 'Failed to Stop'"
msgstr "Geselecteerde opnames markeren als 'Mislukt bij stoppen'"
#: core/admin.py:218
#, python-format
msgid "%(count)s recording(s) successfully marked as 'Failed to Stop'."
msgstr "%(count)s opname(s) succesvol gemarkeerd als 'Mislukt bij stoppen'."
#: core/admin.py:226
#, fuzzy, python-format
#| msgid "Skipped %(count)s expired recording(s)."
msgid "Skipped %(count)s recording(s) with an ineligible status."
msgstr "%(count)s opname(s) met een niet-toegestane status overgeslagen."
#: core/admin.py:342
msgid "No scopes" msgid "No scopes"
msgstr "Geen scopes" msgstr "Geen scopes"
#: core/admin.py:344 #: core/admin.py:311
msgid "Scopes" msgid "Scopes"
msgstr "Scopes" msgstr "Scopes"
#: core/api/filters.py:25 #: core/api/filters.py:24
msgid "Creator is me" msgid "Creator is me"
msgstr "Maker ben ik" msgstr "Maker ben ik"
#: core/api/serializers.py:88 #: core/api/serializers.py:84
msgid "You must be administrator or owner of a room to add accesses to it." msgid "You must be administrator or owner of a room to add accesses to it."
msgstr "" msgstr ""
"Je moet beheerder of eigenaar van een ruimte zijn om toegang toe te voegen." "Je moet beheerder of eigenaar van een ruimte zijn om toegang toe te voegen."
#: core/api/serializers.py:516 #: core/api/serializers.py:443
msgid "This file extension is not allowed." msgid "This file extension is not allowed."
msgstr "Deze bestandsextensie is niet toegestaan." msgstr "Deze bestandsextensie is niet toegestaan."
#: core/api/serializers.py:533 #: core/models.py:35
msgid "You have reached the maximum number of files for this type."
msgstr "Het maximale aantal bestanden voor dit type is bereikt."
#: core/models.py:37
msgid "Member" msgid "Member"
msgstr "Lid" msgstr "Lid"
#: core/models.py:38 #: core/models.py:36
msgid "Administrator" msgid "Administrator"
msgstr "Beheerder" msgstr "Beheerder"
#: core/models.py:39 #: core/models.py:37
msgid "Owner" msgid "Owner"
msgstr "Eigenaar" msgstr "Eigenaar"
#: core/models.py:55 #: core/models.py:53
msgid "Initiated" msgid "Initiated"
msgstr "Gestart" msgstr "Gestart"
#: core/models.py:56 #: core/models.py:54
msgid "Active" msgid "Active"
msgstr "Actief" msgstr "Actief"
#: core/models.py:57 #: core/models.py:55
msgid "Stopped" msgid "Stopped"
msgstr "Gestopt" msgstr "Gestopt"
#: core/models.py:58 #: core/models.py:56
msgid "Saved" msgid "Saved"
msgstr "Opgeslagen" msgstr "Opgeslagen"
#: core/models.py:59 #: core/models.py:57
msgid "Aborted" msgid "Aborted"
msgstr "Afgebroken" msgstr "Afgebroken"
#: core/models.py:60 #: core/models.py:58
msgid "Failed to Start" msgid "Failed to Start"
msgstr "Starten mislukt" msgstr "Starten mislukt"
#: core/models.py:61 #: core/models.py:59
msgid "Failed to Stop" msgid "Failed to Stop"
msgstr "Stoppen mislukt" msgstr "Stoppen mislukt"
#: core/models.py:62 #: core/models.py:60
msgid "Notification succeeded" msgid "Notification succeeded"
msgstr "Notificatie geslaagd" msgstr "Notificatie geslaagd"
#: core/models.py:89 #: core/models.py:87
msgid "SCREEN_RECORDING" msgid "SCREEN_RECORDING"
msgstr "SCHERM_OPNAME" msgstr "SCHERM_OPNAME"
#: core/models.py:90 #: core/models.py:88
msgid "TRANSCRIPT" msgid "TRANSCRIPT"
msgstr "TRANSCRIPT" msgstr "TRANSCRIPT"
#: core/models.py:96 #: core/models.py:94
msgid "Public Access" msgid "Public Access"
msgstr "Openbare toegang" msgstr "Openbare toegang"
#: core/models.py:97 #: core/models.py:95
msgid "Trusted Access" msgid "Trusted Access"
msgstr "Vertrouwde toegang" msgstr "Vertrouwde toegang"
#: core/models.py:98 #: core/models.py:96
msgid "Restricted Access" msgid "Restricted Access"
msgstr "Beperkte toegang" msgstr "Beperkte toegang"
#: core/models.py:110 #: core/models.py:108
msgid "id" msgid "id"
msgstr "id" msgstr "id"
#: core/models.py:111 #: core/models.py:109
msgid "primary key for the record as UUID" msgid "primary key for the record as UUID"
msgstr "primaire sleutel voor het record als UUID" msgstr "primaire sleutel voor het record als UUID"
#: core/models.py:117 #: core/models.py:115
msgid "created on" msgid "created on"
msgstr "aangemaakt op" msgstr "aangemaakt op"
#: core/models.py:118 #: core/models.py:116
msgid "date and time at which a record was created" msgid "date and time at which a record was created"
msgstr "datum en tijd waarop een record werd aangemaakt" msgstr "datum en tijd waarop een record werd aangemaakt"
#: core/models.py:123 #: core/models.py:121
msgid "updated on" msgid "updated on"
msgstr "bijgewerkt op" msgstr "bijgewerkt op"
#: core/models.py:124 #: core/models.py:122
msgid "date and time at which a record was last updated" msgid "date and time at which a record was last updated"
msgstr "datum en tijd waarop een record voor het laatst werd bijgewerkt" msgstr "datum en tijd waarop een record voor het laatst werd bijgewerkt"
#: core/models.py:144 #: core/models.py:142
msgid "" msgid ""
"Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/" "Enter a valid sub. This value may contain only letters, numbers, and @/./+/-/"
"_ characters." "_ characters."
@@ -197,11 +178,11 @@ msgstr ""
"Voer een geldige sub in. Deze waarde mag alleen letters, cijfers en @/./+/-/" "Voer een geldige sub in. Deze waarde mag alleen letters, cijfers en @/./+/-/"
"_ tekens bevatten." "_ tekens bevatten."
#: core/models.py:150 #: core/models.py:148
msgid "sub" msgid "sub"
msgstr "sub" msgstr "sub"
#: core/models.py:152 #: core/models.py:150
msgid "" msgid ""
"Optional for pending users; required upon account activation. 255 characters " "Optional for pending users; required upon account activation. 255 characters "
"or fewer. Letters, numbers, and @/./+/-/_ characters only." "or fewer. Letters, numbers, and @/./+/-/_ characters only."
@@ -209,55 +190,55 @@ msgstr ""
"Optioneel voor gebruikers in afwachting; vereist bij accountactivering. " "Optioneel voor gebruikers in afwachting; vereist bij accountactivering. "
"Maximum 255 tekens. Alleen letters, cijfers en @/./+/-/_ toegestaan." "Maximum 255 tekens. Alleen letters, cijfers en @/./+/-/_ toegestaan."
#: core/models.py:161 #: core/models.py:159
msgid "identity email address" msgid "identity email address"
msgstr "identiteit e-mailadres" msgstr "identiteit e-mailadres"
#: core/models.py:166 #: core/models.py:164
msgid "admin email address" msgid "admin email address"
msgstr "beheerder e-mailadres" msgstr "beheerder e-mailadres"
#: core/models.py:168 #: core/models.py:166
msgid "full name" msgid "full name"
msgstr "volledige naam" msgstr "volledige naam"
#: core/models.py:170 #: core/models.py:168
msgid "short name" msgid "short name"
msgstr "korte naam" msgstr "korte naam"
#: core/models.py:176 #: core/models.py:174
msgid "language" msgid "language"
msgstr "taal" msgstr "taal"
#: core/models.py:177 #: core/models.py:175
msgid "The language in which the user wants to see the interface." msgid "The language in which the user wants to see the interface."
msgstr "De taal waarin de gebruiker de interface wil zien." msgstr "De taal waarin de gebruiker de interface wil zien."
#: core/models.py:183 #: core/models.py:181
msgid "The timezone in which the user wants to see times." msgid "The timezone in which the user wants to see times."
msgstr "De tijdzone waarin de gebruiker tijden wil zien." msgstr "De tijdzone waarin de gebruiker tijden wil zien."
#: core/models.py:186 #: core/models.py:184
msgid "device" msgid "device"
msgstr "apparaat" msgstr "apparaat"
#: core/models.py:188 #: core/models.py:186
msgid "Whether the user is a device or a real user." msgid "Whether the user is a device or a real user."
msgstr "Of de gebruiker een apparaat is of een echte gebruiker." msgstr "Of de gebruiker een apparaat is of een echte gebruiker."
#: core/models.py:191 #: core/models.py:189
msgid "staff status" msgid "staff status"
msgstr "personeelsstatus" msgstr "personeelsstatus"
#: core/models.py:193 #: core/models.py:191
msgid "Whether the user can log into this admin site." msgid "Whether the user can log into this admin site."
msgstr "Of de gebruiker kan inloggen op deze beheersite." msgstr "Of de gebruiker kan inloggen op deze beheersite."
#: core/models.py:196 #: core/models.py:194
msgid "active" msgid "active"
msgstr "actief" msgstr "actief"
#: core/models.py:199 #: core/models.py:197
msgid "" msgid ""
"Whether this user should be treated as active. Unselect this instead of " "Whether this user should be treated as active. Unselect this instead of "
"deleting accounts." "deleting accounts."
@@ -265,64 +246,64 @@ msgstr ""
"Of deze gebruiker als actief moet worden behandeld. Deselecteer dit in " "Of deze gebruiker als actief moet worden behandeld. Deselecteer dit in "
"plaats van accounts te verwijderen." "plaats van accounts te verwijderen."
#: core/models.py:212 #: core/models.py:210
msgid "user" msgid "user"
msgstr "gebruiker" msgstr "gebruiker"
#: core/models.py:213 #: core/models.py:211
msgid "users" msgid "users"
msgstr "gebruikers" msgstr "gebruikers"
#: core/models.py:272 #: core/models.py:270
msgid "Resource" msgid "Resource"
msgstr "Bron" msgstr "Bron"
#: core/models.py:273 #: core/models.py:271
msgid "Resources" msgid "Resources"
msgstr "Bronnen" msgstr "Bronnen"
#: core/models.py:331 #: core/models.py:329
msgid "Resource access" msgid "Resource access"
msgstr "Brontoegang" msgstr "Brontoegang"
#: core/models.py:332 #: core/models.py:330
msgid "Resource accesses" msgid "Resource accesses"
msgstr "Brontoegangsrechten" msgstr "Brontoegangsrechten"
#: core/models.py:338 #: core/models.py:336
msgid "Resource access with this User and Resource already exists." msgid "Resource access with this User and Resource already exists."
msgstr "Brontoegang met deze gebruiker en bron bestaat al." msgstr "Brontoegang met deze gebruiker en bron bestaat al."
#: core/models.py:394 #: core/models.py:392
msgid "Visio room configuration" msgid "Visio room configuration"
msgstr "Visio-ruimteconfiguratie" msgstr "Visio-ruimteconfiguratie"
#: core/models.py:395 #: core/models.py:393
msgid "Values for Visio parameters to configure the room." msgid "Values for Visio parameters to configure the room."
msgstr "Waarden voor Visio-parameters om de ruimte te configureren." msgstr "Waarden voor Visio-parameters om de ruimte te configureren."
#: core/models.py:402 #: core/models.py:400
msgid "Room PIN code" msgid "Room PIN code"
msgstr "Pincode van de kamer" msgstr "Pincode van de kamer"
#: core/models.py:403 #: core/models.py:401
msgid "Unique n-digit code that identifies this room in telephony mode." msgid "Unique n-digit code that identifies this room in telephony mode."
msgstr "" msgstr ""
"Unieke n-cijferige code die deze kamer identificeert in telefonie-modus." "Unieke n-cijferige code die deze kamer identificeert in telefonie-modus."
#: core/models.py:409 core/models.py:563 #: core/models.py:407 core/models.py:561
msgid "Room" msgid "Room"
msgstr "Ruimte" msgstr "Ruimte"
#: core/models.py:410 #: core/models.py:408
msgid "Rooms" msgid "Rooms"
msgstr "Ruimtes" msgstr "Ruimtes"
#: core/models.py:574 #: core/models.py:572
msgid "Worker ID" msgid "Worker ID"
msgstr "Worker ID" msgstr "Worker ID"
#: core/models.py:576 #: core/models.py:574
msgid "" msgid ""
"Enter an identifier for the worker recording.This ID is retained even when " "Enter an identifier for the worker recording.This ID is retained even when "
"the worker stops, allowing for easy tracking." "the worker stops, allowing for easy tracking."
@@ -330,120 +311,120 @@ msgstr ""
"Voer een identificatie in voor de worker-opname. Deze ID blijft behouden, " "Voer een identificatie in voor de worker-opname. Deze ID blijft behouden, "
"zelfs wanneer de worker stopt, waardoor eenvoudige tracking mogelijk is." "zelfs wanneer de worker stopt, waardoor eenvoudige tracking mogelijk is."
#: core/models.py:584 #: core/models.py:582
msgid "Recording mode" msgid "Recording mode"
msgstr "Opnamemodus" msgstr "Opnamemodus"
#: core/models.py:585 #: core/models.py:583
msgid "Defines the mode of recording being called." msgid "Defines the mode of recording being called."
msgstr "Definieert de modus van opname die wordt aangeroepen." msgstr "Definieert de modus van opname die wordt aangeroepen."
#: core/models.py:590 core/models.py:591 #: core/models.py:588 core/models.py:589
msgid "Recording options" msgid "Recording options"
msgstr "Opnameopties" msgstr "Opnameopties"
#: core/models.py:597 #: core/models.py:595
msgid "Recording" msgid "Recording"
msgstr "Opname" msgstr "Opname"
#: core/models.py:598 #: core/models.py:596
msgid "Recordings" msgid "Recordings"
msgstr "Opnames" msgstr "Opnames"
#: core/models.py:706 #: core/models.py:704
msgid "Recording/user relation" msgid "Recording/user relation"
msgstr "Opname/gebruiker-relatie" msgstr "Opname/gebruiker-relatie"
#: core/models.py:707 #: core/models.py:705
msgid "Recording/user relations" msgid "Recording/user relations"
msgstr "Opname/gebruiker-relaties" msgstr "Opname/gebruiker-relaties"
#: core/models.py:713 #: core/models.py:711
msgid "This user is already in this recording." msgid "This user is already in this recording."
msgstr "Deze gebruiker is al in deze opname." msgstr "Deze gebruiker is al in deze opname."
#: core/models.py:719 #: core/models.py:717
msgid "This team is already in this recording." msgid "This team is already in this recording."
msgstr "Dit team is al in deze opname." msgstr "Dit team is al in deze opname."
#: core/models.py:725 #: core/models.py:723
msgid "Either user or team must be set, not both." msgid "Either user or team must be set, not both."
msgstr "Ofwel gebruiker of team moet worden ingesteld, niet beide." msgstr "Ofwel gebruiker of team moet worden ingesteld, niet beide."
#: core/models.py:742 #: core/models.py:740
msgid "Create rooms" msgid "Create rooms"
msgstr "Ruimtes aanmaken" msgstr "Ruimtes aanmaken"
#: core/models.py:743 #: core/models.py:741
msgid "List rooms" msgid "List rooms"
msgstr "Ruimtes weergeven" msgstr "Ruimtes weergeven"
#: core/models.py:744 #: core/models.py:742
msgid "Retrieve room details" msgid "Retrieve room details"
msgstr "Details van een ruimte ophalen" msgstr "Details van een ruimte ophalen"
#: core/models.py:745 #: core/models.py:743
msgid "Update rooms" msgid "Update rooms"
msgstr "Ruimtes bijwerken" msgstr "Ruimtes bijwerken"
#: core/models.py:746 #: core/models.py:744
msgid "Delete rooms" msgid "Delete rooms"
msgstr "Ruimtes verwijderen" msgstr "Ruimtes verwijderen"
#: core/models.py:759 #: core/models.py:757
msgid "Application name" msgid "Application name"
msgstr "Naam van de applicatie" msgstr "Naam van de applicatie"
#: core/models.py:760 #: core/models.py:758
msgid "Descriptive name for this application." msgid "Descriptive name for this application."
msgstr "Beschrijvende naam voor deze applicatie." msgstr "Beschrijvende naam voor deze applicatie."
#: core/models.py:770 #: core/models.py:768
msgid "Hashed on Save. Copy it now if this is a new secret." msgid "Hashed on Save. Copy it now if this is a new secret."
msgstr "" msgstr ""
"Wordt gehasht bij het opslaan. Kopieer het nu als dit een nieuw geheim is." "Wordt gehasht bij het opslaan. Kopieer het nu als dit een nieuw geheim is."
#: core/models.py:781 #: core/models.py:779
msgid "Application" msgid "Application"
msgstr "Applicatie" msgstr "Applicatie"
#: core/models.py:782 #: core/models.py:780
msgid "Applications" msgid "Applications"
msgstr "Applicaties" msgstr "Applicaties"
#: core/models.py:805 #: core/models.py:803
msgid "Enter a valid domain" msgid "Enter a valid domain"
msgstr "Voer een geldig domein in" msgstr "Voer een geldig domein in"
#: core/models.py:808 #: core/models.py:806
msgid "Domain" msgid "Domain"
msgstr "Domein" msgstr "Domein"
#: core/models.py:809 #: core/models.py:807
msgid "Email domain this application can act on behalf of." msgid "Email domain this application can act on behalf of."
msgstr "E-maildomein namens welke deze applicatie kan handelen." msgstr "E-maildomein namens welke deze applicatie kan handelen."
#: core/models.py:821 #: core/models.py:819
msgid "Application domain" msgid "Application domain"
msgstr "Applicatiedomein" msgstr "Applicatiedomein"
#: core/models.py:822 #: core/models.py:820
msgid "Application domains" msgid "Application domains"
msgstr "Applicatiedomeinen" msgstr "Applicatiedomeinen"
#: core/models.py:840 #: core/models.py:838
msgid "Pending" msgid "Pending"
msgstr "In afwachting" msgstr "In afwachting"
#: core/models.py:848 #: core/models.py:846
msgid "Ready" msgid "Ready"
msgstr "Klaar" msgstr "Klaar"
#: core/models.py:854 #: core/models.py:852
msgid "Background image" msgid "Background image"
msgstr "Achtergrondafbeelding" msgstr "Achtergrondafbeelding"
#: core/models.py:866 #: core/models.py:864
msgid "title" msgid "title"
msgstr "Titel" msgstr "Titel"
@@ -459,11 +440,11 @@ msgstr "Bestand"
msgid "Files" msgid "Files"
msgstr "Bestanden" msgstr "Bestanden"
#: core/models.py:1000 #: core/models.py:970
msgid "This file is already hard deleted." msgid "This file is already hard deleted."
msgstr "Dit bestand is al definitief verwijderd." msgstr "Dit bestand is al definitief verwijderd."
#: core/models.py:1010 #: core/models.py:980
#, fuzzy #, fuzzy
#| msgid "To hard delete a file, it must first be soft deleted." #| msgid "To hard delete a file, it must first be soft deleted."
msgid "To hard delete a file, it must first be soft deleted." msgid "To hard delete a file, it must first be soft deleted."
@@ -599,18 +580,18 @@ msgstr ""
" Als je vragen hebt of hulp nodig hebt, neem dan contact op met ons support " " Als je vragen hebt of hulp nodig hebt, neem dan contact op met ons support "
"team via %(support_email)s. " "team via %(support_email)s. "
#: meet/settings.py:223 #: meet/settings.py:224
msgid "English" msgid "English"
msgstr "Engels" msgstr "Engels"
#: meet/settings.py:224 #: meet/settings.py:225
msgid "French" msgid "French"
msgstr "Frans" msgstr "Frans"
#: meet/settings.py:225 #: meet/settings.py:226
msgid "Dutch" msgid "Dutch"
msgstr "Nederlands" msgstr "Nederlands"
#: meet/settings.py:226 #: meet/settings.py:227
msgid "German" msgid "German"
msgstr "Duits" msgstr "Duits"
+2 -21
View File
@@ -176,13 +176,6 @@ class Base(Configuration):
environ_prefix=None, environ_prefix=None,
) )
FILE_UPLOAD_ENABLED = values.BooleanValue(
# False to avoid a breaking change for now
default=False,
environ_name="FILE_UPLOAD_ENABLED",
environ_prefix=None,
)
FILE_UPLOAD_PATH = values.Value( FILE_UPLOAD_PATH = values.Value(
"files", environ_name="FILE_UPLOAD_PATH", environ_prefix=None "files", environ_name="FILE_UPLOAD_PATH", environ_prefix=None
) )
@@ -195,7 +188,6 @@ class Base(Configuration):
{ {
"background_image": { "background_image": {
"max_size": 2 * MB, "max_size": 2 * MB,
"max_count_by_user": 10,
"allowed_extensions": [".jpeg", ".jpg", ".png"], "allowed_extensions": [".jpeg", ".jpg", ".png"],
"allowed_mimetypes": ["image/jpeg", "image/png"], "allowed_mimetypes": ["image/jpeg", "image/png"],
}, },
@@ -452,11 +444,7 @@ class Base(Configuration):
CELERY_BROKER_TRANSPORT_OPTIONS = values.DictValue({}, environ_prefix=None) CELERY_BROKER_TRANSPORT_OPTIONS = values.DictValue({}, environ_prefix=None)
# Session # Session
SESSION_ENGINE = values.Value( SESSION_ENGINE = "django.contrib.sessions.backends.cache"
default="django.contrib.sessions.backends.cache",
environ_name="SESSION_ENGINE",
environ_prefix=None,
)
SESSION_CACHE_ALIAS = "default" SESSION_CACHE_ALIAS = "default"
SESSION_COOKIE_AGE = values.PositiveIntegerValue( SESSION_COOKIE_AGE = values.PositiveIntegerValue(
default=60 * 60 * 12, environ_name="SESSION_COOKIE_AGE", environ_prefix=None default=60 * 60 * 12, environ_name="SESSION_COOKIE_AGE", environ_prefix=None
@@ -981,17 +969,10 @@ class Test(Base):
USE_SWAGGER = True USE_SWAGGER = True
EXTERNAL_API_ENABLED = True EXTERNAL_API_ENABLED = True
LIVEKIT_CONFIGURATION = { APPLICATION_JWT_SECRET_KEY = "devKey" # noqa:S105
"api_key": "devkey-padded-for-minimum-len!-livekit",
"api_secret": "secret-key-padded-for-minimum-len!-livekit",
"url": "http://127.0.0.1.nip.io:7880",
}
APPLICATION_JWT_SECRET_KEY = "secret-key-padded-for-minimum-len!-application" # noqa:S105
APPLICATION_JWT_AUDIENCE = "Test inc." APPLICATION_JWT_AUDIENCE = "Test inc."
CELERY_TASK_ALWAYS_EAGER = True CELERY_TASK_ALWAYS_EAGER = True
FILE_UPLOAD_ENABLED = True
def __init__(self): def __init__(self):
# pylint: disable=invalid-name # pylint: disable=invalid-name
+27 -32
View File
@@ -2,12 +2,12 @@
# Meet package # Meet package
# #
[build-system] [build-system]
requires = ["uv_build>=0.10.9,<0.11.0"] requires = ["setuptools"]
build-backend = "uv_build" build-backend = "setuptools.build_meta"
[project] [project]
name = "meet" name = "meet"
version = "1.13.0" version = "1.10.0"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }] authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [ classifiers = [
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
@@ -21,19 +21,20 @@ classifiers = [
] ]
description = "A simple video and phone conferencing tool, powered by LiveKit" description = "A simple video and phone conferencing tool, powered by LiveKit"
keywords = ["Django", "Contacts", "Templates", "RBAC"] keywords = ["Django", "Contacts", "Templates", "RBAC"]
license = "MIT" license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.13" requires-python = ">=3.13"
dependencies = [ dependencies = [
"boto3==1.42.68", "boto3==1.42.49",
"Brotli==1.2.0", "Brotli==1.2.0",
"brevo-python==1.2.0", "brevo-python==1.2.0",
"celery[redis]==5.6.2", "celery[redis]==5.6.2",
"dj-database-url==3.1.2", "dj-database-url==3.1.0",
"django-configurations==2.5.1", "django-configurations==2.5.1",
"django-cors-headers==4.9.0", "django-cors-headers==4.9.0",
"django-countries==8.2.0", "django-countries==8.2.0",
"django-filter==25.2", "django-filter==25.2",
"django-lasuite[all]==0.0.25", "django-lasuite[all]==0.0.24",
"django-parler==2.3", "django-parler==2.3",
"redis==5.2.1", "redis==5.2.1",
"django-redis==6.0.0", "django-redis==6.0.0",
@@ -43,21 +44,21 @@ dependencies = [
"django==5.2.12", "django==5.2.12",
"djangorestframework==3.16.1", "djangorestframework==3.16.1",
"drf_spectacular==0.29.0", "drf_spectacular==0.29.0",
"dockerflow==2026.3.4", "dockerflow==2026.1.26",
"easy_thumbnails==2.10.1", "easy_thumbnails==2.10.1",
"factory_boy==3.3.3", "factory_boy==3.3.3",
"gunicorn==25.1.0", "gunicorn==25.1.0",
"jsonschema==4.26.0", "jsonschema==4.26.0",
"markdown==3.10.2", "markdown==3.10.2",
"nested-multipart-parser==1.6.0", "nested-multipart-parser==1.6.0",
"psycopg[binary]==3.3.3", "psycopg[binary]==3.3.2",
"pydantic==2.12.5", "pydantic==2.12.4",
"PyJWT==2.12.1", "PyJWT==2.11.0",
"python-frontmatter==1.1.0", "python-frontmatter==1.1.0",
"python-magic==0.4.27", "python-magic==0.4.27",
"requests==2.33.0", "requests==2.32.5",
"sentry-sdk==2.54.0", "sentry-sdk==2.53.0",
"whitenoise==6.12.0", "whitenoise==6.11.0",
"mozilla-django-oidc==5.0.2", "mozilla-django-oidc==5.0.2",
"livekit-api==1.1.0", "livekit-api==1.1.0",
"aiohttp==3.13.3", "aiohttp==3.13.3",
@@ -69,14 +70,14 @@ dependencies = [
"Homepage" = "https://github.com/suitenumerique/meet" "Homepage" = "https://github.com/suitenumerique/meet"
"Repository" = "https://github.com/suitenumerique/meet" "Repository" = "https://github.com/suitenumerique/meet"
[dependency-groups] [project.optional-dependencies]
dev = [ dev = [
"django-extensions==4.1", "django-extensions==4.1",
"drf-spectacular-sidecar==2026.3.1", "drf-spectacular-sidecar==2026.1.1",
"freezegun==1.5.5", "freezegun==1.5.5",
"ipdb==0.13.13", "ipdb==0.13.13",
"ipython==9.11.0", "ipython==9.10.0",
"pyfakefs==6.1.5", "pyfakefs==6.1.1",
"pylint-django==2.7.0", "pylint-django==2.7.0",
"pylint<4.0.0", "pylint<4.0.0",
"pytest-cov==7.0.0", "pytest-cov==7.0.0",
@@ -84,23 +85,17 @@ dev = [
"pytest==9.0.2", "pytest==9.0.2",
"pytest-icdiff==0.9", "pytest-icdiff==0.9",
"pytest-xdist==3.8.0", "pytest-xdist==3.8.0",
"responses==0.26.0", "responses==0.25.8",
"ruff==0.15.6", "ruff==0.15.1",
"types-requests==2.32.4.20260107", "types-requests==2.32.4.20260107",
] ]
[tool.uv.build-backend] [tool.setuptools]
module-name = [ packages = { find = { where = ["."], exclude = ["tests"] } }
"core", zip-safe = true
"demo",
"meet" [tool.distutils.bdist_wheel]
] universal = true
module-root = ""
source-exclude = [
"**/tests/**",
"**/test_*.py",
"**/tests.py",
]
[tool.ruff] [tool.ruff]
exclude = [ exclude = [
-2365
View File
File diff suppressed because it is too large Load Diff
+1 -5
View File
@@ -1,7 +1,5 @@
FROM node:20-alpine AS frontend-deps FROM node:20-alpine AS frontend-deps
USER node
WORKDIR /home/frontend/ WORKDIR /home/frontend/
COPY ./src/frontend/package.json ./package.json COPY ./src/frontend/package.json ./package.json
@@ -10,7 +8,7 @@ COPY ./src/frontend/package-lock.json ./package-lock.json
RUN npm ci RUN npm ci
COPY .dockerignore ./.dockerignore COPY .dockerignore ./.dockerignore
COPY --chown=node:node ./src/frontend/ . COPY ./src/frontend/ .
### ---- Front-end builder image ---- ### ---- Front-end builder image ----
FROM frontend-deps AS meet FROM frontend-deps AS meet
@@ -19,8 +17,6 @@ WORKDIR /home/frontend
FROM frontend-deps AS meet-dev FROM frontend-deps AS meet-dev
USER node
WORKDIR /home/frontend WORKDIR /home/frontend
EXPOSE 8080 EXPOSE 8080
+15 -19
View File
@@ -1,12 +1,12 @@
{ {
"name": "meet", "name": "meet",
"version": "1.13.0", "version": "1.10.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "meet", "name": "meet",
"version": "1.13.0", "version": "1.10.0",
"dependencies": { "dependencies": {
"@fontsource-variable/material-symbols-outlined": "5.2.34", "@fontsource-variable/material-symbols-outlined": "5.2.34",
"@fontsource/material-icons-outlined": "5.2.6", "@fontsource/material-icons-outlined": "5.2.6",
@@ -6269,13 +6269,10 @@
} }
}, },
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "3.3.2", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.2.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.3.1.tgz",
"integrity": "sha512-6obghkliLdmKa56xdbLOpUZ43pAR6xFy1uOrxBaIDjT+yaRuuybLjGS9eVBoSR/UPU5fq3OXClEHLJNGvbxKpQ==", "integrity": "sha512-qkdCKzLNtrgPFP1Vo+98FRzJnBRGe4ffyCea9IwHB1fyxPOeNTHpLKYGd4Uk9xvNoH0ZoOjwZxNptyMwqrId1Q==",
"license": "(MPL-2.0 OR Apache-2.0)", "license": "(MPL-2.0 OR Apache-2.0)",
"engines": {
"node": ">=20"
},
"optionalDependencies": { "optionalDependencies": {
"@types/trusted-types": "^2.0.7" "@types/trusted-types": "^2.0.7"
} }
@@ -7161,11 +7158,10 @@
} }
}, },
"node_modules/flatted": { "node_modules/flatted": {
"version": "3.4.2", "version": "3.3.1",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
"integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
"dev": true, "dev": true
"license": "ISC"
}, },
"node_modules/for-each": { "node_modules/for-each": {
"version": "0.3.3", "version": "0.3.3",
@@ -7632,9 +7628,9 @@
"integrity": "sha512-Rf4YVNYpKjZ6ASAmibcwTNciQ5Co5Ztq6iZPEykHpkoflnD/K5ryE/rHehFsTm4NJj8nKDhbi3eKBWGogmNnkg==" "integrity": "sha512-Rf4YVNYpKjZ6ASAmibcwTNciQ5Co5Ztq6iZPEykHpkoflnD/K5ryE/rHehFsTm4NJj8nKDhbi3eKBWGogmNnkg=="
}, },
"node_modules/hono": { "node_modules/hono": {
"version": "4.12.8", "version": "4.12.2",
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.8.tgz", "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.2.tgz",
"integrity": "sha512-VJCEvtrezO1IAR+kqEYnxUOoStaQPGrCmX3j4wDTNOcD1uRPFpGlwQUIW8niPuvHXaTUxeOUl5MMDGrl+tmO9A==", "integrity": "sha512-gJnaDHXKDayjt8ue0n8Gs0A007yKXj4Xzb8+cNjZeYsSzzwKc0Lr+OZgYwVfB0pHfUs17EPoLvrOsEaJ9mj+Tg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -11111,9 +11107,9 @@
} }
}, },
"node_modules/undici": { "node_modules/undici": {
"version": "6.24.1", "version": "6.23.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-6.24.1.tgz", "resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
"integrity": "sha512-sC+b0tB1whOCzbtlx20fx3WgCXwkW627p4EA9uM+/tNNPkSS+eSEld6pAs9nDv7WbY1UUljBMYPtu9BCOrCWKA==", "integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=18.17" "node": ">=18.17"
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "meet", "name": "meet",
"private": true, "private": true,
"version": "1.13.0", "version": "1.10.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "panda codegen && vite", "dev": "panda codegen && vite",
-5
View File
@@ -274,11 +274,6 @@ const config: Config = {
min: { value: 'min-content' }, min: { value: 'min-content' },
max: { value: 'max-content' }, max: { value: 'max-content' },
fit: { value: 'fit-content' }, fit: { value: 'fit-content' },
// room layout
'room-side-panel': { value: '360px' },
'room-side-panel-margin': { value: '1.5rem' },
'room-control-bar': { value: '80px' },
'room-reaction-toolbar-height': { value: '42px' },
}, },
spacing, spacing,
}), }),
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+1 -13
View File
@@ -15,19 +15,7 @@ export const fetchApi = async <T = Record<string, unknown>>(
...options?.headers, ...options?.headers,
}, },
}) })
const result = await response.json()
let result: T
if (response.status === 204) {
result = undefined as T
} else {
const contentType = response.headers.get('content-type') ?? ''
if (!contentType.includes('application/json')) {
result = undefined as T
} else {
result = (await response.json()) as T
}
}
if (!response.ok) { if (!response.ok) {
throw new ApiError(response.status, result) throw new ApiError(response.status, result)
} }
-1
View File
@@ -5,5 +5,4 @@ export const keys = {
requestEntry: 'requestEntry', requestEntry: 'requestEntry',
waitingParticipants: 'waitingParticipants', waitingParticipants: 'waitingParticipants',
roomCreationCallback: 'roomCreationCallback', roomCreationCallback: 'roomCreationCallback',
files: 'files',
} }
-7
View File
@@ -30,13 +30,6 @@ export interface ApiConfig {
expiration_days?: number expiration_days?: number
max_duration?: number max_duration?: number
} }
background_image: {
upload_is_enabled: boolean
max_size: number
max_count_by_user: number
allowed_extensions: string[]
allowed_mimetypes: string[]
}
subtitle: { subtitle: {
enabled: boolean enabled: boolean
} }
@@ -1,93 +0,0 @@
import { fetchApi } from '@/api/fetchApi'
import { useMutation } from '@tanstack/react-query'
import { ApiFileItem } from '@/features/files/api/types.ts'
import { keys } from '@/api/queryKeys.ts'
import { queryClient } from '@/api/queryClient.ts'
/**
* Upload a file, using XHR so we can report on progress through a handler.
*
* @param url The URL to PUT the file to.
* @param file The file to upload.
* @param progressHandler A handler that receives progress updates as a single integer `0 <= x <= 100`.
*/
export const uploadFile = (
url: string,
file: File,
progressHandler: (progress: number) => void
) =>
new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest()
xhr.open('PUT', url)
xhr.setRequestHeader('X-amz-acl', 'private')
xhr.setRequestHeader('Content-Type', file.type)
xhr.addEventListener('error', reject)
xhr.addEventListener('abort', reject)
xhr.addEventListener('readystatechange', () => {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
// Make sure to always set the progress to 100% when the upload is done.
// Because 'progress' event listener is not called when the file size is 0.
progressHandler(100)
return resolve(true)
}
reject(new Error(`Failed to perform the upload on ${url}.`))
}
})
xhr.upload.addEventListener('progress', (progressEvent) => {
if (progressEvent.lengthComputable) {
progressHandler(
Math.floor((progressEvent.loaded / progressEvent.total) * 100)
)
}
})
xhr.send(file)
})
/**
* Asynchronously creates a new file and uploads it to the server.
*
* @param {object} params - The parameters for the file creation and upload process.
* @param {File} params.file - The file object to be uploaded.
* @param {function} params.onProgress - A callback function that receives the upload progress as a number (0 to 100).
* @returns {Promise<ApiFileItem>} A promise that resolves when the file has been successfully uploaded and the server process is completed.
*/
export const createFile = async ({
file,
onProgress,
}: {
file: File
onProgress: (progress: number) => void
}): Promise<ApiFileItem> => {
const res = await fetchApi<ApiFileItem>(`/files/`, {
method: 'POST',
body: JSON.stringify({ filename: file.name, type: 'background_image' }),
})
if (res.upload_state !== 'pending') {
throw new Error('State should be pending right after creation')
}
const policy = res.policy
await uploadFile(policy, file, onProgress)
const createdFile = await fetchApi<ApiFileItem>(
`/files/${res.id}/upload-ended/`,
{
method: 'POST',
}
)
// We invalidate the files query to make sure the new file is immediately available.
await queryClient.invalidateQueries({
queryKey: [keys.files],
})
return createdFile
}
export const useCreateFile = () => {
return useMutation({
mutationFn: createFile,
})
}
@@ -1,33 +0,0 @@
import { fetchApi } from '@/api/fetchApi'
import { useMutation, useQueryClient } from '@tanstack/react-query'
import { keys } from '@/api/queryKeys.ts'
/**
* Deletes a file specified by its unique identifier.
*
* @param {Object} params - The parameters required for deleting the file.
* @param {string} params.fileId - The unique identifier of the file to be deleted.
* @returns {Promise<void>} A promise that resolves when the file is successfully deleted.
*/
export const deleteFile = async ({
fileId,
}: {
fileId: string
}): Promise<void> => {
await fetchApi<void>(`/files/${fileId}/`, {
method: 'DELETE',
})
}
export const useDeleteFile = () => {
const queryClient = useQueryClient()
return useMutation({
mutationFn: deleteFile,
onSuccess: async () => {
await queryClient.invalidateQueries({
queryKey: [keys.files],
})
},
})
}
@@ -1,70 +0,0 @@
import { fetchApi } from '@/api/fetchApi'
import { keepPreviousData, useQuery } from '@tanstack/react-query'
import { keys } from '@/api/queryKeys'
import {
ApiFileItem,
ApiFileType,
ApiFileUploadState,
} from '@/features/files/api/types.ts'
import { useUser } from '@/features/auth'
import { useConfig } from '@/api/useConfig.ts'
type ListFilesResponse = {
count: number
next: string | null
previous: string | null
results: ApiFileItem[]
}
type ListFilesFilters = {
is_creator_me?: boolean
type?: ApiFileType
upload_state?: ApiFileUploadState
is_deleted?: boolean
}
export type ListFilesParams = {
filters?: ListFilesFilters
pagination: {
page: number
pageSize: number
}
}
export const listMyFiles = async ({
filters = {},
pagination: { page, pageSize },
}: ListFilesParams): Promise<ListFilesResponse> => {
const query = new URLSearchParams()
query.append('page', page.toString())
query.append('page_size', pageSize.toString())
if (filters?.is_creator_me ?? true) {
query.append('is_creator_me', 'true')
}
if (filters?.type) {
query.append('type', filters.type)
}
if (filters?.upload_state) {
query.append('upload_state', filters.upload_state)
}
if (typeof filters?.is_deleted === 'boolean') {
query.append('is_deleted', filters.is_deleted ? 'true' : 'false')
}
return fetchApi<ListFilesResponse>(`/files?${query.toString()}`, {
method: 'GET',
})
}
export const useListMyFiles = (params: Parameters<typeof listMyFiles>[0]) => {
const { isLoggedIn } = useUser()
const { data: appConfig } = useConfig()
return useQuery({
queryKey: [keys.files, params],
queryFn: () => listMyFiles(params),
refetchOnMount: 'always',
placeholderData: keepPreviousData,
enabled:
isLoggedIn && appConfig?.background_image?.upload_is_enabled === true,
})
}
@@ -1,34 +0,0 @@
export type ApiFileCreator = {
id: string // UUID
full_name: string | null
short_name: string | null
}
export type ApiFileType = 'background_image'
export type ApiFileUploadState = 'pending' | 'ready'
export type ApiFileItem = {
id: string // UUID
created_at: string // ISO datetime string
updated_at: string // ISO datetime string
title: string
type: ApiFileType
creator: ApiFileCreator
deleted_at: string | null
hard_deleted_at: string | null
filename: string
upload_state: ApiFileUploadState
mimetype: string // e.g. "image/png"
size: number // file size in bytes
description: string | null
} & (
| {
upload_state: 'ready'
url: string
}
| {
upload_state: 'pending'
policy: string
url: null
}
)
@@ -1,44 +0,0 @@
import { cva, RecipeVariantProps } from '@/styled-system/css'
import { useTranslation } from 'react-i18next'
const controlBarRegion = cva({
base: {
display: 'flex',
alignItems: 'center',
flex: '1 1 33%',
justifyContent: 'center',
gap: '0.65rem',
},
variants: {
mobile: {
true: {
justifyContent: 'space-between',
width: '330px',
},
},
},
defaultVariants: {
mobile: false,
},
})
export type ControlBarRegionProps = React.HTMLAttributes<HTMLDivElement> &
RecipeVariantProps<typeof controlBarRegion>
export function ControlBarRegion({
children,
mobile,
...props
}: ControlBarRegionProps) {
const { t } = useTranslation('rooms')
return (
<div
role="region"
aria-label={t('controls.region')}
className={controlBarRegion({ mobile })}
{...props}
>
{children}
</div>
)
}
@@ -1,86 +0,0 @@
// RoomContentArea.tsx
import React from 'react'
import { styled } from '@/styled-system/jsx'
import { cva } from '@/styled-system/css'
import { useSubtitles } from '@/features/subtitle/hooks/useSubtitles'
import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'
import { Subtitles } from '@/features/subtitle/component/Subtitles'
import { MainNotificationToast } from '@/features/notifications/MainNotificationToast'
import { useReactionsToolbar } from '@/features/reactions/hooks/useReactionsToolbar'
const RoomViewport = styled(
'div',
cva({
base: {
position: 'absolute',
maxHeight: '100%',
transition:
'inset .5s cubic-bezier(0.4,0,0.2,1) 5ms, padding .5s cubic-bezier(0.4,0,0.2,1) 5ms',
},
variants: {
isSidePanelOpen: {
true: {
inset: `var(--lk-grid-gap) calc(var(--sizes-room-side-panel) + var(--sizes-room-side-panel-margin) * 2) calc(var(--sizes-room-control-bar)) 16px`,
},
false: {
inset: `var(--lk-grid-gap) var(--lk-grid-gap) calc(var(--sizes-room-control-bar))`,
},
},
isReactionToolbarOpen: {
true: {
paddingBottom:
'calc(var(--sizes-room-reaction-toolbar-height) + calc(var(--lk-grid-gap) / 2))',
},
false: {
paddingBottom: '0',
},
},
},
})
)
const TrackAreaContainer = styled(
'div',
cva({
base: {
position: 'relative',
display: 'flex',
width: '100%',
transition: 'height .5s cubic-bezier(0.4,0,0.2,1) 5ms',
},
variants: {
areSubtitlesOpen: {
true: {
height: 'calc(100% - 12rem)',
},
false: {
height: '100%',
},
},
},
})
)
interface RoomContentAreaProps {
children: React.ReactNode
}
export function RoomContentArea({ children }: RoomContentAreaProps) {
const { isSidePanelOpen } = useSidePanel()
const { areSubtitlesOpen } = useSubtitles()
const { isOpen: isReactionToolbarOpen } = useReactionsToolbar()
return (
<RoomViewport
isSidePanelOpen={isSidePanelOpen}
isReactionToolbarOpen={isReactionToolbarOpen}
>
<TrackAreaContainer areSubtitlesOpen={areSubtitlesOpen}>
{children}
</TrackAreaContainer>
<Subtitles />
<MainNotificationToast />
</RoomViewport>
)
}
@@ -1,4 +1,4 @@
import { useCallback, useEffect } from 'react' import { useEffect, useRef, useState } from 'react'
import { useRoomContext } from '@livekit/components-react' import { useRoomContext } from '@livekit/components-react'
import { Participant, RemoteParticipant, RoomEvent } from 'livekit-client' import { Participant, RemoteParticipant, RoomEvent } from 'livekit-client'
import { ChatMessage, isMobileBrowser } from '@livekit/components-core' import { ChatMessage, isMobileBrowser } from '@livekit/components-core'
@@ -10,11 +10,17 @@ import { decodeNotificationDataReceived } from './utils'
import { useNotificationSound } from '@/features/notifications/hooks/useSoundNotification' import { useNotificationSound } from '@/features/notifications/hooks/useSoundNotification'
import { ToastProvider, toastQueue } from './components/ToastProvider' import { ToastProvider, toastQueue } from './components/ToastProvider'
import { WaitingParticipantNotification } from './components/WaitingParticipantNotification' import { WaitingParticipantNotification } from './components/WaitingParticipantNotification'
import {
Emoji,
Reaction,
} from '@/features/rooms/livekit/components/controls/ReactionsToggle'
import {
ANIMATION_DURATION,
ReactionPortals,
} from '@/features/rooms/livekit/components/ReactionPortal'
import { layoutStore } from '@/stores/layout' import { layoutStore } from '@/stores/layout'
import { PanelId } from '@/features/rooms/livekit/hooks/useSidePanel' import { PanelId } from '@/features/rooms/livekit/hooks/useSidePanel'
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce' import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
import { Emoji } from '@/features/reactions/types'
import { useReactions } from '@/features/reactions/hooks/useReactions'
export const MainNotificationToast = () => { export const MainNotificationToast = () => {
const room = useRoomContext() const room = useRoomContext()
@@ -22,7 +28,8 @@ export const MainNotificationToast = () => {
const { t } = useTranslation('notifications') const { t } = useTranslation('notifications')
const announce = useScreenReaderAnnounce() const announce = useScreenReaderAnnounce()
const { appendReaction } = useReactions() const [reactions, setReactions] = useState<Reaction[]>([])
const instanceIdRef = useRef(0)
useEffect(() => { useEffect(() => {
const handleChatMessage = ( const handleChatMessage = (
@@ -55,13 +62,21 @@ export const MainNotificationToast = () => {
} }
}, [room, triggerNotificationSound, announce, t]) }, [room, triggerNotificationSound, announce, t])
const handleEmoji = useCallback( const handleEmoji = (emoji: string, participant: Participant) => {
(emoji: string, participant: Participant) => { if (!emoji || !Object.values(Emoji).includes(emoji as Emoji)) return
if (!emoji || !Object.values(Emoji).includes(emoji as Emoji)) return const id = instanceIdRef.current++
appendReaction(emoji as Emoji, participant) setReactions((prev) => [
}, ...prev,
[appendReaction] {
) id,
emoji,
participant,
},
])
setTimeout(() => {
setReactions((prev) => prev.filter((instance) => instance.id !== id))
}, ANIMATION_DURATION)
}
useEffect(() => { useEffect(() => {
const handleDataReceived = ( const handleDataReceived = (
@@ -134,7 +149,7 @@ export const MainNotificationToast = () => {
return () => { return () => {
room.off(RoomEvent.DataReceived, handleDataReceived) room.off(RoomEvent.DataReceived, handleDataReceived)
} }
}, [room, handleEmoji]) }, [room])
useEffect(() => { useEffect(() => {
const showJoinNotification = (participant: Participant) => { const showJoinNotification = (participant: Participant) => {
@@ -237,6 +252,7 @@ export const MainNotificationToast = () => {
<Div position="absolute" bottom={0} right={5} zIndex={1000}> <Div position="absolute" bottom={0} right={5} zIndex={1000}>
<ToastProvider /> <ToastProvider />
<WaitingParticipantNotification /> <WaitingParticipantNotification />
<ReactionPortals reactions={reactions} />
</Div> </Div>
) )
} }
@@ -1,33 +0,0 @@
import { useTranslation } from 'react-i18next'
import { RiEmotionLine } from '@remixicon/react'
import { ToggleButton } from '@/primitives'
import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'
import { useReactionsToolbar } from '../hooks/useReactionsToolbar'
export const ReactionsToggle = () => {
const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const { isOpen, toggle } = useReactionsToolbar()
useRegisterKeyboardShortcut({
id: 'reaction',
handler: toggle,
})
return (
<ToggleButton
id="reactions-toggle"
data-attr="reactions-toggle"
square
variant="primaryDark"
aria-label={t('button')}
aria-expanded={isOpen}
tooltip={t('button')}
isSelected={isOpen}
onChange={toggle}
>
<RiEmotionLine />
</ToggleButton>
)
}
@@ -1,31 +0,0 @@
import { useTranslation } from 'react-i18next'
import { css } from '@/styled-system/css'
import { Emoji } from '../../types'
import { useReactions } from '../../hooks/useReactions'
import { Button } from '@/primitives'
export const ReactionButton = ({ emoji }: { emoji: Emoji }) => {
const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const { sendReaction } = useReactions()
return (
<Button
onPress={() => sendReaction(emoji)}
aria-label={t(`emojis.${emoji}`)}
variant="primaryTextDark"
size="sm"
round
data-attr={`send-reaction-${emoji}`}
>
<img
src={`/assets/reactions/${emoji}.png`}
alt=""
className={css({
width: '28px',
height: '28px',
pointerEvents: 'none',
userSelect: 'none',
})}
/>
</Button>
)
}
@@ -1,153 +0,0 @@
import { FocusScope, useFocusManager } from '@react-aria/focus'
import { useReactionsToolbar } from '../../hooks/useReactionsToolbar'
import { ReactionButton } from './ReactionButton'
import { Emoji } from '../../types'
import { styled } from '@/styled-system/jsx'
import { layoutStore } from '@/stores/layout'
import { getFirstControlBarFocusable } from '@/utils/dom'
import { useIsMobile } from '@/utils/useIsMobile'
import { useEffect, useRef, useState } from 'react'
import { useDelayUnmount } from '@/hooks/useDelayUnmount'
import { useTranslation } from 'react-i18next'
const Container = styled('div', {
base: {
display: 'flex',
justifyContent: 'center',
position: 'absolute',
bottom: 'var(--sizes-room-control-bar)',
left: 0,
right: 0,
pointerEvents: 'none',
},
})
const StyledStrip = styled('div', {
base: {
display: 'flex',
gap: '0.2rem',
borderRadius: '21px',
padding: '0.15rem',
backgroundColor: 'primaryDark.100',
opacity: 0,
transform: 'translateY(3.25rem)',
transition: 'opacity, transform',
transitionDuration: '0.5s',
transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)',
pointerEvents: 'none',
},
variants: {
isVisible: {
true: {
opacity: 1,
transform: 'translateY(0)',
pointerEvents: 'auto',
},
},
desktopOffset: {
true: {
// Ideally this value should be calculated dynamically in JavaScript to keep
// the reaction toolbar perfectly centered relative to the reaction toggle.
// However, for simplicity and to follow a pragmatic 80/20 approach,
// this value is currently hardcoded in CSS.
marginRight: '30px',
},
},
},
})
const Strip = ({ children }: { children: React.ReactNode }) => {
const { isOpen } = useReactionsToolbar()
const isMobile = useIsMobile()
const ref = useRef<HTMLDivElement>(null)
const [isVisible, setIsVisible] = useState(false)
useEffect(() => {
if (isOpen) {
// defer one frame so the browser paints opacity:0 first
const id = requestAnimationFrame(() => setIsVisible(true))
return () => cancelAnimationFrame(id)
} else {
setIsVisible(false)
}
}, [isOpen])
return (
<StyledStrip
ref={ref}
aria-hidden={!isOpen}
isVisible={isVisible}
desktopOffset={!isMobile}
>
{children}
</StyledStrip>
)
}
const KeyboardNavigation = ({ children }: { children: React.ReactNode }) => {
const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const focusManager = useFocusManager()
const onFocus = (e: React.FocusEvent<HTMLDivElement>) => {
const comingFromOutside = !e.currentTarget.contains(e.relatedTarget)
if (comingFromOutside) {
focusManager?.focusFirst()
}
}
const onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {
switch (e.key) {
case 'ArrowRight':
focusManager?.focusNext({ wrap: true })
break
case 'ArrowLeft':
focusManager?.focusPrevious({ wrap: true })
break
case 'Escape':
e.preventDefault()
document.getElementById('reactions-toggle')?.focus()
layoutStore.showReactionsToolbar = false
break
case 'Tab':
if (!e.shiftKey) {
e.preventDefault()
getFirstControlBarFocusable('control-bar')?.focus()
}
break
}
}
return (
<div
role="toolbar"
aria-label={t('toolbar')}
onKeyDown={onKeyDown}
onFocus={onFocus}
>
{children}
</div>
)
}
export const ReactionsToolbar = () => {
const { isOpen } = useReactionsToolbar()
const shouldMount = useDelayUnmount(isOpen, 300)
if (!shouldMount) return null
return (
<Container>
{/* eslint-disable-next-line jsx-a11y/no-autofocus*/}
<FocusScope autoFocus>
<KeyboardNavigation>
<Strip>
{Object.values(Emoji).map((emoji) => (
<ReactionButton key={emoji} emoji={emoji} />
))}
</Strip>
</KeyboardNavigation>
</FocusScope>
</Container>
)
}
@@ -1,5 +0,0 @@
export const ANIMATION_DURATION = 3000
export const ANIMATION_DISTANCE = 300
export const FADE_OUT_THRESHOLD = 0.7
export const REACTION_SPAWN_WIDTH_RATIO = 0.2
export const INITIAL_POSITION = 200
@@ -1,26 +0,0 @@
import { useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import { useSnapshot } from 'valtio'
import { accessibilityStore } from '@/stores/accessibility'
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
import { getEmojiLabel } from '../utils'
import { Reaction } from '../types'
export const useAnnounceReaction = (latestReaction: Reaction | undefined) => {
const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const { announceReactions } = useSnapshot(accessibilityStore)
const [lastAnnouncedId, setLastAnnouncedId] = useState<string | null>(null)
const announce = useScreenReaderAnnounce()
useEffect(() => {
if (!announceReactions || !latestReaction) return
if (latestReaction.id === lastAnnouncedId) return
const emojiLabel = getEmojiLabel(latestReaction.emoji, t)
const participantName = latestReaction.participantName
announce(t('announce', { name: participantName, emoji: emojiLabel }))
setLastAnnouncedId(latestReaction.id)
}, [announce, latestReaction, lastAnnouncedId, announceReactions, t])
}
@@ -1,56 +0,0 @@
import { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { reactionsStore } from '@/stores/reactions'
import { NotificationType } from '@/features/notifications/NotificationType'
import { useNotifyParticipants } from '@/features/notifications'
import useRateLimiter from '@/hooks/useRateLimiter'
import { Participant } from 'livekit-client'
import { Emoji } from '../types'
import { ANIMATION_DURATION } from '../constants'
export const useReactions = () => {
const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const { notifyParticipants } = useNotifyParticipants()
const appendReaction = useCallback(
(emoji: Emoji, participant?: Participant) => {
const newReaction = {
id: `${emoji}-${Date.now()}-${Math.random()}`,
emoji,
participantName: participant
? participant.name || participant.identity
: t('you'),
isLocal: !participant,
}
reactionsStore.reactions.push(newReaction)
setTimeout(() => {
const index = reactionsStore.reactions.findIndex(
(r) => r.id === newReaction.id
)
if (index !== -1) reactionsStore.reactions.splice(index, 1)
}, ANIMATION_DURATION)
},
[t]
)
const sendReaction = async (emoji: Emoji) => {
appendReaction(emoji)
await notifyParticipants({
type: NotificationType.ReactionReceived,
additionalData: { data: { emoji } },
})
}
const debouncedSendReaction = useRateLimiter({
callback: sendReaction,
maxCalls: 10,
windowMs: 1000,
})
return {
sendReaction: debouncedSendReaction,
appendReaction,
}
}
@@ -1,13 +0,0 @@
import { useSnapshot } from 'valtio'
import { layoutStore } from '@/stores/layout'
export const useReactionsToolbar = () => {
const layoutSnap = useSnapshot(layoutStore)
return {
isOpen: layoutSnap.showReactionsToolbar,
toggle: () => {
layoutStore.showReactionsToolbar = !layoutSnap.showReactionsToolbar
},
}
}
@@ -1,17 +0,0 @@
export enum Emoji {
THUMBS_UP = 'thumbs-up',
THUMBS_DOWN = 'thumbs-down',
CLAP = 'clapping-hands',
HEART = 'red-heart',
LAUGHING = 'face-with-tears-of-joy',
SURPRISED = 'face-with-open-mouth',
CELEBRATION = 'party-popper',
PLEASE = 'folded-hands',
}
export interface Reaction {
id: string
emoji: Emoji
participantName: string
isLocal: boolean
}
@@ -72,8 +72,7 @@ export const RecordingDownload = () => {
if ( if (
data.status !== RecordingStatus.Saved && data.status !== RecordingStatus.Saved &&
data.status !== RecordingStatus.NotificationSucceed && data.status !== RecordingStatus.NotificationSucceed
data.status !== RecordingStatus.FailedToStop
) { ) {
return <ErrorScreen title={t('unsaved.title')} body={t('unsaved.body')} /> return <ErrorScreen title={t('unsaved.title')} body={t('unsaved.body')} />
} }
@@ -215,8 +215,8 @@ export const Conference = ({
audio={userConfig.audioEnabled} audio={userConfig.audioEnabled}
video={ video={
userConfig.videoEnabled && { userConfig.videoEnabled && {
processor: BackgroundProcessorFactory.fromProcessorConfig( processor: BackgroundProcessorFactory.deserializeProcessor(
userConfig.processorConfig userConfig.processorSerialized
), ),
} }
} }
@@ -4,15 +4,15 @@ import { css } from '@/styled-system/css'
import { Screen } from '@/layout/Screen' import { Screen } from '@/layout/Screen'
import { useEffect, useMemo, useRef, useState } from 'react' import { useEffect, useMemo, useRef, useState } from 'react'
import { import {
createLocalAudioTrack,
createLocalVideoTrack, createLocalVideoTrack,
createLocalAudioTrack,
LocalAudioTrack, LocalAudioTrack,
LocalVideoTrack, LocalVideoTrack,
Track, Track,
} from 'livekit-client' } from 'livekit-client'
import { H } from '@/primitives/H' import { H } from '@/primitives/H'
import { Field } from '@/primitives/Field' import { Field } from '@/primitives/Field'
import { Button, Dialog, Form, Text } from '@/primitives' import { Button, Dialog, Text, Form } from '@/primitives'
import { VStack } from '@/styled-system/jsx' import { VStack } from '@/styled-system/jsx'
import { Heading } from 'react-aria-components' import { Heading } from 'react-aria-components'
import { RiImageCircleAiFill } from '@remixicon/react' import { RiImageCircleAiFill } from '@remixicon/react'
@@ -44,7 +44,8 @@ const onError = (e: Error) => console.error('ERROR', e)
const Effects = ({ const Effects = ({
videoTrack, videoTrack,
}: Pick<EffectsConfigurationProps, 'videoTrack'>) => { onSubmit,
}: Pick<EffectsConfigurationProps, 'videoTrack' | 'onSubmit'>) => {
const { t } = useTranslation('rooms', { keyPrefix: 'join.effects' }) const { t } = useTranslation('rooms', { keyPrefix: 'join.effects' })
const [isDialogOpen, setIsDialogOpen] = useState(false) const [isDialogOpen, setIsDialogOpen] = useState(false)
const openDialog = () => setIsDialogOpen(true) const openDialog = () => setIsDialogOpen(true)
@@ -80,7 +81,7 @@ const Effects = ({
> >
{t('subTitle')} {t('subTitle')}
</Text> </Text>
<EffectsConfiguration videoTrack={videoTrack} /> <EffectsConfiguration videoTrack={videoTrack} onSubmit={onSubmit} />
</Dialog> </Dialog>
<Button <Button
variant="whiteCircle" variant="whiteCircle"
@@ -110,7 +111,7 @@ export const Join = ({
audioDeviceId, audioDeviceId,
audioOutputDeviceId, audioOutputDeviceId,
videoDeviceId, videoDeviceId,
processorConfig, processorSerialized,
username, username,
}, },
saveAudioInputEnabled, saveAudioInputEnabled,
@@ -119,6 +120,7 @@ export const Join = ({
saveAudioInputDeviceId, saveAudioInputDeviceId,
saveVideoInputDeviceId, saveVideoInputDeviceId,
saveUsername, saveUsername,
saveProcessorSerialized,
} = usePersistentUserChoices() } = usePersistentUserChoices()
const initialUserChoices = useRef<LocalUserChoices | null>(null) const initialUserChoices = useRef<LocalUserChoices | null>(null)
@@ -130,7 +132,7 @@ export const Join = ({
audioDeviceId, audioDeviceId,
audioOutputDeviceId, audioOutputDeviceId,
videoDeviceId, videoDeviceId,
processorConfig, processorSerialized,
username, username,
} }
} }
@@ -144,8 +146,8 @@ export const Join = ({
video: !!initialUserChoices.current && video: !!initialUserChoices.current &&
initialUserChoices.current?.videoEnabled && { initialUserChoices.current?.videoEnabled && {
deviceId: initialUserChoices.current.videoDeviceId, deviceId: initialUserChoices.current.videoDeviceId,
processor: BackgroundProcessorFactory.fromProcessorConfig( processor: BackgroundProcessorFactory.deserializeProcessor(
initialUserChoices.current.processorConfig initialUserChoices.current.processorSerialized
), ),
}, },
}, },
@@ -184,7 +186,9 @@ export const Join = ({
const track = await createLocalVideoTrack({ const track = await createLocalVideoTrack({
deviceId: { exact: videoDeviceId }, deviceId: { exact: videoDeviceId },
processor: processor:
BackgroundProcessorFactory.fromProcessorConfig(processorConfig), BackgroundProcessorFactory.deserializeProcessor(
processorSerialized
),
}) })
setDynamicVideoTrack(track) setDynamicVideoTrack(track)
} catch (error) { } catch (error) {
@@ -203,7 +207,7 @@ export const Join = ({
}, [ }, [
videoEnabled, videoEnabled,
videoDeviceId, videoDeviceId,
processorConfig, processorSerialized,
previewVideoTrack, previewVideoTrack,
dynamicVideoTrack, dynamicVideoTrack,
]) ])
@@ -686,7 +690,12 @@ export const Join = ({
zIndex: '1', zIndex: '1',
})} })}
> >
<Effects videoTrack={videoTrack} /> <Effects
videoTrack={videoTrack}
onSubmit={(processor) =>
saveProcessorSerialized(processor?.serialize())
}
/>
</div> </div>
</div> </div>
</div> </div>
@@ -32,7 +32,6 @@ export const AdminToggle = ({
aria-label={t(tooltipLabel)} aria-label={t(tooltipLabel)}
tooltip={t(tooltipLabel)} tooltip={t(tooltipLabel)}
isSelected={isAdminOpen} isSelected={isAdminOpen}
aria-expanded={isAdminOpen}
onPress={(e) => { onPress={(e) => {
toggleAdmin() toggleAdmin()
onPress?.(e) onPress?.(e)
@@ -31,8 +31,6 @@ import { FullScreenShareWarning } from './FullScreenShareWarning'
import { ParticipantName } from './ParticipantName' import { ParticipantName } from './ParticipantName'
import { getParticipantName } from '@/features/rooms/utils/getParticipantName' import { getParticipantName } from '@/features/rooms/utils/getParticipantName'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { getShortcutDescriptorById } from '@/features/shortcuts/catalog'
import { formatShortcutLabel } from '@/features/shortcuts/formatLabels'
import { KeyboardShortcutHint } from './KeyboardShortcutHint' import { KeyboardShortcutHint } from './KeyboardShortcutHint'
export function TrackRefContextIfNeeded( export function TrackRefContextIfNeeded(
@@ -239,13 +237,7 @@ export const ParticipantTile: (
)} )}
</ParticipantContextIfNeeded> </ParticipantContextIfNeeded>
</TrackRefContextIfNeeded> </TrackRefContextIfNeeded>
<KeyboardShortcutHint> <KeyboardShortcutHint>{t('toolbarHint')}</KeyboardShortcutHint>
{t('toolbarHint', {
shortcut: formatShortcutLabel(
getShortcutDescriptorById('open-shortcuts')?.shortcut
),
})}
</KeyboardShortcutHint>
</div> </div>
) )
}) })
@@ -2,17 +2,19 @@ import { createPortal } from 'react-dom'
import { useState, useEffect, useMemo } from 'react' import { useState, useEffect, useMemo } from 'react'
import { Text } from '@/primitives' import { Text } from '@/primitives'
import { css } from '@/styled-system/css' import { css } from '@/styled-system/css'
import { Participant } from 'livekit-client'
import { useTranslation } from 'react-i18next'
import { Reaction } from '@/features/rooms/livekit/components/controls/ReactionsToggle'
import { getEmojiLabel } from '@/features/rooms/livekit/utils/reactionUtils'
import { accessibilityStore } from '@/stores/accessibility'
import { useSnapshot } from 'valtio' import { useSnapshot } from 'valtio'
import { reactionsStore } from '@/stores/reactions' import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
import { useAnnounceReaction } from '../hooks/useAnnounceReaction'
import { Reaction } from '../types' export const ANIMATION_DURATION = 3000
import { export const ANIMATION_DISTANCE = 300
ANIMATION_DISTANCE, export const FADE_OUT_THRESHOLD = 0.7
ANIMATION_DURATION, export const REACTION_SPAWN_WIDTH_RATIO = 0.2
FADE_OUT_THRESHOLD, export const INITIAL_POSITION = 200
INITIAL_POSITION,
REACTION_SPAWN_WIDTH_RATIO,
} from '../constants'
interface FloatingReactionProps { interface FloatingReactionProps {
emoji: string emoji: string
@@ -77,7 +79,7 @@ export function FloatingReaction({
> >
<img <img
src={`/assets/reactions/${emoji}.png`} src={`/assets/reactions/${emoji}.png`}
alt="" alt={''}
className={css({ className={css({
height: '50px', height: '50px',
})} })}
@@ -114,7 +116,14 @@ export function FloatingReaction({
) )
} }
const ReactionPortal = ({ reaction }: { reaction: Reaction }) => { export function ReactionPortal({
emoji,
participant,
}: {
emoji: string
participant: Participant
}) {
const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const speed = useMemo(() => Math.random() * 1.5 + 0.5, []) const speed = useMemo(() => Math.random() * 1.5 + 0.5, [])
const scale = useMemo(() => Math.max(Math.random() + 0.5, 1), []) const scale = useMemo(() => Math.max(Math.random() + 0.5, 1), [])
return createPortal( return createPortal(
@@ -129,27 +138,51 @@ const ReactionPortal = ({ reaction }: { reaction: Reaction }) => {
})} })}
> >
<FloatingReaction <FloatingReaction
emoji={reaction.emoji} emoji={emoji}
speed={speed} speed={speed}
scale={scale} scale={scale}
name={reaction.participantName} name={participant?.isLocal ? t('you') : participant.name}
isLocal={reaction.isLocal} isLocal={participant?.isLocal}
/> />
</div>, </div>,
document.body document.body
) )
} }
export const ReactionPortals = () => { export const ReactionPortals = ({ reactions }: { reactions: Reaction[] }) => {
const { reactions } = useSnapshot(reactionsStore) const { t } = useTranslation('rooms', { keyPrefix: 'controls.reactions' })
const latestReaction = reactions.at(-1) const { announceReactions } = useSnapshot(accessibilityStore)
const [lastAnnouncedId, setLastAnnouncedId] = useState<number | null>(null)
const announce = useScreenReaderAnnounce()
useAnnounceReaction(latestReaction) const latestReaction =
reactions.length > 0 ? reactions[reactions.length - 1] : undefined
useEffect(() => {
if (!announceReactions) {
return
}
if (!latestReaction) return
const isNewReaction = latestReaction.id !== lastAnnouncedId
if (!isNewReaction) return
const emojiLabel = getEmojiLabel(latestReaction.emoji, t)
const participantName = latestReaction.participant?.isLocal
? t('you')
: latestReaction.participant?.name?.trim() ||
t('someone', { defaultValue: 'Someone' })
announce(t('announce', { name: participantName, emoji: emojiLabel }))
setLastAnnouncedId(latestReaction.id)
}, [announce, latestReaction, lastAnnouncedId, announceReactions, t])
return ( return (
<> <>
{reactions.map((instance) => ( {reactions.map((instance) => (
<ReactionPortal key={instance.id} reaction={instance} /> <ReactionPortal
key={instance.id}
emoji={instance.emoji}
participant={instance.participant}
/>
))} ))}
</> </>
) )
@@ -14,7 +14,6 @@ import { Admin } from './Admin'
import { Tools } from './Tools' import { Tools } from './Tools'
import { Info } from './Info' import { Info } from './Info'
import { HStack } from '@/styled-system/jsx' import { HStack } from '@/styled-system/jsx'
import { useReactionsToolbar } from '@/features/reactions/hooks/useReactionsToolbar'
type StyledSidePanelProps = { type StyledSidePanelProps = {
title: string title: string
@@ -26,7 +25,6 @@ type StyledSidePanelProps = {
isSubmenu: boolean isSubmenu: boolean
onBack: () => void onBack: () => void
backButtonLabel: string backButtonLabel: string
isReactionToolbarOpen?: boolean
} }
const StyledSidePanel = ({ const StyledSidePanel = ({
@@ -35,7 +33,6 @@ const StyledSidePanel = ({
children, children,
onClose, onClose,
isClosed, isClosed,
isReactionToolbarOpen,
closeButtonTooltip, closeButtonTooltip,
isSubmenu = false, isSubmenu = false,
onBack, onBack,
@@ -54,23 +51,17 @@ const StyledSidePanel = ({
overflow: 'hidden', overflow: 'hidden',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
margin: 'var(--sizes-room-side-panel-margin)', margin: '1.5rem 1.5rem 1.5rem 0',
marginLeft: 0,
marginBottom: 0,
padding: 0, padding: 0,
gap: 0, gap: 0,
right: 0, right: 0,
top: 0, top: 0,
width: 'var(--sizes-room-side-panel)', bottom: '80px',
width: '360px',
transition: '.5s cubic-bezier(.4,0,.2,1) 5ms', transition: '.5s cubic-bezier(.4,0,.2,1) 5ms',
})} })}
style={{ style={{
transform: isClosed transform: isClosed ? 'translateX(calc(360px + 1.5rem))' : 'none',
? 'translateX(calc(var(--sizes-room-side-panel) + var(--sizes-room-side-panel-margin)))'
: 'none',
bottom: isReactionToolbarOpen
? 'calc( var(--sizes-room-control-bar) + var(--sizes-room-reaction-toolbar-height) + calc(var(--lk-grid-gap) / 2))'
: 'var(--sizes-room-control-bar)',
}} }}
aria-hidden={isClosed} aria-hidden={isClosed}
aria-label={ariaLabel} aria-label={ariaLabel}
@@ -158,14 +149,11 @@ export const SidePanel = () => {
activeSubPanelId, activeSubPanelId,
} = useSidePanel() } = useSidePanel()
const { t } = useTranslation('rooms', { keyPrefix: 'sidePanel' }) const { t } = useTranslation('rooms', { keyPrefix: 'sidePanel' })
const title = t(`heading.${activeSubPanelId || activePanelId}`)
const { isOpen: isReactionToolbarOpen } = useReactionsToolbar()
return ( return (
<StyledSidePanel <StyledSidePanel
title={title} title={t(`heading.${activeSubPanelId || activePanelId}`)}
ariaLabel={t('ariaLabel', { title })} ariaLabel={t('ariaLabel')}
onClose={() => { onClose={() => {
layoutStore.activePanelId = null layoutStore.activePanelId = null
layoutStore.activeSubPanelId = null layoutStore.activeSubPanelId = null
@@ -175,7 +163,6 @@ export const SidePanel = () => {
})} })}
isClosed={!isSidePanelOpen} isClosed={!isSidePanelOpen}
isSubmenu={isSubPanelOpen} isSubmenu={isSubPanelOpen}
isReactionToolbarOpen={isReactionToolbarOpen}
backButtonLabel={t('backToTools')} backButtonLabel={t('backToTools')}
onBack={() => (layoutStore.activeSubPanelId = null)} onBack={() => (layoutStore.activeSubPanelId = null)}
> >
@@ -65,7 +65,7 @@ const ToolButton = ({
<div> <div>
<Text <Text
margin={false} margin={false}
as="h2" as="h3"
className={css({ className={css({
display: 'flex', display: 'flex',
gap: 0.25, gap: 0.25,
@@ -11,7 +11,11 @@ import {
TIMEOUT_TICK, TIMEOUT_TICK,
timerWorkerScript, timerWorkerScript,
} from './TimerWorker' } from './TimerWorker'
import { BackgroundProcessorInterface, ProcessorConfig, ProcessorType } from '.' import {
BackgroundProcessorInterface,
BackgroundOptions,
ProcessorType,
} from '.'
const PROCESSING_WIDTH = 256 const PROCESSING_WIDTH = 256
const PROCESSING_HEIGHT = 144 const PROCESSING_HEIGHT = 144
@@ -29,7 +33,7 @@ const DEFAULT_BLUR = '10'
* MediaStreamTrackProcessor. * MediaStreamTrackProcessor.
*/ */
export class BackgroundCustomProcessor implements BackgroundProcessorInterface { export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
options: ProcessorConfig options: BackgroundOptions
name: string name: string
processedTrack?: MediaStreamTrack | undefined processedTrack?: MediaStreamTrack | undefined
@@ -60,10 +64,15 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
type: ProcessorType type: ProcessorType
virtualBackgroundImage?: HTMLImageElement virtualBackgroundImage?: HTMLImageElement
constructor(opts: ProcessorConfig) { constructor(opts: BackgroundOptions) {
this.name = 'blur' this.name = 'blur'
this.options = opts this.options = opts
this.type = opts.type
if (this.options.blurRadius) {
this.type = ProcessorType.BLUR
} else {
this.type = ProcessorType.VIRTUAL
}
} }
static get isSupported() { static get isSupported() {
@@ -98,12 +107,6 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
} }
_initVirtualBackgroundImage() { _initVirtualBackgroundImage() {
if (this.options.type !== 'virtual') {
throw new Error(
'Virtual background is only supported for virtual background'
)
}
const needsUpdate = const needsUpdate =
this.options.imagePath && this.options.imagePath &&
this.virtualBackgroundImage && this.virtualBackgroundImage &&
@@ -115,7 +118,7 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
} }
} }
async update(opts: ProcessorConfig): Promise<void> { async update(opts: BackgroundOptions): Promise<void> {
this.options = opts this.options = opts
this._initVirtualBackgroundImage() this._initVirtualBackgroundImage()
} }
@@ -184,7 +187,7 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
0, 0,
0, 0,
PROCESSING_WIDTH, PROCESSING_WIDTH,
PROCESSING_HEIGHT PROCESSING_WIDTH
) )
} }
@@ -209,9 +212,6 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
* TODO: future improvement with WebGL. * TODO: future improvement with WebGL.
*/ */
async blur() { async blur() {
if (this.options.type !== 'blur') {
throw new Error('Blurring is only supported for blur background')
}
const mask = this.imageSegmenterResult!.categoryMask!.getAsUint8Array() const mask = this.imageSegmenterResult!.categoryMask!.getAsUint8Array()
for (let i = 0; i < mask.length; ++i) { for (let i = 0; i < mask.length; ++i) {
this.segmentationMask!.data[i * 4 + 3] = 255 - mask[i] this.segmentationMask!.data[i * 4 + 3] = 255 - mask[i]
@@ -293,7 +293,7 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
await this.sizeSource() await this.sizeSource()
await this.segment() await this.segment()
if (this.options.type === 'blur') { if (this.options.blurRadius) {
await this.blur() await this.blur()
} else { } else {
await this.drawVirtualBackground() await this.drawVirtualBackground()
@@ -354,4 +354,15 @@ export class BackgroundCustomProcessor implements BackgroundProcessorInterface {
this.timerWorker?.terminate() this.timerWorker?.terminate()
this.imageSegmenter?.close() this.imageSegmenter?.close()
} }
clone() {
return new BackgroundCustomProcessor(this.options)
}
serialize() {
return {
type: this.type,
options: this.options,
}
}
} }
@@ -332,4 +332,15 @@ export class FaceLandmarksProcessor implements TrackProcessor<Track.Kind> {
this.timerWorker?.terminate() this.timerWorker?.terminate()
this.faceLandmarker?.close() this.faceLandmarker?.close()
} }
clone() {
return new FaceLandmarksProcessor(this.options)
}
serialize() {
return {
type: this.type,
options: this.options,
}
}
} }
@@ -1,23 +1,28 @@
import { ProcessorOptions, Track } from 'livekit-client' import { ProcessorOptions, Track } from 'livekit-client'
import { import {
BackgroundBlur, BackgroundBlur,
BackgroundTransformer,
ProcessorWrapper, ProcessorWrapper,
VirtualBackground, VirtualBackground,
} from '@livekit/track-processors' } from '@livekit/track-processors'
import { ProcessorConfig, BackgroundProcessorInterface, ProcessorType } from '.' import {
BackgroundOptions,
BackgroundProcessorInterface,
ProcessorType,
} from '.'
export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInterface { export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInterface {
processor: ProcessorWrapper<{ imagePath?: string; blurRadius?: number }> processor: ProcessorWrapper<BackgroundOptions>
opts: ProcessorConfig opts: BackgroundOptions
processorType: ProcessorType processorType: ProcessorType
constructor(opts: ProcessorConfig) { constructor(opts: BackgroundOptions) {
this.opts = opts this.opts = opts
if (opts.type === 'virtual') { if (opts.imagePath) {
this.processorType = ProcessorType.VIRTUAL this.processorType = ProcessorType.VIRTUAL
this.processor = VirtualBackground(opts.imagePath) this.processor = VirtualBackground(opts.imagePath)
} else if (opts.type === 'blur') { } else if (opts.blurRadius !== undefined) {
this.processorType = ProcessorType.BLUR this.processorType = ProcessorType.BLUR
this.processor = BackgroundBlur(opts.blurRadius) this.processor = BackgroundBlur(opts.blurRadius)
} else { } else {
@@ -39,23 +44,24 @@ export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInter
return this.processor.destroy() return this.processor.destroy()
} }
async update(opts: ProcessorConfig): Promise<void> { async update(opts: BackgroundOptions): Promise<void> {
this.opts = opts const newProcessorType = opts.imagePath
? ProcessorType.VIRTUAL
const newProcessorType = : ProcessorType.BLUR
opts.type === 'virtual' ? ProcessorType.VIRTUAL : ProcessorType.BLUR
let processedOpts = opts
if (newProcessorType !== this.processorType) { if (newProcessorType !== this.processorType) {
this.processorType = newProcessorType this.processorType = newProcessorType
if (newProcessorType === ProcessorType.VIRTUAL) { if (newProcessorType === ProcessorType.VIRTUAL) {
this.processor.name = 'virtual-background' this.processor.name = 'virtual-background'
processedOpts = { ...opts, blurRadius: undefined }
} else { } else {
this.processor.name = 'background-blur' this.processor.name = 'background-blur'
processedOpts = { ...opts, imagePath: undefined }
} }
} }
await this.processor.updateTransformerOptions( await this.processor.updateTransformerOptions(processedOpts)
opts as { imagePath?: string; blurRadius?: number } this.opts = processedOpts
)
} }
get name() { get name() {
@@ -67,6 +73,17 @@ export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInter
} }
get options() { get options() {
return this.opts return (this.processor.transformer as BackgroundTransformer).options
}
clone() {
return new UnifiedBackgroundTrackProcessor(this.options || this.opts)
}
serialize() {
return {
type: this.processorType,
options: this.options,
}
} }
} }
@@ -2,7 +2,23 @@ import { ProcessorWrapper } from '@livekit/track-processors'
import { Track, TrackProcessor } from 'livekit-client' import { Track, TrackProcessor } from 'livekit-client'
import { BackgroundCustomProcessor } from './BackgroundCustomProcessor' import { BackgroundCustomProcessor } from './BackgroundCustomProcessor'
import { UnifiedBackgroundTrackProcessor } from './UnifiedBackgroundTrackProcessor' import { UnifiedBackgroundTrackProcessor } from './UnifiedBackgroundTrackProcessor'
import { FaceLandmarksOptions } from './FaceLandmarksProcessor'
export type BackgroundOptions = {
blurRadius?: number
imagePath?: string
}
export interface ProcessorSerialized {
type: ProcessorType
options: BackgroundOptions
}
export interface BackgroundProcessorInterface extends TrackProcessor<Track.Kind> {
update(opts: BackgroundOptions): Promise<void>
options: BackgroundOptions
clone(): BackgroundProcessorInterface
serialize(): ProcessorSerialized
}
export enum ProcessorType { export enum ProcessorType {
BLUR = 'blur', BLUR = 'blur',
@@ -10,16 +26,6 @@ export enum ProcessorType {
FACE_LANDMARKS = 'faceLandmarks', FACE_LANDMARKS = 'faceLandmarks',
} }
export type ProcessorConfig =
| { type: ProcessorType.BLUR; blurRadius: number }
| { type: ProcessorType.VIRTUAL; imagePath: string; fileId?: string }
| ({ type: ProcessorType.FACE_LANDMARKS } & FaceLandmarksOptions)
export interface BackgroundProcessorInterface extends TrackProcessor<Track.Kind> {
update(opts: ProcessorConfig): Promise<void>
options: ProcessorConfig
}
export class BackgroundProcessorFactory { export class BackgroundProcessorFactory {
static hasModernApiSupport() { static hasModernApiSupport() {
return ProcessorWrapper.hasModernApiSupport return ProcessorWrapper.hasModernApiSupport
@@ -30,27 +36,28 @@ export class BackgroundProcessorFactory {
} }
static getProcessor( static getProcessor(
config: ProcessorConfig type: ProcessorType,
opts: BackgroundOptions
): BackgroundProcessorInterface | undefined { ): BackgroundProcessorInterface | undefined {
const isBlur = config.type === ProcessorType.BLUR const isBlur = type === ProcessorType.BLUR
const isVirtual = config.type === ProcessorType.VIRTUAL const isVirtual = type === ProcessorType.VIRTUAL
if (!isBlur && !isVirtual) return undefined if (!isBlur && !isVirtual) return undefined
if (ProcessorWrapper.isSupported) { if (ProcessorWrapper.isSupported) {
return new UnifiedBackgroundTrackProcessor(config) return new UnifiedBackgroundTrackProcessor(opts)
} }
if (BackgroundCustomProcessor.isSupported) { if (BackgroundCustomProcessor.isSupported) {
return new BackgroundCustomProcessor(config) return new BackgroundCustomProcessor(opts)
} }
return undefined return undefined
} }
static fromProcessorConfig(data?: ProcessorConfig) { static deserializeProcessor(data?: ProcessorSerialized) {
if (data) { if (data?.type) {
return BackgroundProcessorFactory.getProcessor(data) return BackgroundProcessorFactory.getProcessor(data?.type, data?.options)
} }
return undefined return undefined
} }
@@ -37,7 +37,6 @@ export const ChatToggle = ({
aria-label={t(tooltipLabel)} aria-label={t(tooltipLabel)}
tooltip={t(tooltipLabel)} tooltip={t(tooltipLabel)}
isSelected={isChatOpen} isSelected={isChatOpen}
aria-expanded={isChatOpen}
onPress={(e) => { onPress={(e) => {
toggleChat() toggleChat()
onPress?.(e) onPress?.(e)
@@ -69,10 +69,10 @@ const SelectDevicePermissions = <T extends string | number>({
iconComponent={iconComponent} iconComponent={iconComponent}
placeholder={items.length === 0 ? t('loading') : t('select')} placeholder={items.length === 0 ? t('loading') : t('select')}
selectedKey={selectedKey} selectedKey={selectedKey}
onSelectionChange={async (key) => { onSelectionChange={(key) => {
if (key === selectedKey) return if (key === selectedKey) return
await setActiveMediaDevice(key as string)
onSubmit?.(key as string) onSubmit?.(key as string)
setActiveMediaDevice(key as string)
}} }}
{...props} {...props}
/> />
@@ -82,8 +82,8 @@ export const VideoDeviceControl = ({
* *
* See https://github.com/numerique-gouv/meet/pull/309#issuecomment-2622404121 * See https://github.com/numerique-gouv/meet/pull/309#issuecomment-2622404121
*/ */
const processor = BackgroundProcessorFactory.fromProcessorConfig( const processor = BackgroundProcessorFactory.deserializeProcessor(
userChoices.processorConfig userChoices.processorSerialized
) )
const toggle = trackProps.toggle as ( const toggle = trackProps.toggle as (
@@ -27,7 +27,6 @@ export const InfoToggle = ({
aria-label={t(tooltipLabel)} aria-label={t(tooltipLabel)}
tooltip={t(tooltipLabel)} tooltip={t(tooltipLabel)}
isSelected={isInfoOpen} isSelected={isInfoOpen}
aria-expanded={isInfoOpen}
onPress={(e) => { onPress={(e) => {
toggleInfo() toggleInfo()
onPress?.(e) onPress?.(e)
@@ -48,7 +48,6 @@ export const ParticipantsToggle = ({
count: announcedCount, count: announcedCount,
})}.`} })}.`}
isSelected={isParticipantsOpen} isSelected={isParticipantsOpen}
aria-expanded={isParticipantsOpen}
onPress={(e) => { onPress={(e) => {
toggleParticipants() toggleParticipants()
onPress?.(e) onPress?.(e)
@@ -77,7 +76,6 @@ export const ParticipantsToggle = ({
zIndex: 1, zIndex: 1,
userSelect: 'none', userSelect: 'none',
})} })}
aria-hidden={true}
> >
{numParticipants < 100 ? ( {numParticipants < 100 ? (
numParticipants || 1 numParticipants || 1

Some files were not shown because too many files have changed in this diff Show More