{/* Camera Preview */}
- {/* Always show the video element if we have a stream, regardless of isPreviewActive */}
- {stream ? (
+ {camera.type === "phone" ? (
+ /* Phone Camera - Show Stream if Active, Otherwise QR Code */
+
+ {phoneStream && phoneStream.isActive ? (
+ /* Live Phone Stream */
+ <>
+

+
+
+ ๐ฑ Phone Stream
+
+ >
+ ) : (
+ /* QR Code Display */
+
+ {camera.session_id ? (
+
+ ) : (
+
+
+
+ Phone Camera
+
+
+ Generating QR code...
+
+
+ )}
+
+
+
+ )}
+
+ ) : stream ? (
+ /* Regular Camera Stream */
<>
>
) : (
+ /* No Stream Available */
Preview not available
@@ -683,8 +993,23 @@ const CameraPreview: React.FC = ({
- Type: {camera.type} | Device: {camera.device_id?.substring(0, 10)}...
+ Type: {camera.type} |{" "}
+ {camera.type === "phone" && camera.session_id ? (
+ <>Session: {camera.session_id.substring(0, 12)}...>
+ ) : (
+ <>Device: {camera.device_id?.substring(0, 10)}...>
+ )}
+
+ {/* Phone Camera URL Display */}
+ {camera.type === "phone" && camera.session_id && (
+
+
Phone URL:
+
+ {generatePhoneUrl(camera)}
+
+
+ )}