Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🩹(frontend) set a proper page title on pip window

lebaudantoine60828ed89598
diff --git a/src/frontend/src/features/pip/hooks/usePictureInPicture.ts b/src/frontend/src/features/pip/hooks/usePictureInPicture.ts
index 313d21d0..68a31055 100644
--- a/src/frontend/src/features/pip/hooks/usePictureInPicture.ts
+++ b/src/frontend/src/features/pip/hooks/usePictureInPicture.ts
@@ -1,11 +1,15 @@
import { ref, useSnapshot } from 'valtio'
import { useCallback, useMemo } from 'react'
import { documentPictureInPictureStore } from '@/stores/documentPictureInPicture'
+import { useTranslation } from 'react-i18next'
export const IS_PIP_SUPPORTED =
typeof globalThis !== 'undefined' && 'documentPictureInPicture' in globalThis
export const usePictureInPicture = () => {
+ const { t } = useTranslation('rooms', {
+ keyPrefix: 'pictureInPicture',
+ })
const { window: pipWindowRef } = useSnapshot(documentPictureInPictureStore)
const isOpen = useMemo(() => {
@@ -63,7 +67,7 @@ export const usePictureInPicture = () => {
height,
})
- initializeTitleAndLanguage(pipWindow, 'wip')
+ initializeTitleAndLanguage(pipWindow, t('title'))
initializePortalContainer(pipWindow)
syncStyles(pipWindow)
@@ -83,7 +87,13 @@ export const usePictureInPicture = () => {
return null
}
},
- [initializePortalContainer, initializeTitleAndLanguage, isOpen, syncStyles]
+ [
+ initializePortalContainer,
+ initializeTitleAndLanguage,
+ isOpen,
+ syncStyles,
+ t,
+ ]
)
const close = useCallback(() => {
diff --git a/src/frontend/src/locales/de/rooms.json b/src/frontend/src/locales/de/rooms.json
index ea8b6454..c41d67a8 100644
--- a/src/frontend/src/locales/de/rooms.json
+++ b/src/frontend/src/locales/de/rooms.json
@@ -238,7 +238,8 @@
"bringBack": "Anruf hierher zurückholen"
},
"stage": "Teilnehmer",
- "controlBar": "Besprechungssteuerung"
+ "controlBar": "Besprechungssteuerung",
+ "title": "Bild-im-Bild Besprechung"
},
"options": {
"buttonLabel": "Weitere Optionen",
diff --git a/src/frontend/src/locales/en/rooms.json b/src/frontend/src/locales/en/rooms.json
index 17afa83e..a6bfdb08 100644
--- a/src/frontend/src/locales/en/rooms.json
+++ b/src/frontend/src/locales/en/rooms.json
@@ -238,7 +238,8 @@
"bringBack": "Bring the call back here"
},
"stage": "Participants",
- "controlBar": "Meeting controls"
+ "controlBar": "Meeting controls",
+ "title": "Picture-in-picture meeting"
},
"options": {
"buttonLabel": "More Options",
diff --git a/src/frontend/src/locales/fr/rooms.json b/src/frontend/src/locales/fr/rooms.json
index f408c50f..23af150a 100644
--- a/src/frontend/src/locales/fr/rooms.json
+++ b/src/frontend/src/locales/fr/rooms.json
@@ -238,7 +238,8 @@
"bringBack": "Ramener l'appel ici"
},
"stage": "Participants",
- "controlBar": "Commandes de la réunion"
+ "controlBar": "Commandes de la réunion",
+ "title": "Réunion en image dans l'image"
},
"options": {
"buttonLabel": "Plus d'options",
diff --git a/src/frontend/src/locales/nl/rooms.json b/src/frontend/src/locales/nl/rooms.json
index aaa9f9d7..5f99e106 100644
--- a/src/frontend/src/locales/nl/rooms.json
+++ b/src/frontend/src/locales/nl/rooms.json
@@ -238,7 +238,8 @@
"bringBack": "Gesprek hier terughalen"
},
"stage": "Deelnemers",
- "controlBar": "Vergaderbesturing"
+ "controlBar": "Vergaderbesturing",
+ "title": "Beeld-in-beeld vergadering"
},
"options": {
"buttonLabel": "Meer opties",