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

the wip placeholder was temporary, set a descriptive name.

Co-authored-by: Cyril <c.gromoff@gmail.com>
This commit is contained in:
lebaudantoine
2026-05-21 22:39:12 +02:00
committed by aleb_the_flash
parent 4830ea5673
commit 60828ed895
5 changed files with 20 additions and 6 deletions
@@ -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(() => {
+2 -1
View File
@@ -238,7 +238,8 @@
"bringBack": "Anruf hierher zurückholen"
},
"stage": "Teilnehmer",
"controlBar": "Besprechungssteuerung"
"controlBar": "Besprechungssteuerung",
"title": "Bild-im-Bild Besprechung"
},
"options": {
"buttonLabel": "Weitere Optionen",
+2 -1
View File
@@ -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",
+2 -1
View File
@@ -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",
+2 -1
View File
@@ -238,7 +238,8 @@
"bringBack": "Gesprek hier terughalen"
},
"stage": "Deelnemers",
"controlBar": "Vergaderbesturing"
"controlBar": "Vergaderbesturing",
"title": "Beeld-in-beeld vergadering"
},
"options": {
"buttonLabel": "Meer opties",