Whether the live tab-audio stream is available — the channel sets this true when the server confirms
it is pushing audio. Drives whether the speaker toggle renders in the live-view bar.
Whether tab audio is currently muted. Two-way: the channel sets the initial value (un-muted when audio starts) and the toggle updates it; AudioMutedChange relays each user change to the channel, which mutes/unmutes the player.
Emits the new muted state each time the user toggles the speaker (two-way AudioMuted).
The current page URL reported by the server, or null when none.
Snapshot fetcher supplied by the channel plugin (closes over the session id + provider).
Selection fetcher for copy-out, supplied by the channel plugin (closes over the session id + provider).
On a local copy / Cmd+C over the live canvas the surface calls this to read the remote page's
selection, then writes it to the local clipboard. Best-effort: when unset or it resolves to '', the
copy is a no-op (the local clipboard is left untouched).
Whether at least one pushed screencast frame has been painted (drives the canvas placeholder).
Emits each human-takeover input (pointer move/click, key) the user performs on the live canvas.
The current screenshot as a data: URL, or null before the first snapshot arrives.
True when takeover is both enabled AND on the canvas path — drives the cursor + "driving" pill.
Whether at least one screenshot OR frame has been rendered (drives the "Live" indicator).
Whether HUMAN TAKEOVER is enabled — the user watching the live view can click/type into the page and
those events are relayed into the server browser (Collaborative control). Takeover only attaches to the
canvas render path (pushed screencast); the <img> poll fallback stays view-only. When enabled while
already streaming the setter attaches listeners; flipping it off (or streaming off) detaches them.
True while the user is actively driving the remote browser with the keyboard — the takeover canvas holds focus. The host overlay reads this to stand down its own global keyboard shortcuts (e.g. T-to-type opening the local composer) so keystrokes go to the remote page, not the local input.
Whether the server is PUSHING live screencast frames for this session (the backend advertised the
ScreenStreaming capability and the start succeeded). When true the surface paints pushed frames
onto its <canvas> via RenderFrame and does NOT poll; when false it uses the snapshot
<img> poll fallback. Set by the channel plugin in BindSurface from the start-screencast result.
The start-screencast result is async, so this may flip to true AFTER ngOnInit has already begun
polling — the setter tears the poll down in that case so the two render paths never run at once.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
Paints one PUSHED screencast frame (base64 JPEG) onto the canvas. Called by the channel plugin for
each frame the server pushes while Streaming. Coalesces a burst of frames to one paint per
animation frame (the newest wins) so a fast stream never floods the main thread, and reuses a single
Image decode target to avoid per-frame allocation. No-op after destroy or when not in streaming mode.
The frame image as raw base64 JPEG (no data: prefix).
Updates the URL shown above the live view. In streaming (canvas) mode the snapshot poll is stopped, so the channel pushes the current URL here after a navigation/action reports one — otherwise the bar would stay stuck on "No page loaded yet" even though the page is live. No-op for an unchanged / empty value.
The current page URL, or null/empty to leave the bar unchanged.
Toggles the speaker mute state and relays it to the channel (which mutes/unmutes the audio player).
LIVE REMOTE-BROWSER surface (
mj-realtime-remote-browser-surface) — the Browser channel tab's pane. It renders the SERVER-hosted browser the agent drives: a refreshing screenshot<img>with the current URL above it and a small "live" indicator. The agent'sbrowser_*tools mutate the page through the channel plugin; this surface only PERCEIVES it, polling its Fetch callback every SNAPSHOT_POLL_MS ms while bound.The surface is transport-agnostic — it never touches GraphQL directly. The channel plugin wires the Fetch callback (closing over the session id + provider) in
BindSurfacebefore the surface's first change detection, so thengOnInitpoll has it. Polling stops inngOnDestroy(pane collapsed / overlay torn down) so no traffic continues after unbind. View-only in v1 — there is no takeover input.Two render paths: pushed screencast (preferred) vs. snapshot poll (fallback)
When the backend advertises the
ScreenStreamingcapability, the server PUSHES encoded CDP frames and the channel plugin sets Streaming =true. In that mode the surface paints each frame onto a<canvas>via RenderFrame and DOES NOT start the poll. When streaming is off (capability absent or start failed) the original behavior is unchanged: the surface polls Fetch every SNAPSHOT_POLL_MS ms and renders the screenshot<img>.