ascii-chat
Binary v0.16.50-198-g78f51665f
Library lib/v0.3.2-2240-g78f51665f
Video chat in your terminal
Loading...
Searching...
No Matches
Application: Client

💻 Client application for connecting to servers and streaming media More...

Topics

 Cryptographic Operations
 🔐 Client-side cryptographic handshake and key management
 Terminal Display
 🖥️ Terminal rendering, TTY management, and frame output
 Client Handler
 📡 Client-side packet processing and data reception thread

Detailed Description

💻 Client application for connecting to servers and streaming media

Client connection management, media capture, display rendering, and reconnection logic.

Shared connection ownership

Migrated from docs/client-connection-lifecycle.md into the rendered Doxygen topic set.

Shared connection ownership

src/client/connection.c owns one native connection attempt, including dialing, handshake state, transport/client handle, worker pool, outbound audio queue, video encoder, audio pipeline, and protocol/snapshot state. Each retry allocates a fresh owner. Capture devices, media sources, terminal UI, and reconnect policy belong to the application and may outlive an attempt. WebSocket clients also retain one application runtime context: libwebsockets 4.5 tears down process TLS when its last context is destroyed, so an application reference keeps TLS alive across retries. It is released after the final connection and application media cleanup. See the upstream TLS destructor.

Startup moves from STARTING to RUNNING. Acquisition failures, peer disconnects, and application shutdown all leave through client_connection_destroy(). Startup records initialized synchronization objects separately from workers so partial queue initialization also unwinds. No "all workers started" flag gates cleanup.

The reusable state machine lives in src/common/session/connection.c. It owns startup/stop state and the controlling-thread boundary, and enforces interruption, joining, then release. Mode adapters supply resource-specific operations. Native client attempts, discovery participants, and discovery WebRTC media workers all use that sequence. Discovery still coordinates signaling, host control, media transport switching, and host migration.

Workers, ACIP callbacks, and crypto negotiation receive their connection context explicitly. There is no current-connection singleton or thread-local replacement. Each attempt holds its own crypto callbacks and user data. Multiple owners can coexist on one thread or in one program. Application media devices, capture, and display are borrowed explicitly; applications must provide distinct resources when running independent media sessions. The CLI still runs one interactive session. Signal handlers publish exit/resize requests without walking owners.

Shutdown publishes STOPPING, interrupts network I/O without taking the send mutex, and wakes the audio sender before joining workers. Worker join failure retains the owner and all dependencies; the controlling thread keeps waiting before allowing application cleanup or reconnect. Queue synchronization, encoders, audio pipeline, and crypto state are released only after their users stop. The embedded connection handle remains the sole transport/client owner throughout startup and teardown.

The audio device context persists, but its pipeline and buffered samples are reset for each connection. Snapshot teardown interrupts I/O before joining capture. The former encoder flush allocated and logged buffered output without transmitting it; teardown no longer runs that operation concurrently with capture.

Validation

Build with the default Debug preset and run:

uv run --frozen python -m pytest tests/python/tests/integration/client_connection --ascii-chat-binary build/bin/ascii-chat
uv run --frozen python -m pytest tests/python/tests/integration/network/test_server_client_lifecycle.py --ascii-chat-binary build/bin/ascii-chat
uv run --frozen python -m pytest tests/python/tests/integration/network --ascii-chat-binary build/bin/ascii-chat

Use ascii-chat.exe on Windows. The new suite also registers as the Debug CTest client-connection-lifecycle. It injects failures after 13 acquisition stages, repeats partial-startup failures in one process, reconnects one live client three times over both TCP and WebSocket, and races abrupt peer loss with local interrupt. It verifies each attempt releases its workers and a fresh attempt starts with empty protocol state. These cases use test video and software test audio with playback disabled, exercising the audio pipeline, capture, and sender without webcam or audio hardware.

ASCII_CHAT_TEST_CLIENT_FAIL_STAGE selects an acquisition checkpoint in Debug builds only. It has no effect in release builds.

The Catch2-free session-connections test runs two live TCP owners with blocked receive workers, stops one while checking that the other keeps receiving, injects a failed join, checks controlling-thread cleanup, and unwinds partial startup. participant-media exercises discovery participant failures, repeated media lifecycles, transport transfer, recovery, and host-control preservation. discovery-session-process covers production discovery state transitions. Discovery media teardown also retains its stack dependencies until worker joins succeed; NAT-worker join failures retain the discovery session for a safe retry.

