Sharing failures were often reduced to a generic message, and changing Windows audio exclusion required reopening source selection. This phase keeps actionable failure context at the TV status indicator, adds live source-audio controls, and integrates independent capture, codec and ICE-lifetime repairs against the published contract. The audio controls reuse source replacement and the existing mixer; audio-only changes preserve video capture, encoded sources and connections. Source enumeration is bounded by the serialized control response. Codec preflight and H.264 decoder input enforce the existing native format. Gateway mappings are revalidated only for actual ICE gatherings. Website scripts and styles now share content-addressed build output. Browser/server v23, Native control v9, capture v7 and the 1440p ceiling stay unchanged. The held 4K/capability candidate and Magicsock transport are excluded. Documentation changes belong to the existing guides, standards and evidence owners. ## Validation - `npm run check`: type checking, 81 test files / 1,370 tests and the production Web build passed. - `npm run check:go`: Go tests, formatting, vet, cross-builds and Windows native capture regressions passed. A first run hit Windows temporary-directory cleanup after an unchanged SQLite test; five focused repetitions and the full rerun passed. - Native Host gates passed separately with H.264 and VP8: live/paused quality changes, minimized-window recovery, source replacement, Viewer decoding and complete process/port cleanup. The App Local entry/authentication/invitation gate passed. - Website/documentation build, documentation links and repository hygiene passed. Browser review covered Chinese/English, dark/light controls, 320px/360px and desktop layouts, audio selection/off state, troubleshooting dialog/ESC focus return, matching GitHub/Gitee architecture links and the embedded film. - macOS/Linux physical capture, Windows 10 exclusion and representative network/device coverage remain explicit evidence limits. CI must pass Linux race checks and native packaging before publication. ## Release notes ### 中文 这是一次分享体验与兼容性更新。Windows App 支持在开播后调整排除的应用声音;遇到分享失败时,也有更清楚的提示和排查入口。 #### 使用改进 - 在「分享设置 → 声音」中调整系统声音和排除的应用,无需停止分享。支持的 Windows 10 系统也会按实际能力显示排除选项。 - 分享失败提示保留具体原因。点击电视下方状态,可查看处理建议、诊断入口及对应的故障排查文档。 - 补全中英文常见问题说明,涵盖 App 连接、选源与编码、站点地址配置、严格网络和浏览器 HDR 限制。 #### 修复 - 修复窗口较多或名称较长时选源列表可能加载失败,以及部分独立窗口未列出的情况。 - 改善 Windows 窗口最小化、恢复后的采集衔接。 - 修复部分 Firefox 编码属性影响连接的问题,并使原生接收的格式预判与实际支持范围一致。 - 重连时刷新网关端口映射,避免沿用已失效的映射结果;加强原生 H.264 输入校验。 - 官网下载架构切换增加统一动效,脚本与样式使用带内容标识的地址,减少更新后的缓存混用。 更新 App 并刷新页面即可使用相应改进,无需迁移配置或房间数据。Windows 10 音频排除是否可用取决于系统能力。 ### English This update improves sharing controls and compatibility. Windows App users can change audio exclusion during a share, and sharing failures now provide clearer guidance and a direct troubleshooting entry. #### Improvements - Change system sound and the excluded application under **Sharing settings → Sound** without stopping the share. Supported Windows 10 installations can also expose exclusion after the capability check. - Sharing failures retain their specific cause. Select the status below the TV for recovery suggestions, diagnostics and the relevant troubleshooting guide. - Updated English and Chinese guides cover App connectivity, source selection and encoding, site-address configuration, restricted networks and Browser HDR limitations. #### Fixes - Fixed source lists failing with many windows or long titles, and certain independent application windows being omitted. - Improved Windows capture transitions when a window is minimized and restored. - Fixed stale Firefox codec attributes disrupting connections and aligned native receiver preflight with its supported formats. - Refresh gateway port mappings for new ICE gatherings instead of reusing stale results, and validate H.264 input before native decoding. - Added consistent motion to website architecture selection and content-hashed script/style URLs to prevent mixed cached versions. Update the App and reload the page to use the relevant improvements. No configuration or room-data migration is required. Windows 10 audio exclusion depends on actual system capability.
Windows Capture Process
This isolated Windows process provides native capture for Piik App. It enumerates local displays and visible top-level windows, binds each window to its PID and process creation time, and has independent modes for:
- capability discovery (
--probe); - process-tree inclusion/exclusion or default-device loopback PCM
(
--capture-audio); or - WGC/D3D11 screen/window video with adapter-bound Media Foundation H.264 or
libvpx VP8 output (
--capture-video --codec auto|h264|vp8). - bounded 320x180 BMP source previews (
--preview), delivered once per target over the local control connection rather than the media route.
The video command receives the current product resolution, frame-rate, bitrate, and quality preference. A replacement process applies live changes while the Go session retains its Pion source and connections.
Sharing and source previews request borderless access by default when Windows
exposes IsBorderRequired and GraphicsCaptureAccess (build 20348+, including
Windows 11). The probe advertises API availability; the source-picker preference
passes --show-capture-border when the Host wants the sharing border visible.
One capture-local owner applies completed access without waiting
for consent, and cancels pending access on retirement. Unsupported APIs, denial
or failure retain ordinary capture; another capture session may still require a
border. The property value is a preference, not proof that the border is invisible.
Consumer Windows 10 through build 19045 lacks this API; the current WGC capture
path keeps its system border there.
Video and audio run as separate bounded child processes. A source whose audio
loopback cannot be initialized keeps video available and reports audio
unavailable instead of failing the whole source. Process loopback is probed by
activation rather than inferred from a Windows build number; display sources
normally use the standard render-device loopback available on Windows 10 and
later. The optional --capture-audio exclude <pid> <creation-time> mode requires
build 19041+ and a successful exclusion-mode probe. Windows 10 isolation still
needs physical verification; see the audio evidence.
It captures all output devices
except the selected process tree, and retires when that process exits. The
screen-audio contract
owns selection and failure behavior.
Auto measures delivered frame cadence through the target-profile encoding
pipeline within a four-second selection budget; H.264 that sustains the target
needs no software comparison. The selected codec remains fixed across profile
and source changes. VP8 reads the existing
NV12 surface through one staging texture and uses the same encoded-frame
boundary. The process has no network fallback. The App
consumes the selected process or system-audio stream through its native media
edge when the capability probe reports support. Build to the stable project
build/go-check directory for a bounded capability run:
npm run check:native
The checks include synthetic output-worker replacement and failure cases using WARP and a test codec, plus preview cleanup when WGC rejects a hidden test window. They do not capture a user screen or validate a physical encoder.
On a Windows machine with a physical D3D11 adapter, check SDR and HDR-to-SDR conversion:
powershell -NoProfile -File native/capture/windows/build.ps1 -OutputDirectory build/color-check -CheckColor
This sends synthetic RGB, full/limited-range BT.601/BT.709 NV12 and FP16 HDR bars through the production converters. It checks range/matrix, highlight detail, SDR/HDR replacement, white-level changes and retained-frame ownership without capturing the desktop. Decoded H.264/VP8, Browser reception and real HDR displays remain separate media acceptance; fidelity research records current evidence and limits.
The implementation follows Microsoft's MIT-licensed reference samples and
official API contracts without copying their WIL framework. The retained MF
fixture compiles the same encoder source with PIIK_H264_FIXTURE; there is
not a second product MFT implementation.
Shared local outputs use stock WebRTC source/encoder adaptation. H264 keeps
native NV12 surfaces, while WebRTC VP8 reads back into I420. The existing capture
and output mailboxes retain source/generation ownership; adapted sizes and
timestamps cross the same media envelope. Hardware low-latency mode stays on;
the old fixed one-frame VBV override is removed so later bitrate increases are
not trapped by the original buffer limit.
The build caches the pinned WebRTC SDK and matching official MSVC linker/runtime
libraries under build/encoder-pool. The SDK supplies libvpx, replacing the
separate source build. Only statically linked code and required notices enter
the package, not the SDK/toolchain or another runtime service.
- https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/ApplicationLoopback
- https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/tree/master/cpp/ScreenCaptureforHWND
- https://learn.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_activation_params
- https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture
- https://learn.microsoft.com/en-us/windows/win32/api/windows.graphics.capture.interop/nf-windows-graphics-capture-interop-igraphicscaptureiteminterop-createforwindow
- https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.direct3d11captureframepool.createfreethreaded
- https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.graphicscapturesession.isborderrequired
- https://github.com/microsoft/Windows.UI.Composition-Win32-Samples/issues/97#issuecomment-1015962518