What a video export shows and how it is encoded, as the player's export
dialog and mix phoenix_replay.export choose it.
:fromand:to— the range of the recording, in milliseconds;nilfor its start or end:skip_idle— shorten stretches without activity to the:idleconfigured:pointer— draw the pointer; the page scrolls as recorded either way:size—:recorded, the recorded pixel ratio up to:max_dpr;:one, one pixel per CSS pixel; or:half, half of that:fps— frames per second: 15, 30 or 60:quality—:small,:balancedor:best;:balancedis the configured:crf, and the others trade it for size or detail
The defaults follow the :export configuration.
Summary
Functions
The :export configuration the options make: the frame rate, the idle
time, the pixel ratio, the quality and a :scale for the encoder.
The frame rates offered.
Reads options written by to_map/1.
The defaults the :export configuration sets.
Reads options from string params, as a form or command-line flags send
them, onto the defaults: "from" and "to" in seconds, "skip_idle",
and "pointer" as "true" or "false", "size" as
"recorded", "1x" or "half", "fps", and "quality" as "small",
"balanced" or "best". Missing params keep the defaults.
The options as a map of strings and numbers, for a job queue that stores
them as JSON, such as PhoenixReplay.Export.Queue.Oban; from_map/1
reads it back.
Types
@type quality() :: :small | :balanced | :best
@type size() :: :recorded | :one | :half
@type t() :: %PhoenixReplay.Export.Options{ fps: pos_integer(), from: non_neg_integer() | nil, pointer: boolean(), quality: quality(), size: size(), skip_idle: boolean(), to: non_neg_integer() | nil }
Functions
@spec apply(t(), PhoenixReplay.Config.export()) :: map()
The :export configuration the options make: the frame rate, the idle
time, the pixel ratio, the quality and a :scale for the encoder.
@spec frame_rates() :: [pos_integer()]
The frame rates offered.
Reads options written by to_map/1.
@spec new(PhoenixReplay.Config.export()) :: t()
The defaults the :export configuration sets.
@spec parse(map(), PhoenixReplay.Config.export()) :: {:ok, t()} | {:error, String.t()}
Reads options from string params, as a form or command-line flags send
them, onto the defaults: "from" and "to" in seconds, "skip_idle",
and "pointer" as "true" or "false", "size" as
"recorded", "1x" or "half", "fps", and "quality" as "small",
"balanced" or "best". Missing params keep the defaults.
The options as a map of strings and numbers, for a job queue that stores
them as JSON, such as PhoenixReplay.Export.Queue.Oban; from_map/1
reads it back.