Client Application

The client is a composition of shared runtimes rather than a collection of protocol-specific send threads. Options select media and endpoint behavior; the session owns producers and the network connection; the TUI presents snapshots.

Layers

  • src/client/ orchestrates client mode and media producers.
  • lib/network/ owns connections, transports, ACIP packets, negotiation, and backpressure.
  • lib/media/, audio, and video modules capture/decode/encode media.
  • lib/tui/ and lib/ui/ present live state and handle interaction.

Flow

  1. Parse options and initialize platform/media capabilities.
  2. Establish and authenticate one network_connection_t.
  3. Start capture/audio producers after the connection is ready.
  4. Send through type-specific ACIP helpers and the shared scheduler.
  5. Decode incoming ACIP media into playback/render snapshots.
  6. Stop producers, close the connection, and restore the terminal in order.

Ownership rules

The connection owns its transport and handshake state. Producers own capture buffers until the send API returns; queued transports retain their own copies. Borrowed receive payloads are valid only during the packet callback. Client mode must not add a socket loop, global send mutex, or unbounded media queue.

See also
topic_client_main
topic_client_connection
topic_client_capture
topic_client_audio

Client Audio

Client audio uses the common audio and ACIP layers. Capture produces PCM or encoded audio batches; playback consumes received batches through audio ring/jitter buffers and the platform output backend.

Capture and send

The capture path negotiates sample format, rate, and channels with the active backend. It sends with acip_send_audio_batch(), the Opus helpers, or another type-specific ACIP API through network_connection_transport(). It does not call the removed send_packet_to_server() API.

Playback

Incoming audio is validated by ACIP handlers, converted to the local channel layout when necessary, and written to a bounded ring buffer. The output callback reads from that buffer and fills underruns with silence. Realtime callbacks must not allocate, log, block, or perform network work.

Visualizations

The shared visualization encoder applies the configured palette, color mode, and foreground, background, or half-block rendering before frames reach the browser.

Waveform and FFT visualizations consume the selected audio source and are controlled by TUI shortcuts. They are presentation consumers, not a second capture or transport path.

See also
topic_audio
topic_mixer
topic_client_connection

Media Capture

Capture is a producer in the session pipeline. It obtains frames from the configured media input, applies the active image/codec path, and sends through the client connection's ACIP transport. It does not own a socket or framing loop.

Sources

Inputs may be webcams, files, network media, test patterns, or other FFmpeg sources selected by the options layer. Capability probing and negotiated dimensions/FPS belong to the media input and encoder; capture code must not assume a camera exists.

Sending

Encoded video is handed to the transport through ACIP client send helpers. The shared scheduler applies bounded admission and can drop disposable visual media under pressure while preserving control traffic. Producers must honor returned errors and stop cleanly during shutdown.

Modes

Snapshot and test-pattern modes support automation and systems without camera hardware. Recording occurs in the media pipeline before terminal presentation and is independent of TUI visibility.

See also
topic_client_connection
topic_av
src/client/capture.c

Client Connection

The client owns one network_connection_t. Connection selection and setup are shared with server and discovery code; client-specific behavior is supplied through network_connection_callbacks_t and ACIP handlers.

Establishment

network_connection_establish() opens the endpoint, prepares the selected transport, performs client negotiation, and marks the connection ready. network_connection_open() selects TCP, WebSocket, QUIC, or another registered backend from the endpoint form. The returned connection owns its transport and handshake state.

Transport boundary

Obtain delivery with network_connection_transport(). Send media and control through type-specific ACIP helpers such as acip_send_image_frame(), acip_send_audio_batch(), and acip_send_ping(). The shared outbound scheduler handles admission, ordering, encryption, and backpressure. Client code must not write a socket or create a second packet-send queue.

Callbacks and ownership

Connection callbacks run serially outside backend event loops. Packet payloads are borrowed until the packet callback returns. open installs client state; closing stops producers; closed releases state after callbacks and transport users drain. An open failure still receives cleanup callbacks.

Shutdown and reconnect

Request stop with network_connection_request_stop(), stop capture/audio producers, let the controlling worker finish, and then destroy the connection. Reconnect creates a new connection and repeats TLS/ACIP negotiation; old transport state, queues, and replay state are not reused.

See also
topic_network
topic_client_main
include/ascii-chat/network/connection.h

