## Problem and outcome / 问题与结果 Piik's media settings were coupled to a small preset list, and using native App capture on a Site required a separate launcher mode. This release separates numeric media requests from presets and bounded runtime admission, remembers successfully applied settings, and lets a running App serve an explicitly approved Site independently of Local/public room startup. The same phase repairs confirmed capture-retirement, ICE discovery, media-recovery and storage failures. P2P-first routing, one room authority and the existing Browser/Native media owners remain. This phase targets **v2.0.0** with incompatible Web/App contracts. The owner authorized publication after final acceptance; the verified package and deployment records own delivery completion. ## Release notes ### 中文 Piik 2.0 扩展了画质设置,简化了 App 与站点的连接,并集中修复采集和断线恢复问题。**本次升级调整了通信协议,App 与所用站点需要一起升级。** #### 新功能与改进 - **自定义画面设置:** 保留三档推荐预设,支持填写分辨率上限、1–240 帧的帧率上限和 0.1–240 Mbps 的视频码率上限。滑动条沿用常用范围,更高数值可直接填写并显示为“自定义”。帧率范围随画幅变化,可请求 1080p240、1440p144、4K60 和超宽画面;输出保留来源比例。 - **自定义音频质量:** 在原有三档音频预设之外,可填写 6–320 kbps 的来源音频码率上限。 - **双端 App 协同连接:** 启用增强 NAT 穿透后,适用的重试可协调双方 App 准备 UDP 连接;首次连接仍走普通 ICE,不适用时继续现有流程。已通过受控网络验证,实际连通性仍取决于双方网络。 - **记住分享设置:** 下次打开时恢复已应用的画面与音频质量。仅用浏览器时按站点保存;通过新版 App 使用时,更换临时公网邀请网址也能保留设置。 - **更直接地连接 App:** 启动页提供本地房间和公网邀请,首次默认选择公网邀请。使用已有站点时,保持 App 运行,在站点点击 **App** 并确认授权即可。App 打开的本地房主页自动获得授权,站点按钮会显示 App 就绪状态。启动页可查看或取消授权;从另一个站点连接并批准,会替换原授权。 - **置顶聊天窗口:** 支持的桌面浏览器可将聊天移入独立置顶窗口,保留当前消息、草稿和阅读位置;关闭窗口后回到原页面。 #### 修复 - **连接与恢复:** 完善备用 STUN 与 NAT 采样信息的处理;重新收集 ICE 候选时刷新网卡地址。修正观众重连的机会计数、本机媒体连接恢复,以及恢复后遗留的发送队列和带宽统计问题。保留视频编码对应的标准重传能力,改善网络地址变化后的画面恢复。 - **采集稳定性:** 修正 Windows 停止采集或预览时的异步资源释放问题,保留采集边框偏好,更快跳过无法正常输出的编码器。采集与应用音频能力按实际接口探测,不再按 Windows 版本号排除;修正 Linux Portal 来源识别和早期采集失败通知,改善摄像头与原生采集的画面比例处理。 - **状态与清理:** 房间失效时及时释放 App 连接和待完成的选源请求;本地或公网房间启动失败时,App 保持待机并保留其他已授权站点的连接;公网邀请启动失败保留底层错误。修正启动页旧查询覆盖新设置的问题,并限制原生连接准备的待完成任务。SFU 诊断区分房主发布和观众接收状态。 - **其他维护:** 收到尚不支持的表情时跳过该效果;修正 SQLite 写入失败后的事务恢复。Gitee 镜像可独立重试,官网交互、指南和依赖同步更新。App 连接失败时提供重试与下载入口;统一选源设置与自定义数值的反馈。减少重复的随机短语,仅在持续等待时定时轮换。 #### 升级须知 **2.0 与 1.x 不能混用。** 自建站点请更新 Server 和连接该站点的 App,并刷新所有分享与观看页面。本地房间或公网邀请用户请停止分享、关闭旧 App,完整解压新版程序包后重新发送邀请链接。 本次不变更房间数据库结构。重启会中断正在进行的分享;麦克风、采集权限和设备选择不会自动恢复。4K60 等设置是输出上限,实际清晰度与帧率取决于来源、设备和网络。macOS/Linux 采集及部分移动设备仍需更多实机反馈。 ### English Piik 2.0 adds more control over sharing quality, simplifies connecting the App to a Site, and fixes capture and connection-recovery failures. **The communication contracts change in this release: update the App and its Site together.** #### Highlights - **Custom picture settings:** Keep the three recommended presets or enter a resolution ceiling, a 1–240 fps limit and a 0.1–240 Mbps video bitrate limit. Sliders retain their familiar ranges; higher entered values are clearly marked as custom. Frame-rate limits depend on picture size, admitting requests such as 1080p240, 1440p144, 4K60 and ultrawide pictures while preserving source proportions. - **Custom audio quality:** Enter a 6–320 kbps source-audio bitrate limit alongside the three existing audio presets. - **Coordinated App connections:** With enhanced NAT traversal enabled, eligible retries can coordinate UDP preparation between two Apps. The first attempt remains ordinary ICE, and ineligible preparation continues through the existing path. Controlled network checks pass; real-world connectivity still depends on both networks. - **Remember sharing settings:** Restore successfully applied picture and audio quality next time. Browser-only use saves settings per site; an updated App can retain them across changing temporary public-invitation addresses. - **Connect the App from a Site:** The launcher offers Local room and Public invite, with Public invite selected on first use. For an existing Site, keep the App running, click **App** on the Site and confirm its authorization. Host pages opened locally by App are authorized automatically, and the Site button reflects verified App readiness. View or revoke approval in the launcher. Connecting and approving another Site replaces the previous approval. - **Always-on-top chat:** Supported desktop browsers can move chat into a separate always-on-top window while retaining messages, drafts and reading position. Closing the window returns chat to the page. #### Fixes - **Connections and recovery:** Improve fallback STUN discovery and NAT survey handling, and refresh interface addresses during ICE gathering. Fix Viewer recovery-opportunity accounting, local media-connection recovery, stale send queues and bandwidth accounting after recovery. Preserve standard video retransmission when selecting a codec to improve picture recovery after network-address changes. - **Capture stability:** Fix asynchronous Windows resource retirement after capture or preview ends, retain the capture-border preference, and reject non-performing encoder candidates earlier. Detect capture and process-audio support through actual APIs rather than Windows-version gates. Correct Linux Portal target identification and early capture-failure delivery; improve source-aspect handling for camera and native capture. - **State and cleanup:** Release App connections and pending source selection when room authority ends. Keep the App on standby and preserve other authorized Site connections when interactive Local/public room startup fails. Retain underlying public-invitation startup errors. Prevent stale launcher reads from replacing newer settings, bound pending native connection-preparation work, and distinguish Host publication from Viewer reception in SFU diagnostics. - **Maintenance:** Skip unsupported incoming reaction effects, recover SQLite transactions after write failures, and retry Gitee mirroring independently. Update website interactions, guides and dependencies; clarify App connection recovery, source-selection settings and custom-value feedback. Reduce repeated playful captions, with timed rotation reserved for ongoing waits. #### Upgrading **2.0 and 1.x cannot be mixed.** For a hosted Site, update its Server and connected Apps, then refresh every Host and Viewer page. For Local rooms or Public invites, stop sharing, close the old App, extract the complete new package and send a fresh invitation. The room database schema is unchanged. Restarting interrupts active shares; microphone activation, capture permission and device selection are not restored automatically. Settings such as 4K60 are output ceilings: actual resolution and frame rate depend on the source, device and network. macOS/Linux capture and some mobile devices still need more physical-device feedback. ## Verification / 验证 - Product candidate: `24a28738241b9012c0476386356a515aab21f1a5`, built as `v2.0.0`. [Final full candidate CI](https://github.com/TNTcraftHIM/Piik/actions/runs/38555494851) covers core validation, vulnerabilities, races, five App packages and both Server/container targets without publishing. Later commits extend race coverage, correct the capture test fixture's inherited Go race-exit delay, and update documentation/staged website screenshots; shipped product code is unchanged. [Additional control/loopback race checks](https://github.com/TNTcraftHIM/Piik/actions/runs/38561191343) use that updated collector. Product shutdown deadlines and test assertions are unchanged. - Local Web acceptance passes **91 files / 1,612 tests**, type checking and production build. Full Go/native checks, Windows capture compilation, five-repeat control regressions, website/documentation build and repository checks pass. Existing documentation-size and bundle-size warnings remain visible. - The Windows candidate's original descriptor, revision and SHA-256 are checked before extraction and packaged Local/control acceptance. All candidate packages pass the release publisher's read-only identity/checksum verification. - Serial Windows native H.264 Host acceptance passes live/paused/custom/4K settings, background/source recovery and stop/re-share. VP8 two-room SFU and H.264 SFU-only checks pass live quality/audio changes, subscription/page-reload recovery and retirement; stopping one room preserves the other room's media. Browser-to-App fanout and App-exit fallback also pass. Gates clean their processes, profiles and listeners. These checks do not establish sustained game/4K performance. - The final network run passes **37 cases and six negative controls**, with **32 actual media outcomes and five unavailable observations**. It covers all Browser/App pairings, IPv6, remapping, STUN backup, outages, quality recovery, healthy siblings and SFU policies. Sequential-NAT App/App preparation delivers media; a mixed sequential case also connects in this run, without a claim of deterministic benefit. Fault controls reject absent faults/frozen video and verify cancellation/cleanup. No public success percentage is inferred. - Twenty Viewer topology acceptance delivers increasing decoded frames to all Viewers, preserves the two-copy bound and recovers from relay loss. Invitation privacy checks find no grant leakage in requests, cookies, persistent storage or logs. Both are bounded synthetic-source checks, not public-network endurance. - Current UI checks cover Chinese/English/visual, both themes and 320/360/768/1366-pixel layouts, numeric limits, source selection, App approval/revocation, architecture downloads and reader navigation. Chat/PiP retains draft/history/scroll and returns to the page on close; retirement and refused opening clean up. Real Host/Viewer UI chat continues after capture stops and while the Host is absent. Film controls, mute/seek/end/replay, mobile containment and pointer-close unloading pass. README stills and the staged launcher now use current navigation. Scoped axe checks report no violations; contrast and physical assistive-technology coverage are not certified. - Physical macOS/Linux capture, limited decoders, mixed HDR displays, mobile permissions and sustained game/4K use retain their [evidence limits](https://github.com/TNTcraftHIM/Piik/blob/ci/gitee-mirror/docs/verification-status.md). Unmatched field reports remain open. Gitee activation and public-domain checks are publication postflight; original v1.9.2 artifact/mirror recovery already passed without remote writes. ## Boundaries and contributor credit / 边界与贡献 The candidate uses Browser/server v24 and Native control v10; capture v7 and SQLite schema 2 are unchanged. Numeric wire values remain separate from codec/allocation admission. H.264/VP8, framework-owned adaptation and automatic P2P-first routing remain; this candidate adds neither codecs, room voice, end-to-end HDR, surround audio nor Magicsock. Local controls confirm specific repairs, not the causes of unmatched user reports or a measured increase in NAT success rate. The STUN report in #471 remains subject to paired endpoint/network evidence. Gitee's separate workflow activation still needs post-merge verification; its original-artifact and anonymous-download path has passed against v1.9.2. The Linux Portal fix from @AkazaAkali in #470 is incorporated with original commit authorship and the co-author trailer below. #462 and #469 propose higher audio rates and 4K; neither patch is merged. Their preset-expansion implementation is superseded by the independently established numeric-media contract, so overlapping functionality alone does not warrant merging or co-authorship. #475 identifies the Linux desktop entry’s missing terminal controls; that defect is independently corrected without accepting tray or Browser-owned process-exit additions. The settings request in #460 is implemented; issue/PR closure remains part of release follow-up. Co-authored-by: AkazaAkalin <478080766@qq.com>
27 KiB
Native App Lifecycle
- Reviewed: 2026-09-17
- Scope: Windows capture idle/border semantics, native loopback input isolation, and Browser visibility of an unexpected App disconnect.
- Status: quiet-source, preview-queue and App-crash checks pass. The owner confirmed Windows 10 monitor sharing resolved; game-specific window replacement is not established by the quiet-source checks.
Current Evidence
An idle WGC source is not a capture-end signal. Source/target closure, control session loss and individual edge failures have separate owners. A Viewer may need a keyframe from the retained image while a source remains unchanged.
Source previews use the same serial control connection as share startup. A
virtual-time reproduction with three three-second previews made the real
NativeClient.startShare() time out at eight seconds, before its handler ran
at nine seconds. The picker now sends one preview at a time, cancels unsent
work when its source view is retired, and waits for the remaining preview before
starting native media. Refresh and App replacement fence old results.
Browser Local-Network Consent
Chromium local-network access
can hold a public site's loopback fetch until the user answers a browser prompt.
Its split-permission implementation
exposes loopback-network, with the older local-network-access name retained
for browsers using a combined permission. An unsupported permission query is
unknown, not denial. A loopback page can report prompt even though its
loopback-to-loopback request needs no consent.
Fresh-profile Windows/Chrome 152 checks confirmed a real prompt, successful discovery after granting access, and source-list recovery by refreshing after the discovery deadline. Optional Viewer discovery consults the permission before waiting; later grants can be used by later connections without replacing healthy Browser media. These checks do not identify the original missing-window reporter's cause or establish other browsers' permission behavior.
Viewer Control Retirement
A denied Viewer page can stay mounted or enter the Browser's back/forward cache. Chromium 152 retained its App control socket after invitation revocation; repeated entry eventually exhausted the App's two control slots and used Browser reception instead. The Viewer room owner now releases control on access loss and rejects discovery that completes after retirement. A rendered optional-transport fixture retained the denied pages across four invitation generations: each new generation used Native reception with changing decoded pixels, old grants remained rejected, and revocation cleared media resources. This is local synthetic-media evidence; it does not establish physical network or all Browser navigation behavior.
Scope Decisions
- Keep one strict loopback wire and one-share/one-session fence.
- Recovery does not choose a different capture target, codec or media route.
- Do not add a tunnel watchdog, local-process authentication scheme, custom quality score, or compatibility alias in this phase.
The loopback identifier boundary is now aligned at 8-256 bytes, and the link gate is included in TypeScript checking. Evidence wording distinguishes scripted package gates from physical-device gates. The possible cloudflared orphan and the intentionally per-user local trust boundary remain separate decisions; no runtime change for either is claimed here.
Implemented Boundary
- Windows capture treats a quiet frame pool as idle. It retains one latest converted frame and emits it only when an explicit recovery keyframe request arrives; source-close and target-process signals remain the end conditions.
- Native Pion candidate input is syntax-checked with the existing ICE parser, bounded before queuing, and discarded when malformed, stale, or over capacity. Repeated answers for an edge are idempotent. Profile updates remain fenced to that same share session in the current loopback v9 wire.
- An unexpected Browser control-socket close now notifies the active Host owner; intentional user cleanup remains silent and uses the existing share fence.
Physical Evidence
- On 2026-09-04, a blank Windows Notepad window was selected as a native source.
The capture process stayed alive beyond seven seconds without a new source
change, grew from 7,664 to 16,095 output bytes after a
Krequest, and then exited cleanly. This validates the quiet-source and retained-frame path on the current Windows host; it does not claim a cross-version Windows matrix. - The same day, the local Native Host gate started a real Host/Viewer share, terminated the App process, and observed the Host return to its start-share control within the bounded gate. Browser, capture, server, ports, and profile cleanup all passed.
- On 2026-09-05, a Windows 11 build 26200 display-source check produced 91 hardware-H.264 frames at the 720p30 profile and exited normally. A separate source-window check stayed alive through 7.02 seconds without frames while minimized, then produced 17 frames within 540 ms of restoration. All owned processes, ports and profiles were cleaned up. Neither check establishes the reported Windows 10 monitor-start failure or game HWND recreation as fixed.
- On 2026-09-08, the current multi-output Windows VP8 Host gate captured only its own animated Chrome window. Live presets, paused changes, minimize/change resolution/restore/another change, and source replacement preserved the Viewer's media object. Closing the actual source ended the share; restarting delivered 30 new Viewer frames. Server-accepted Native quality evidence and process/port/profile cleanup passed. The gate's stale Node JSON-log assertion was corrected to the current Go text format, without changing evidence eligibility. This is not H264 overload, Win10, or game-window replacement evidence. The same owned-window sequence subsequently passed H264. Further physical runs use the serialized plan in TODO.
The multi-output Windows worker initially reapplied the source's frame-rate limit from each worker's first input timestamp. With jitter and a later worker start, this second limiter could reject frames already admitted by capture. Captured inputs now carry their existing cadence bound; a worker limits only when it needs a lower rate. Received encoded input has no such bound and keeps its output limiter. No capture ceiling, media clock or quality setting changed. In the same owned-window H264 720p15 SFU gate, the reported Native output went from 12 fps before this correction to 15 fps after it. Both runs decoded 300 720p frames, applied a live 480p change and cleaned up. This is a local cadence comparison, not a claim about hardware overload or all games.
Open Capture Reports
The Windows 10 report concerns selecting one entire monitor; application/window
capture, including fullscreen games, works. CreateForMonitor supports Windows
10 1903 and later; the current single-HMONITOR call, identity checks and
CreateFreeThreaded setup match the documented API. No missing general permission
request has been established. Community reports of disabled capture services or
invalid display contexts are leads, not a diagnosis of this user's machine.
Projected WinRT exceptions now reach the existing capture-error boundary instead
of escaping std::exception; that correction alone does not prove startup fixed.
On 2026-09-09, the owner confirmed whole-display sharing works and closed this
report. That field confirmation does not establish which earlier correction or
environment change resolved it; no further workaround is justified by this report.
The original converter always fitted the captured pixel aspect into the output:
1280x960 into 1920x1080 yielded 1440x1080 content and 240-pixel side bars, even
when Windows explicitly stretched that desktop source onto a 1920x1080 target.
The Windows adapter now reads the active QueryDisplayConfig path and applies
its target aspect only for explicit STRETCHED, a unique display path, exact
source/frame dimensions, and display or physical full-client-area capture.
Rotation changes the target aspect, not the orientation of already-oriented WGC
pixels. Output profile dimensions and the one-encode media path are unchanged.
Display metadata refreshes on source geometry changes and existing periodic keyframes, without another timer or display-setting writes. Unknown/custom scaling, ambiguous cloned outputs and normal windows keep captured aspect. This does not prove fidelity to monitor-side scaling or vendor-private game panel-fit/MPO transforms: those may not appear in desktop display-path metadata. The CPU geometry check covers stretch, ordinary aspect, rotation and already- scaled input; the reported game's physical comparison remains acceptance work.
Windows explicitly permits a capture item to close when its application silently replaces the underlying window. Reattaching to another window is not equivalent to resuming the same selected target; this remains separate from the verified quiet/minimized-source behavior.
The 2026-09-08 owner clarification names CS2, fullscreen 4:3 stretched: leave the game, change advanced share settings, then return; the share ends on return. The ordinary-window gate does not reproduce exclusive-fullscreen/display-mode changes. Capture replacement overlap, target identity and device state remain separate hypotheses until that exact transition is observed.
Later that day, the Windows 11 candidate ran the actual installed CS2 in fullscreen 1920x1440. The desktop changed from 2560x1440 while the game was minimized to 1920x1440 after return. Two real HostPage pending updates returned to the game after 1,703 ms and 1,545 ms: H264 1080p30 to 720p30 and back. The Viewer received both actual sizes, retained its media object, and the game kept its HWND/process generation. The current candidate did not reproduce the reported interruption in this menu-level sequence. Game settings were restored byte-for-byte and all owned processes, ports and Browser profiles closed. An additional prolonged-background case failed to keep CS2 minimized before the settings action, so it is not a passed or failed capture check. Vendor-side stretch fidelity, in-match execution and the affected machine remain unverified.
The end-to-end review did confirm a separate presentation defect: share termination during a pending update cleared its token but retained the advanced draft. A restart used the last applied settings while controls could show the failed draft. Cleanup now restores the applied settings through the existing commit helper; no new state or recovery mechanism was added. This alone is not claimed as the cause of CS2 capture termination.
The later owner-supplied cbdd751 CS2 diagnostic bundle records three 720p30
update requests, all rejected while the existing 1080p30 share remains live.
It contains no successful 720p commit or explicit rollback-to-1080 request.
The Browser's failed-request rollback explains its controls returning to the
committed profile, but the original generic error does not identify which
preparation step failed or explain the reported brief Viewer-size change.
Current diagnostics add fixed preparation rejection stages without changing
capture recovery policy. Do not label the affected-device report resolved.
The matched 0675265 local reproduction then held CS2 minimized continuously
for 8.6 seconds during a 720p request. Preparation failed with wait-timeout
after 5,015 ms and controls reverted; the Viewer retained 1080p and its media
object. The identical request succeeded in 438 ms after restoring the game.
The affected machine's subsequent bundle independently records eleven update
timeouts, three successes and one cancellation caused by share termination.
This establishes a quiet-source/readiness error in the live-update path, not
an old setting request overwriting a successfully installed replacement.
On 2026-09-09, matched cbb3d77 passed the corrected path through actual Windows
Graphics Capture and Browser playback. An owned source stopped repainting and
remained minimized for 8,378 ms: the 720p request stayed pending while the Viewer
retained 1080p. Restoring the source delivered 720p in 1,868 ms; the next 1080p
request delivered in 480 ms, retaining the media object. Both updates succeeded;
all processes, ports and Browser profiles closed. This closes the reproduced
quiet-source timeout defect. CS2 foreground automation did not complete that
same post-fix sequence, so this does not establish game-specific display-mode
or HWND replacement behavior.
That same bundle also contains two independent adaptive-output capture
failures at H264 1440p60, one without a settings update in progress. A controlled
1440p60/12 Mbps high-entropy input produced a valid 1,609,216-byte keyframe and
reproduced the one-MiB capture-envelope rejection. The MFT and RTP access-unit
owners already permit four MiB. Aligning capture readers/writers removes that
false fatal rejection, but does not by itself establish delivery: the separate
500-packet forwarding/pacing bound also loses that large recovery frame. Both
boundaries must be verified before describing the large-frame report as fixed.
The aligned 4,096-packet source/pacing/reassembly window subsequently delivered
two copies of that actual keyframe byte-for-byte with zero paced drops or
assembly loss. The 500-packet comparison dropped 1,182 packets and reconstructed
none. Active fixture heap usage increased by roughly ten to thirteen MiB;
LiveKit's packet cache still grows lazily and all queues remain bounded. Go
capture and transport now share the encoded-frame bounds owner. This fixes a
reproduced legal-input failure, not proof that every compound adaptive-output
error in the field had the same cause; distinct failure stages preserve that
remaining distinction.
The cbdd751 Vivaldi bundle shows two successful Native H264 1080p30 capture
starts followed by a local outbound PeerConnection remaining connecting for
about 7.985 seconds. The Browser bridge's eight-second startup timeout then
stops the Native share cleanly. This is a local media-bridge failure boundary,
not evidence that Windows capture or the control WebSocket failed. That bundle
does not distinguish ICE from DTLS or a Browser policy. Current diagnostics
record those states and candidate-type counts separately; the UI reports a
connection error. The subsequent 0675265 bundle shows four successful capture
starts, each with two Native UDP host candidates, no usable remote candidates,
ICE stuck checking and no DTLS connection before the same deadline.
The owner then confirmed the affected Vivaldi report was resolved: a VPN extension forcibly disabled Broadcast IP for Best WebRTC Performance; correcting the setting/extension restored Native sharing. The confirmed cause is that extension's WebRTC policy, not unsupported Windows capture. VPN extensions may reapply the override; the Chromium WebRTC FAQ owns the user steps. This does not authorize a Browser-specific transport fallback.
An isolated Chrome 152.0.7977.82 data-channel A/B verifies the policy
mechanism: default handling gathers one UDP host candidate per peer and connects
ICE/DTLS in 33 ms; disable_non_proxied_udp gathers no candidates and remains
unconnected at 8,009 ms. The check uses fresh profiles and the effective
--webrtc-ip-handling-policy switch, without capture, encoding or user-profile
changes. This establishes Chromium's policy mechanism; the affected Vivaldi case
was resolved by the owner's setting correction above. Extra STUN or a longer
timeout cannot restore candidates disabled by that policy.
Primary references: CreateForMonitor, CreateFreeThreaded, capture item closure, and WinRT exceptions. Aspect references: active display paths, scaling modes, active signal size, and independent panel fitting/MPO.
Quiet Sources And Viewer Recovery
A later Windows 11/Chrome recheck used the installed CS2 in an offline map, with H264 and VP8 window capture and H264 display capture. A minimized VP8 source started with zero decoded frames for over ten seconds without ending the share. H264 and VP8 profile changes remained pending beyond the old five-second timeout, then delivered after restoration. This confirms that the native quiet-source preparation repair remains in place.
The 1920x1440 fullscreen window case exposed a separate Viewer rule: fifteen
seconds without a decoded frame sent an active route-failed despite connected
transport. This retired the Viewer route and its unproved quality candidate;
the Host source remained alive. That sample also recorded packet loss, so it
does not establish whether its original decode interruption came from source
silence, forwarding or decoding. The decoded-only failure rule is removed for
both P2P and SFU: silence cannot establish which owner failed. Framework
failure/recovery, first-frame admission and candidate proof remain unchanged.
The repeated fullscreen case retained the connection and resumed decoded
720p output after restoration. A controlled production-path check then held
Native output for 35 seconds without announcing Host pause: the visible Viewer
decoded no new frames, kept the same connected media, and decoded again when
output resumed. This is bounded device evidence, not proof of
all game/driver recovery or the separate immediate share-start failure report.
Some focus changes did not remain foreground throughout a sampling window;
only recorded window states and receiver progress establish those transitions.
Keyframe Request Ownership
A direct Native source delivers a requested physical output through its coalescing callback, which can also wake a quiet capture. Repeating that PLI in the next input's output plan duplicates delivery. A relay differs: its callback requests upstream input, while its local derived encoder still needs the frame plan. Callback-free producers also retain that plan; group activation and handoff keep their separate recovery requests.
A bounded Windows VP8 control-delivery comparison used the actual capture
helper's decoder, output worker and WebRTC encoder with 640x360 encoded input.
Three requests produced three recovery frames. Sending each request again
immediately after reading the next FrameBegin, without an inserted delay,
produced three pairs of consecutive recovery frames in both repetitions.
The direct-source duplicate is removed at request ownership; relay and manual
frame-plan delivery remain. This demonstrates duplicate encoded output, not
its network cost or the cause of reported blur/disconnection. Full App/relay
behavior was checked separately: the Windows App VP8 gate passed playback,
quiet-source restoration, profile changes and source replacement. The real
Native relay fixture retained shared/split/rejoined lower outputs and independent
retirement with one decoder. These bounded checks do not establish public-network
or other hardware acceptance.
Windows Capture Borders
The accepted scope keeps WGC for Windows capture and previews. Piik does not add DXGI or inject into system processes to hide the border. The reader-facing troubleshooting guide owns the optional external-mod procedure; the evidence below records its limits and the alternative's integration cost.
Consumer Windows 10 does not expose the WGC border-control API: Microsoft's
IsBorderRequired
starts at build 20348, beyond consumer Windows 10 build 19045. The current
capture helper therefore retains the system border there. Browser capture
indicators remain Browser-owned.
The helper submits IsBorderRequired(false) after the access request completes,
including a denied result, as in the
Windows capture sample.
Windows enforces permission and can honor the preference if consent changes
during capture. The earlier Allowed guard incorrectly made the first
permission result decide the session's lasting preference. The 2026-10-07 review
removed that guard; native checks and local capture/stop cycles with the border
preference off/on/off passed. A visible denied-to-allowed transition and the new
reporter's setup remain unverified; this correction does not establish the
reported cause or guarantee border visibility.
On Windows 11 build 26200, a 2026-09-21 controlled native-window check confirmed borderless permission was allowed and the default capture had no border. A second session explicitly requiring a border made it visible; gracefully ending that session cleared it while borderless capture continued. Force-killing the bordered capture instead left the outline behind in this fixture, even after the remaining capture ended.
The stream owner previously connected parent cancellation directly to
exec.CommandContext, killing the child before its existing bounded stop
sequence could release the platform session. Parent cancellation now enters
that same Stream.Close sequence; an unresponsive process still has the existing
one-second kill deadline. Retirement also drains stdout after any in-flight
frame finishes: a full output pipe must not prevent the producer from reading
its stop command. A controlled pipe check reproduced a responsive child being
killed without this drain. The stream joins the drain before closing completes;
exec.Cmd.Wait closes the output
pipe when the process ends. Subprocess regression checks cover explicit stop,
parent cancellation, concurrent stop, blocked output and an unresponsive child.
The earlier real WGC cancellation check exited normally and cleared the border.
This establishes a retirement defect and its local repair, not the cause of
every reported Windows 11 border: denied consent and other active captures
remain distinct Windows-owned limits.
The source-preview call chain has a separate, finite lifetime. Closing the
picker invalidates queued thumbnails and their results; it does not kill the
in-flight helper. That helper closes its WGC session before writing the bitmap.
Control-session loss or the three-second preview deadline can still terminate
it through CommandContext. The 2026-10-08 review did not reproduce a retained
border from this path. Its desktop-pixel control could not see the controlled
source, so capture/permission logs alone were not accepted as visual evidence.
The upstream display-resolution change report is still open as of 2026-10-07: it reports borderless display capture losing that preference after a mode change. It gives neither a current Windows build nor a verified repair. Include display-mode changes in physical reproduction; this report alone does not justify toggling the property or restarting capture.
An unofficial WGC-preserving option exists:
Windhawk's DWM Custom Projection Border
documents disabling the border on Windows 10 21H2. Source inspection confirms
injection into dwm.exe and hooks of private uDWM.dll
CProjectionBorderVisual drawing methods. Its disable flag has no per-app
filter. This is a desktop-compositor modification, not a missing Piik session
option; compatibility with private Windows methods is outside WGC's contract.
It has not been locally verified on Windows 10 and is not a bundled dependency
or automatic workaround. The official
border privacy policy
applies to Windows 11 onward, so registry/policy recipes do not establish a
supported Windows 10 solution.
The official Desktop Duplication API is a borderless alternative for a selected display. It is not window-isolated capture: cropping the desktop can expose overlapping windows. Do not silently substitute it for a selected window. OBS's display capture implementation also retains distinct DXGI/WGC paths and selects WGC for some multi-adapter laptops; a mature implementation does not establish universal DXGI availability. OBS is a design reference, not source to copy into Piik's MIT implementation.
The pinned WebRTC SDK already contains ScreenCapturerWinDirectx and
DesktopAndCursorComposer. A bounded standalone probe on Windows 11 build 26200
on 2026-09-16 linked that existing SDK and returned six 2560x1440 frames with
cursor composition, then exited. These frames expose CPU data and no GPU
texture. Piik's current capture/encoder boundary consumes D3D11 textures, so
this reuse would add a readback/upload path; the probe establishes neither
encoding throughput nor Windows 10 support. SDK build defines must match:
RTC_ENABLE_WIN_WGC changes DesktopCaptureOptions layout even when selecting
DXGI; omitting it caused heap corruption in the isolated probe. No product
capture path was changed by this experiment.
If DXGI is reconsidered, compare this reuse against the current GPU path under game motion and quiet scenes on Windows 10. Cover selected-output/GPU identity, cursor and rotation, source previews, display/fullscreen changes, and bounded cancellation. DXGI requires the output's own adapter; access loss requires recreating the duplication object. Preview capture must follow the same backend decision or it can still produce a WGC border. Retain window scope and the existing encoder/output/stop owners.
Acceptance
- Static Windows source remains a live share for a bounded physical run, and a new Viewer can obtain a keyframe without a source change.
- A malformed/stale ICE candidate or repeated per-edge answer does not close the control session or terminate sibling edges; a real edge lifecycle failure remains observable.
- Killing the App causes the active Host owner to leave the native share path promptly, while ordinary user-initiated cleanup does not recurse.
npm run checkand the relevant App checks pass; no credentials or raw media identifiers enter logs or documentation.
Cross-version capture and browser matrices remain separate acceptance work. They are not claimed by the current Windows gate.