Merge pull request #36 from ibs0d/codex/partially-revert-liveplayer.tsx-changes

Revert LivePlayer transform wrapper regression in live view
This commit is contained in:
ibs0d 2026-03-09 13:57:29 +11:00 committed by GitHub
commit 1dcea2638a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 42 deletions

View File

@ -51,11 +51,6 @@ type LivePlayerProps = {
setFullResolution?: React.Dispatch<React.SetStateAction<VideoResolutionType>>;
onError?: (error: LivePlayerError) => void;
onResetLiveMode?: () => void;
contentTransform?: {
scale: number;
positionX: number;
positionY: number;
};
};
export default function LivePlayer({
@ -81,7 +76,6 @@ export default function LivePlayer({
setFullResolution,
onError,
onResetLiveMode,
contentTransform,
}: LivePlayerProps) {
const { t } = useTranslation(["components/player"]);
@ -377,39 +371,27 @@ export default function LivePlayer({
lowerClassName="md:rounded-2xl"
/>
)}
<div
className="absolute inset-0"
style={
contentTransform
? {
transform: `translate(${contentTransform.positionX}px, ${contentTransform.positionY}px) scale(${contentTransform.scale})`,
transformOrigin: "0 0",
}
: undefined
}
>
{player}
{player}
<div
className={cn(
"absolute inset-0 w-full",
showStillWithoutActivity &&
!liveReady &&
!isReEnabling &&
cameraEnabled
? "visible"
: "invisible",
)}
>
<AutoUpdatingCameraImage
className="pointer-events-none size-full"
cameraClasses="relative size-full flex justify-center"
camera={cameraConfig.name}
showFps={false}
reloadInterval={stillReloadInterval}
periodicCache
/>
</div>
<div
className={cn(
"absolute inset-0 w-full",
showStillWithoutActivity &&
!liveReady &&
!isReEnabling &&
cameraEnabled
? "visible"
: "invisible",
)}
>
<AutoUpdatingCameraImage
className="pointer-events-none size-full"
cameraClasses="relative size-full flex justify-center"
camera={cameraConfig.name}
showFps={false}
reloadInterval={stillReloadInterval}
periodicCache
/>
</div>
{cameraEnabled &&

View File

@ -435,7 +435,7 @@ export default function DraggableGridLayout({
const [audioStates, setAudioStates] = useState<AudioState>({});
const [volumeStates, setVolumeStates] = useState<VolumeState>({});
const [statsStates, setStatsStates] = useState<StatsState>({});
const [cameraZoomStates, setCameraZoomStates] = useState<
const [_cameraZoomStates, setCameraZoomStates] = useState<
Record<string, CameraZoomRuntimeTransform>
>({});
const cameraZoomViewportRefs = useRef<Record<string, HTMLDivElement | null>>(
@ -779,8 +779,6 @@ export default function DraggableGridLayout({
const useWebGL =
currentGroupStreamingSettings?.[camera.name]
?.compatibilityMode || false;
const zoomTransform =
cameraZoomStates[camera.name] ?? getDefaultZoomTransform();
return (
<GridLiveContextMenu
className="size-full"
@ -837,7 +835,6 @@ export default function DraggableGridLayout({
alwaysShowCameraName={displayCameraNames}
useWebGL={useWebGL}
cameraRef={cameraRef}
contentTransform={zoomTransform}
className={cn(
"draggable-live-grid-mse-cover size-full rounded-lg bg-black md:rounded-2xl",
camera.ui?.rotate &&