Connection Keepalive

Keepalive uses the shared ACIP control path. It sends acip_send_ping() on the connection transport and records matching pong packets through protocol handlers. It does not write directly to a client socket.

Deadlines

Connection establishment, partial-packet, idle, and cancellation deadlines belong to the connection/backend. Keepalive observes those states and requests shutdown or reconnect when the session is no longer usable; it must not add an independent blocking receive loop.

Shutdown

A timeout stops media producers first, requests the connection worker to stop, and lets the normal closing/closed callbacks release state. Reconnect starts a fresh transport and handshake rather than reusing a stale timer or queue.

See also
topic_client_connection
topic_network

Client Lifecycle

The client entry point assembles options, platform/media subsystems, the presentation layer, and one shared network connection. It coordinates these owners; packet framing and backend I/O belong to the network runtime.

Startup

Startup parses options, initializes logging and platform services, prepares capture/audio as requested, starts terminal presentation when interactive, and establishes the endpoint. network_connection_establish() performs backend selection and ACIP negotiation before producers publish.

Running session

Capture, audio, keepalive, and UI producers run independently. They publish through subsystem APIs and the connection's acip_transport_t; they do not coordinate by sharing a raw socket. The TUI consumes snapshots separately.

Reconnect

A recoverable transport loss stops producers, drains the old connection, and creates a new connection with fresh transport and security state. Fatal configuration, authentication, protocol, or cancellation errors exit instead of being silently retried.

Shutdown

SIGINT only requests exit. The owner stops producers, joins workers, retires live TUI screens, restores the terminal, destroys the connection, and releases media/platform resources in dependency order.

See also
topic_client_connection
topic_tui
topic_network

Open media during a session

Migrated from docs/live-media-input.md into the rendered Doxygen topic set.

Open media during a session

In native mirror, client, and discovery sessions:

  • Press o (or Ctrl+O) to open an editable path/URL prompt.
  • Paste a URL or drop a file into the terminal to prefill that prompt.
  • Press v to prefill it from the clipboard, including a file copied in Explorer or Finder.
  • Press Enter to load the source or Escape to cancel.

The current source stays active while the replacement loads. A failed load retains the previous source. The centered editor and loading panel share the animated rainbow splash header. The loading panel remains until the new frame is ready, so the old source never flashes back after submission. Escape cancels a pending load; an external URL extractor may need to finish before another load can begin. Once loaded, Space pauses playback, the left and right arrow keys seek, and [** switches between media and the webcam. **<** and **> open the previous/next artifact from the beginning. At the ends of the list they do nothing. Finishing an artifact automatically opens the next; –loop repeats a file-only playlist after the final artifact. Network URLs cannot be looped because the resolver treats them as live sources.

Drop additional files into the open prompt to append quoted paths on separate lines. Explorer's trailing separator space is removed, leaving the cursor directly after the closing quote. Enter plays the complete list in order.

The prompt accepts local paths, quoted paths, shell-escaped spaces, local file:// URIs, and URLs supported by the existing FFmpeg/yt-dlp resolver. Pasted content is never executed as a shell command.

Bracketed paste is the reliable automatic path. Some terminals insert dropped paths as ordinary keystrokes; complete path-shaped bursts are recognized too. When a terminal splits those keystrokes across reads, press o before dropping the file so every character goes into the prompt instead of session shortcuts.

Windows reads Unicode text and copied-file lists. macOS uses the system pasteboard. Linux uses wl-paste from wl-clipboard or xclip, including text/uri-list file selections. Clipboard access happens only when v is pressed. Multiple copied files become the same ordered playlist.

CLI input uses the same playlist model. Repeat –file and –url in playback order, including a mixture of both:

ascii-chat mirror --file "first video.mp4" --url "https://example.com/second.webm" --file "third.mp4"

More useful playlist shapes:

# Start with a local clip, then continue with a live stream.
ascii-chat mirror --file "intro.mp4" --url "https://example.com/live.m3u8"
# A quoted Windows path and a file:// URI are both treated as local media.
ascii-chat mirror --file 'C:\Videos\team demo.mp4' --file 'file:///tmp/outro.webm'
# Read one media stream from a pipe. Stdin must be the only playlist item.
ffmpeg -i camera.mkv -f matroska - | ascii-chat mirror --file -
# Keep the complete playlist cycling after the final item.
ascii-chat mirror --file intro.mp4 --file main.mp4 --file credits.mp4 --loop

A playlist supports up to 64 artifacts, each up to 255 UTF-8 bytes; the interactive editor accepts up to 8191 bytes of quoted text. Stdin (--file -) must be the only artifact. A failed replacement preserves the current source. The final artifact stays visible when playback ends. Snapshots and recording keep their configured session duration; skipping always opens a new decoder at the beginning.

Live input is polled independently of ASCII conversion. The FPS overlay counts newly acquired and successfully presented frames, including identical images; retained/paused redraws do not count.

Regression checks

Run the native playlist smoke test against the rebuilt binary:

uv run --frozen python tests/integration/media_playlist.py --binary build/bin/ascii-chat.exe --artifacts build/playlist-smoke
uv run --frozen python tests/integration/media_responsiveness.py --binary build/bin/ascii-chat.exe --artifacts build/pattern-response
uv run --frozen python tests/integration/media_responsiveness.py --binary build/bin/ascii-chat.exe --webcam --artifacts build/webcam-response

Each responsiveness run renders for two minutes before measuring three open-prompt responses, with a 250 ms limit. The playlist test checks the rendered keyboard help, rainbow panels, cursor position, repeated drops, sequential EOF playback, looping, and previous/next restart behavior. These scripts require Python pyte, FFmpeg, and pexpect on POSIX; Pillow optionally saves terminal screenshots.

On Windows, media_audio_continuity.py additionally requires NumPy and PyAudioWPatch. Pass --binary, --Media, and --artifacts to compare actual speaker loopback against an FFmpeg-decoded reference. Captured audio stays in the local artifact directory.

To trace native frame freshness and verify the FPS overlay on every complete terminal update, run:

uv run --frozen python tests/integration/live_frame_latency.py --binary build/bin/ascii-chat.exe --webcam --with-audio --duration 125 --check-input --artifacts build/live-frame-latency
uv run --frozen python tests/integration/live_frame_latency.py --binary build/bin/ascii-chat.exe --webcam --fps 5 --duration 15 --artifacts build/throttled-camera
uv run --frozen python tests/integration/frame_presentation.py --binary build/bin/ascii-chat.exe --artifacts build/frame-presentation

The first check also measures o responsiveness after sustained rendering. The throttled run checks that the camera backend discards queued old samples instead of replaying them. On Windows, CAMERA_FRAME logs include backlog relative to the fastest delivery and the driver timestamp's frame age when the driver supplies it (device_age_ms=-1 means unavailable). LIVE_FRAME separates acquisition, queue wait, conversion, and publication; FRAME_PRESENT measures submission through completed terminal output. These software timings do not measure monitor scanout or the camera's exposure time.

Native terminal backpressure and frame tracing

A completed stdout write does not mean a terminal frontend has displayed it. On a large terminal, each truecolor frame can be hundreds of KB. Sending the next frame as soon as Windows accepts the previous one lets a frontend accumulate old frames even when the C capture and presentation queues keep only the latest frame.

The native presenter sends an OSC 11 read-only color query after a fresh media frame. When the terminal supports this query, its reply establishes that the frontend has consumed the preceding output. Only one frame can await a reply; capture continues and replaces the latest mailbox snapshot while presentation waits. Input and modal screens remain responsive during that wait. FPS counts completed, acknowledged fresh frames; retained redraws never count. Terminals that do not answer the initial probe fall back to completed local writes.

The counter's seven cells on the first row are reserved during every media write. This keeps it visible while a terminal without synchronized output support draws parts of a frame, rather than erasing it and restoring it only after the art ends.

With --log-level debug --log-file PATH, each frame now records acquisition and copy timing (CAMERA_FRAME, CAMERA_COPY), pipeline read/queue/conversion and publication (LIVE_FRAME), and completed output (FRAME_PRESENT, including capture_to_stdout_ms, geometry, composition, write, drain, dimensions and bytes). TERMINAL_ACK separately records frontend response and capture-to-frontend age. These measurements do not claim to measure monitor scanout.

The FPS check now uses a 286 by 73 terminal and checks intermediate 4 KB chunks, as well as complete frames and toggle-off behavior. The frontend emulator replies after parsing output, so its own rendering speed applies backpressure too:

uv run --frozen python tests/integration/frame_presentation.py --binary build/bin/ascii-chat.exe --artifacts build/frame-presentation
uv run --frozen python tests/integration/terminal_backpressure.py --binary build/bin/ascii-chat.exe --artifacts build/terminal-backpressure

The backpressure regression delays replies, holds one for 800 ms, verifies that no additional media frame is queued, checks responsive open-prompt input during the hold, and asserts that the FPS count follows actual completed presentations.

Timing a native webcam preview

For performance measurements, use an optimized build with symbols. The default Debug configuration deliberately disables optimization and inlining; it is useful for sanitizer checks, but adds significant cost to per-cell ANSI generation.

cmake --preset default -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --target ascii-chat
build/bin/ascii-chat.exe --log-level debug --log-file build/frame-timings.log mirror --fps-counter
uv run --frozen python tests/integration/frame_timing_report.py build/frame-timings.log

Keep the terminal frontend, viewport size, render mode, color mode, and machine load consistent when comparing runs. Measure the actual frontend, rather than substituting a hidden console or timing writes to a file. Compile before starting the measurement.

ASCII_STAGE separates allocation, resize, glyph/ANSI generation, and padding. FRAME_PRESENT includes the number of output chunks and the longest chunk's write time. The presenter combines the frontend query with the synchronized update's closing write; a supported frontend's reply replaces the redundant local console flush. Each media payload write is bounded to 64 KB so input can supersede an update between chunks.

The report retains the original capture-request-to-terminal measurement. It also joins frame IDs with camera sample timestamps to report sample-arrival-to-terminal age and, where available, camera-device-timestamp-to-terminal age. The latter includes the device age reported by Media Foundation. Unknown device timestamps are excluded. The coverage entry shows the capture interval retained in the log; check it because automatic log rotation can discard the start of a long run. These boundaries distinguish waiting for the next capture from processing a captured sample; none measures monitor scanout or independently verifies the camera's physical exposure timestamp.

Recording session audio and ASCII video

Migrated from docs/recording.md into the rendered Doxygen topic set.

Recording session audio and ASCII video

--render-file recording.mp4 records the session's ASCII video and its audio mix in client, discovery, and mirror modes. Mirror is a solo session: it records local audio without playing the microphone back through the speakers.

Local capture and media playback follow --audio-capture-source:

  • auto: file/URL audio when available, otherwise the microphone.
  • mic: the microphone.
  • Media: file/URL audio.
  • both: microphone and file/URL audio mixed together.

Network sessions also record received participant audio. Speaker playback remains separate from recording, so recording does not consume playback or outgoing audio buffers. Local file audio plays through the speakers in mirror mode; in a call it is sent to other participants and included in the recording.

When --file or --url contains only audio, the selected webcam supplies the video. The webcam is opened when capture starts, rather than during metadata probing. The file retains its usual pause, seek, and loop controls. Without a usable webcam, capture reports an error identifying the selected camera.

Examples:

ascii-chat mirror --render-file solo.mp4
ascii-chat mirror --file music.wav --render-file music-with-webcam.mp4
ascii-chat client localhost --file clip.mp4 --render-file call.mp4
ascii-chat client localhost --file music.wav --audio-capture-source both --render-file call.mp4

A few practical variations:

# Record a local webcam preview with the default audio policy.
ascii-chat mirror --render-file webcam-session.mp4
# Record a test pattern without camera or microphone hardware.
ascii-chat mirror --test-pattern --audio=false --render-file pattern.mp4
# Record a remote call while also playing a local media source.
ascii-chat client localhost --file backing-track.mp3 --audio-capture-source both \
--render-file call-with-track.mp4
# Produce a terminal-readable snapshot instead of a video file.
ascii-chat mirror --file clip.mp4 --snapshot --snapshot-delay 0 > first-frame.txt

Video containers such as MP4 and WebM support audio. Still images and GIF do not.

Use --render-font default, --render-font matrix, or an absolute font-file path to select the font for pixel output. Existing relative font files are accepted too. Explicit font-file failures stop rendering with an error rather than silently substituting the bundled default. Family-name aliases retain the platform's normal font-resolution policy.

Apple HVF fonts (OpenType/TrueType containers with hvgl outlines) require FreeType 2.15 or newer built with HVF enabled, plus macOS 15.4 or iOS 18.4 or newer at runtime. Apple builds report the FreeType capability at configuration time; source builds use FreeType 2.15. Older FreeType packages or SDKs still support ordinary fonts and reject unsupported HVF input at runtime. The iOS dependency can be cross-built with Xcode's Clang and a recent iOS SDK while retaining an older deployment target; HVF remains unavailable on older OS versions. Windows, Linux, and browser builds do not support Apple HVF fonts and report unsupported font formats. Ordinary TrueType/OpenType fonts and the bundled fonts remain available on all platforms.

Audio is mixed at 48 kHz mono and clipped after summing inputs. Temporary missing samples become silence, and subsequent samples resume normally. Live video uses elapsed session time across source changes and pauses. Stdin conversion retains frame-count timing.

The recording regression tests include PCM mixing, microphone and file worker paths, independent playback/transmission queues, audio-only webcam selection, mixed encoded audio, encoder-tail flushing, and live frame timing. A separate mirror and two-client test checks the file tone in mirror output, both input tones in each call output, and A/V synchronization:

uv run --frozen python -m pytest tests/python/tests/integration/recording --ascii-chat-binary build/bin/ascii-chat

Media transition behavior

All native client, discovery and mirror sessions use the shared capture/display pipeline. Browser mirror, client and discovery share useSessionRecording, LocalRecording and the AudioPipeline recording bus. Committed source changes do not create a new recording or reset its session clock.

Input / transition Native sessions Browser sessions MCP render_file
Webcam + microphone Elapsed-time video; selected capture audio plus received audio Displayed ASCII canvas; enabled local inputs plus received audio One bounded render invocation; no live source controls
Local file / URL Shared FFmpeg/resolver and playlist loader; failed/cancelled replacement keeps prior source Media element capture feeds the stable recording bus; failed audio tap replacement retains the old tap until finalization Uses the native render path and reports tool/render errors
Audio-only file / URL Webcam supplies video; file pause/seek still applies File loader currently requires a decodable video track; audio-only file import remains unsupported Native fallback requires a camera unless a waveform/FFT visualization is selected
Test pattern / waveform / FFT Elapsed session clock, including switching to media with a different FPS Same displayed canvas and enabled audio graph as other sources Only sources exposed by the tool schema; no interactive switching
Pause Retained video continues recording without advancing capture freshness; media audio is silent Canvas remains visible and recording clock runs; media element pause silences its tap No interactive pause control
Seek Decoder position changes; recording timestamps remain monotonic Retains the element tap and encoder; dynamic audio tracks reconnect to the same bus Initial seek, where exposed, uses native options
Successful source change Loader commits video/audio together; recording stays open Canvas dimensions stay fixed for export; audio graph changes independently of the encoder Separate invocations produce separate outputs
Failure / cancellation Loader rollback retains current source; teardown drains accepted recording frames and finalizes encoder Failed capture/start releases owned resources; disconnect invalidates pending starts and finalizes active recording; unmount discards export Bounded invocation cleanup; no persistent recording owner

Paused native recordings emit the last raster until recording ends, even if playback never resumes. Their frame freshness counter remains unchanged. At normal file EOF, native file recording still finalizes rather than extending the last frame indefinitely. Stdin retains its frame-count conversion semantics. Browser pause/seek preserves the stable destination audio track so changing file tracks does not end the encoder. A repeated source notification for the same media element does not recapture or stop its tracks.

Browser exports remain bounded to ten minutes / 128 MiB, with a ten-second finalization watchdog. Encoder failure produces an error rather than a partial download; a subsequent recording starts with fresh failure state. Browser source controls and native capture policy are distinct host adapters around their shared session APIs; MCP is a bounded render tool, not a live session controller.

Focused regression coverage:

  • pytest tests/python/tests/integration/recording --ascii-chat-binary BINARY --recording-transitions-only: hardware-free paused-file finalization, synthetic A/V duration and playlist source switching with both tones retained in one recording.
  • tests/standalone/media/capture_open_test.c: retained paused recording frames, seek while paused, unchanged freshness, and existing load rollback/cancellation.
  • web/web/tests/network/audio-pipeline.test.ts: stable file tap through pause, seek, dynamic audio track replacement and failed replacement rollback.
  • web/web/tests/hooks/session-recording.test.tsx: disconnect/reconnect during preparation cannot resurrect a stale recording start.
  • web/web/tests/recording/local-recording.test.ts: final chunks, watchdog, cancellation, limits and recovery after encoder failure.

Hardware-specific camera availability, public URL extraction, and real browser codec output require their existing platform/browser smoke tests; synthetic unit fixtures do not establish those claims.