MailglassAdmin.Preview.Chromium (MailglassAdmin v1.5.0)

Copy Markdown View Source

Deterministic Chromium CLI wrapper for preview screenshot capture.

Summary

Types

error()

@type error() ::
  {:binary_not_found, [String.t()]}
  | {:command_failed, non_neg_integer(), String.t()}

Functions

binary_candidates()

@spec binary_candidates() :: [String.t()]

binary_env()

@spec binary_env() :: String.t()

build_args(url, output_path, width, height, virtual_time_budget)

@spec build_args(
  String.t(),
  String.t(),
  375 | 768 | 1024,
  pos_integer(),
  pos_integer()
) :: [String.t()]

capture(url, output_path, width, opts \\ [])

@spec capture(String.t(), String.t(), 375 | 768 | 1024, keyword()) ::
  :ok | {:error, error()}

discover_binary()

@spec discover_binary() :: String.t() | nil