Fix: Fullscreen vor Viewer-Unmount verlassen
cleanupViewer() ruft jetzt document.exitFullscreen() auf, bevor der Viewer aus dem DOM entfernt wird. Verhindert dass die Navbar nach Fullscreen-Stream verschwindet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
82f03dfa43
commit
22554db36c
1 changed files with 4 additions and 0 deletions
|
|
@ -191,6 +191,10 @@ export default function StreamingTab({ data }: { data: any }) {
|
||||||
|
|
||||||
// ── Viewer cleanup (only viewer PC, keeps broadcaster intact) ──
|
// ── Viewer cleanup (only viewer PC, keeps broadcaster intact) ──
|
||||||
const cleanupViewer = useCallback(() => {
|
const cleanupViewer = useCallback(() => {
|
||||||
|
// Exit DOM fullscreen before the viewer element is unmounted
|
||||||
|
if (document.fullscreenElement) {
|
||||||
|
document.exitFullscreen().catch(() => {});
|
||||||
|
}
|
||||||
if (viewerPcRef.current) {
|
if (viewerPcRef.current) {
|
||||||
viewerPcRef.current.close();
|
viewerPcRef.current.close();
|
||||||
viewerPcRef.current = null;
|
viewerPcRef.current = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue