diff --git a/README.md b/README.md index 9716b8f7..33e66886 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,9 @@ By default the app will be available at . The Stream URL is the URL of the [server](#run-server) which defaults to . +> [!NOTE] +> To run the UI on HTTPS (necessary for webcam functionality), use `npm run dev:https`. You'll need to accept the self-signed certificate in your browser. + ## Limitations At the moment, a workflow must fufill the following requirements: diff --git a/ui/.gitignore b/ui/.gitignore index 26b002aa..b6cd43c6 100644 --- a/ui/.gitignore +++ b/ui/.gitignore @@ -38,3 +38,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +certificates \ No newline at end of file diff --git a/ui/package.json b/ui/package.json index c0c31afb..2c8abb91 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "dev": "next dev", + "dev:https": "next dev --experimental-https", "build": "next build", "start": "next start", "lint": "next lint" diff --git a/ui/src/app/globals.css b/ui/src/app/globals.css index a23ac26b..6005f3be 100644 --- a/ui/src/app/globals.css +++ b/ui/src/app/globals.css @@ -6,6 +6,24 @@ body { font-family: Arial, Helvetica, sans-serif; } +/** + * Prevents iOS Safari from zooming in on focus. + * + * iOS automatically zooms inputs if text is smaller than 16px. + * This enforces `text-base` (16px) on affected elements only on iOS. + */ +@supports (-webkit-touch-callout: none) { + /* Apply the fix to standard text inputs */ + .u-ios-text-base { + @apply text-base; + } + + /* Apply the fix to file input text */ + .u-ios-file-text-base::file-selector-button { + font-size: 16px !important; + } +} + @layer base { :root { --background: 0 0% 100%; diff --git a/ui/src/components/room.tsx b/ui/src/components/room.tsx index 8231128a..6737cea5 100644 --- a/ui/src/components/room.tsx +++ b/ui/src/components/room.tsx @@ -154,7 +154,11 @@ function Stage({ connected, onStreamReady }: StageProps) { ); } -export function Room() { +/** + * Creates a room component for the user to stream their webcam to ComfyStream and + * see the output stream. + */ +export const Room = () => { const [connect, setConnect] = useState(false); const [isConnected, setIsConnected] = useState(false); const [isStreamSettingsOpen, setIsStreamSettingsOpen] = @@ -229,15 +233,16 @@ export function Room() { onDisconnected={handleDisconnected} localStream={localStream} > -
-
- {/* Output Stream */} -
+
+
+ {/* Output stream */} +
-
+ {/* Thumbnail (mobile) */} +
- {/* Input Stream */} + {/* Input stream (desktop) */}
); -} +}; diff --git a/ui/src/components/ui/input.tsx b/ui/src/components/ui/input.tsx index a921025c..919ebfb3 100644 --- a/ui/src/components/ui/input.tsx +++ b/ui/src/components/ui/input.tsx @@ -11,7 +11,7 @@ const Input = React.forwardRef(