Skip to content

armgit / clipy

Public Imported from GitHub
0

The AI-native screen recorder. Record your screen and talk; the people you share it with and your AI agents both get it.

621 B
Raw Blame
import type { WebcamLayoutDto, WebcamShapeDto, WebcamSizeDto } from "./bridge";

/** Square and Medium are the bubble's defaults, and these must agree with
 *  `WebcamShapeDto`/`WebcamSizeDto`'s `#[default]` on the Rust side — these
 *  are only the value a view holds before saved settings arrive. */
export const DEFAULT_WEBCAM_SHAPE = "square" as const;
export const DEFAULT_WEBCAM_SIZE: WebcamSizeDto = "medium";

export function webcamShapeForLayout(
  layout: WebcamLayoutDto,
  shape: WebcamShapeDto = DEFAULT_WEBCAM_SHAPE,
): WebcamShapeDto | "rectangle" {
  return layout === "bubble" ? shape : "rectangle";
}