metro/live/live_recorder
library
Classes
-
AdbRecorder
-
Records Android with
adb shell screenrecord, which stops by itself
after three minutes.
-
LiveCue
-
A step caption in a recording.
-
LiveProcess
-
A program a recorder started, such as
simctl io recordVideo.
-
LiveProcesses
-
Runs the programs a recording needs:
xcrun, adb, scrcpy and
ffmpeg.
-
LiveRecorder
-
Records the screen of the device an app runs on.
-
LiveRecording
-
One playbook run being recorded: starts the recorder, timestamps the
run's events, and saves the video with ffmpeg.
-
LiveRecordingSaved
-
What a finished recording saved.
-
ScrcpyRecorder
-
Records Android with
scrcpy, which has no time limit and records the
app's sound on Android 11 and later.
-
SimctlRecorder
-
Records the iOS Simulator with
xcrun simctl io recordVideo.
Functions
-
adbSerials(String output)
→ List<String>
-
The serials of the devices
adb devices lists as ready.
-
bootedSimulatorsNamed(String name, String json)
→ List<String>
-
The UDIDs of the booted simulators called
name, from the JSON of
simctl list devices booted -j.
-
findLiveRecorder(LiveApp app, {required String projectRoot, LiveProcesses processes = const LiveProcesses()})
→ Future<LiveRecorder>
-
Finds a recorder for the device
app runs on.
-
liveChapters(List<LiveCue> cues, Duration length)
→ String
-
The
cues as an ffmpeg metadata file of chapters, the last one running
to length.
-
liveGifArguments(String input, String output, {required Duration length})
→ List<String>
-
The ffmpeg arguments that turn the recorder's
input into a GIF at
output, 480 pixels wide at 15 fps, lasting exactly length.
-
liveMp4Arguments(String input, String output, {required Duration length, String? chapters})
→ List<String>
-
The ffmpeg arguments that turn the recorder's
input into an .mp4 at
output: H.264 at a steady 60 fps, which editors and browsers play, with
the chapters metadata file when there is one.
-
liveRecordingPath({required String root, required List<String> names, required String device, required DateTime at, String? requested, String? deviceId, bool several = false})
→ String
-
Where a recording of
names on device is saved.
-
liveWebVtt(List<LiveCue> cues)
→ String
-
The
cues as a WebVTT captions file.
-
readAndroidApplicationId(String projectRoot)
→ String?
-
The
applicationId in the project's android/app/build.gradle(.kts), or
null when there isn't one.
-
screenrecordSize(String wmSize)
→ String?
-
The
--size for screenrecord on a screen wm size describes as
wmSize, or null to record it as it is.
-
simulatorHasStatusBarOverrides(ProcessResult result)
→ bool
-
Whether
simctl status_bar <udid> list printed any overrides.