# Configuration

## Runtime tools

The prototype searches the current `PATH` plus common user, Homebrew, and system locations for:

- `yt-dlp` — stream discovery and download
- `ffmpeg` and `ffprobe` — merging, remuxing, inspection, and finalization
- `deno` — JavaScript runtime used by current YouTube extraction

Change discovery rules in `code/StreamRecorder/Services/ToolchainLocator.swift`. If distributing a self-contained build, review each tool's license and update strategy before bundling executables.

## Recording preferences

The app stores three local preferences with `AppStorage`:

- recording mode: current point or available beginning
- destination directory
- browser used for YouTube cookies

Defaults and storage keys live in `code/StreamRecorder/Models/RecordingPreferences.swift`. No browser cookie contents, stream URLs, or recordings are stored in preferences.

## Browser session

The browser picker maps to `yt-dlp --cookies-from-browser`. The user must already be signed into YouTube in the selected browser. macOS or the browser may ask for permission. Supported choices are defined in `CookieBrowser.swift`.

## App identity and signing

The buyer package uses `com.example.StreamRecorder` and `com.example.StreamRecorderTests`. Replace these in both `project.yml` and the Xcode project before signing or distributing the prototype. Select your own Apple Developer team and review hardened-runtime, sandbox, entitlement, notarization, and update choices for your distribution model.

## Command behavior

Recording flags and output naming live in `YTDLPCommandBuilder.swift`. Treat changes as behavior changes: update `YTDLPCommandBuilderTests.swift`, test both recording modes, and verify final output in QuickTime.
