mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-26 11:58:53 +00:00
🩹(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:
committed by
aleb_the_flash
parent
4830ea5673
commit
60828ed895
@@ -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(() => {
|
||||
|
||||
@@ -238,7 +238,8 @@
|
||||
"bringBack": "Anruf hierher zurückholen"
|
||||
},
|
||||
"stage": "Teilnehmer",
|
||||
"controlBar": "Besprechungssteuerung"
|
||||
"controlBar": "Besprechungssteuerung",
|
||||
"title": "Bild-im-Bild Besprechung"
|
||||
},
|
||||
"options": {
|
||||
"buttonLabel": "Weitere Optionen",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -238,7 +238,8 @@
|
||||
"bringBack": "Gesprek hier terughalen"
|
||||
},
|
||||
"stage": "Deelnemers",
|
||||
"controlBar": "Vergaderbesturing"
|
||||
"controlBar": "Vergaderbesturing",
|
||||
"title": "Beeld-in-beeld vergadering"
|
||||
},
|
||||
"options": {
|
||||
"buttonLabel": "Meer opties",
|
||||
|
||||
Reference in New Issue
Block a user