fix(playback): keep settings compact beside the picture
Ordinary screen playback settings previously expanded to nearly the whole narrow viewport. Use the existing anchored-popover height budget and usable-space threshold so the panel prefers the space below the controls and switches sides when needed. Chrome 156 at 320, 390 and 1280 px verifies touch and keyboard access to the bottom action, sticky close, focus restoration and resumed playback. The narrow panel height falls from 828 to 360 px in the 390 px control. No new surface or device-specific branch.
This commit is contained in:
1 parent
6a7962bca9
commit
bd47a2e89e
1 file changed
+1
-1
@@ -482,7 +482,7 @@ export function ChannelVideo({ stream, owned, localSource, sourcePaused = false,
|
||||
const playbackRef = useMemo(() => ({ current: activeVideo }), [activeVideo]);
|
||||
const picture = usePictureInPicture(playbackRef);
|
||||
const previewPlayback = useHostPreviewPlayback(playbackRef, owned ? displayed?.stream ?? null : null, previewAutoPause, localSource);
|
||||
useAnchoredPopover(pictureTrigger, picturePanel, { side: "above", align: "center" });
|
||||
useAnchoredPopover(pictureTrigger, picturePanel, { align: "center", maxHeight: 360, minVisibleHeight: 240 });
|
||||
useLayoutEffect(() => { if (presentation === "background") picturePanel.current?.hidePopover(); }, [presentation]);
|
||||
const visibility = usePlaybackControlsVisibility(playbackRef, controls, blocked || !ready);
|
||||
const register = useCallback((input: ChannelScreenInput, element: HTMLVideoElement | null) => {
|
||||
|
||||
Reference in new issue
Block a user