Commit Graph
12 Commits
  • fix: repair media startup and retire shared session resources (#483)
    Early video retransmissions could be rejected before an SFU publication admitted its primary stream. The shared RTP reader now restores the associated primary identity before admission. A repository audit also found ownership omissions in Viewer input retirement, queued route work, partially constructed connections and sender-evidence cleanup; each is corrected at its existing owner without changing routing or adaptation policy.
    
    The same phase fixes bounded Linux diagnostic encoding, picker/tooltip keyboard and touch behavior, and stale-language notices. Documentation now reflects current App, room and media lifecycles. Theme-role consolidation remains deferred.
    
    Validation: complete Web check (1,685 tests, type-check and build); Windows Go core tests/vet/cross-builds; Linux CI race/vulnerability checks and all seven package targets; native Linux diagnostic fixtures on both architectures; actual Chromium/Pion SFU decode, live settings, reload/recovery and resource-retirement gate; documentation and website builds. Confirmed defects were compared against their baseline and independently reviewed. No protocol, configuration or persistence migration is required. Physical device limits and unmatched field reports remain open.
    
    ## Release notes
    
    ### 中文
    
    这是一次分享稳定性与交互细节维护更新,兼容现有 2.x 客户端和站点。
    
    - 修复部分服务器中转开播失败:较早到达的视频重传包不再被误判,导致媒体发布提前结束。
    - 修复停播后快速重新分享时,旧任务可能拖延新线路准备的问题。
    - 撤销邀请或替换观众会话时,同步清理对应的远控输入身份,保留其他观众的正常使用。
    - 改善连接失败、观众反复加入退出后的资源回收;避免 Linux 单路输出的错误信息意外中断整个分享。
    - 修正选源、互动和线路提示的键盘/触屏操作;切换语言后,当前校验与错误提示会同步更新。
    
    ### English
    
    This maintenance update improves sharing reliability and interaction details. It remains compatible with existing 2.x Apps and Sites.
    
    - Fix an SFU startup failure caused by video retransmissions arriving before the primary stream was admitted.
    - Prevent retired sharing tasks from delaying route preparation after a quick stop and restart.
    - Retire remote-input identities when invitations are revoked or Viewer sessions are replaced, while preserving other participants.
    - Release resources correctly after connection failures and repeated Viewer churn; prevent Linux output diagnostics from unexpectedly ending the whole share.
    - Improve keyboard and touch behavior in source selection, interactions and route help. Active validation and error messages now follow language changes.
  • fix(media): stabilize reconnects and quality recovery
    This maintenance phase corrects connection and media recovery after startup deadlines, congestion and packet loss. Route selection remains a bounded operation; Pion and LiveKit continue to own congestion control, adaptation and retransmission.
    
    Changes stay within existing owners:
    
    - Preserve an untried SFU fallback when a connected P2P candidate produces no first frame before its deadline. Retire expired native preparations using the current edge identity.
    - Correct paced output, probe accounting and partial-recovery demand. Negotiate RTX consistently for native forwarding and SFU publication, including repaired stream identifiers for simulcast.
    - Return working IPv4 mappings without waiting for optional IPv6 work, and separate NAT observations by the local socket/address that produced them.
    - Keep optional App availability separate from basic source selection; stabilize nickname/chat layouts and restore volume from zero correctly.
    - Retry complete Gitee reads, including response bodies and hash verification. Ambiguous uploads remain single attempts and are reconciled against the remote inventory before rerunning.
    
    Related: #468, #464, #471. The repairs affect paths discussed in these reports; incomplete field diagnostics do not establish that each report has the same cause, so this PR does not automatically close them.
    
    ## Validation
    
    - Web type checks, production build and 1,624 tests passed. Go core, formatting, vet and local target builds passed.
    - Delayed RTX recovery reproduced the defect before the fix; the repaired-SSRC mutation also fails the focused regression. Real Windows H.264 and VP8 capture passed the SFU gates, including settings, reload recovery and retirement.
    - The media lifecycle gate passed all 14 trials across Browser/App pairings and P2P/SFU handoffs. Native connectivity, paced forwarding and negative-control checks passed.
    - Responsive UI and current website architecture links were checked; Gitee's current release was independently downloaded and matched against the GitHub originals.
    - [Platform candidate](https://github.com/TNTcraftHIM/Piik/actions/runs/38669095115): all five Apps, both Server architectures and container checks passed at `c534573b`. Subsequent tracked changes only update documentation, the complete-matrix CI budget and race-test coverage.
    - [Full network comparison](https://github.com/TNTcraftHIM/Piik/actions/runs/38667624364) completed 70 trials before the batch's 45-minute limit. The [remaining scenario](https://github.com/TNTcraftHIM/Piik/actions/runs/38672805155) passed three paired repetitions; all 71 scenario/setting variants are covered, with 58 media and 13 expected/observed unavailable outcomes. Six negative controls passed, and owned resources were cleaned up. These are controlled observations, not a public success rate.
    - The final validation also includes the shared forwarder under the Go race detector. The separate sole-active-output publication experiment still shows inconsistent recovery: two of four current-code repeats did not pass its recovery observation, so the limitation below remains open.
    
    The native SFU allocator still has a measured recovery limitation when only its lowest rate-controlled encoding is active. Fixing that requires a supported upstream demand input; no second controller or allocator fork is introduced. Unmatched capture-failure reports and physical-platform coverage retain their documented evidence limits.
    
    ## Release notes
    
    ### 中文
    
    这是一次连接与播放稳定性更新,重点改善重连、弱网后的画质恢复和下载镜像可靠性。与 Piik 2.0.0 保持兼容。
    
    - 修复连接等待超时后过早跳过备用线路的问题,保留尚未尝试的媒体服务器兜底机会。
    - 改善原生分享在网络拥塞后的画质恢复,并修复转发和媒体服务器发布链路上的视频重传协商遗漏。
    - 修复原生观看准备超时后的清理与重试,以及音量从零恢复时的异常。
    - 避免可选的 IPv6 端口映射拖慢 IPv4 准备,并修正多网卡环境下的 NAT 预测观测归属。
    - 修复昵称编辑、聊天字数变化引起的布局移动;保持 App 提示简洁,并为更新提示补充官网备用下载入口。
    - 修复 Gitee 镜像同步在传输中途断开时未重试的问题,校验通过后才完成镜像发布。
    
    仍在跟进:部分原生媒体服务器链路的弱网后恢复仍可能偏慢;尚缺匹配诊断的采集失败反馈不能确认已解决。
    
    ### English
    
    This maintenance update improves connection and playback recovery after interruptions and congestion, along with download-mirror reliability. It remains compatible with Piik 2.0.0.
    
    - Preserve untried media-server fallback routes when a connection reaches its waiting deadline.
    - Improve native sharing quality recovery after congestion and fix missing video retransmission negotiation in forwarding and media-server publication paths.
    - Correct cleanup and retry after native viewing preparation expires, and restore playback volume correctly from zero.
    - Prevent optional IPv6 port mapping from delaying IPv4 preparation, and associate NAT-prediction observations with the correct local interface.
    - Stabilize nickname editing and chat counters, keep App guidance unobtrusive, and add the website's alternate downloads to update notices.
    - Retry interrupted Gitee mirror transfers and complete publication only after verification succeeds.
    
    Still under investigation: recovery after congestion can remain slow on some native media-server paths. Capture-failure reports without matching diagnostics are not claimed as resolved.
  • feat!: expand media controls and simplify App connections
    ## 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>
  • fix(media): improve sharing continuity and pause recovery (#431)
    ## Problem and outcome / 问题与结果
    
    Sharing could stall at Browser encoder handoff or retain a pause after a video binding was replaced. Source/audio changes could also overlap offer/answer negotiation, while Native recovery could request redundant keyframes. This phase repairs those existing owners, drains capture output during bounded shutdown, and normalizes configured Site origins consistently with Browser serialization.
    
    ## Release notes
    
    ### 中文
    
    这是一次稳定性更新,重点改善分享中的画面连续性,以及暂停、换源和恢复播放。
    
    - 修复浏览器编码复用中的重复帧率限制和交接等待,减少由这些问题造成的卡顿。
    - 修复换源和音频变更时的协商重叠,并防止已关闭连接的异步操作干扰恢复。
    - 修复房主暂停期间重连后无法恢复播放,以及编码复用回退后仍停在暂停状态的问题;正常取消播放不再被当作媒体故障。
    - 减少原生采集的重复关键帧请求,并修复停止采集时输出未排空导致的退出等待问题。
    - 修复部分国际化域名和 IPv6 站点地址的识别,并改善窄屏下分享设置项的文字排版。
    
    升级 Piik App 或自部署 Server 后刷新页面即可,无需修改配置。部分设备和网络环境下报告的开播失败、偶发断流仍需现场日志确认,本次更新不代表所有此类反馈均已解决。
    
    ### English
    
    This stability update improves picture continuity and recovery when pausing, changing sources, or resuming playback.
    
    - Fix duplicate frame-rate limiting and unnecessary handoff waits in Browser encoding reuse, reducing stalls caused by these issues.
    - Serialize negotiation across source and audio changes, and prevent asynchronous work on closed connections from interfering with recovery.
    - Fix playback remaining paused after reconnecting while the Host is paused, or after falling back from shared encoding. Normal playback cancellation is no longer treated as a media failure.
    - Avoid redundant Native capture keyframe requests and drain pending capture output during bounded shutdown.
    - Fix recognition of some internationalized domain names and IPv6 Site addresses, and improve sharing-setting labels on narrow screens.
    
    Update Piik App or your self-hosted Server, then refresh the page. No configuration changes are required. Some device- and network-specific reports of sharing startup failure or intermittent stream loss still need matching diagnostics; this update does not claim to resolve every reported case.
    
    ## Verification / 验证
    
    - `npm run check`: 76 test files / 1,152 tests, TypeScript and production Web build passed.
    - Real Chrome VP8/H264 checks with two viewers passed live/paused profile changes, quiet-source recovery, source replacement and ordinary-sender fallback after producer failure.
    - New pause-owner regressions fail against the previous implementation; actual Viewer effects preserve same-binding local pause and resume replacement bindings.
    - Independent cumulative Browser and Native/config review found no confirmed release blocker.
    - `npm run check:go`: formatting, Go tests/vet, Windows/Linux builds and Windows native capture compile/probes passed. Darwin packaging and Go race detection run on the native CI runners.
    - Windows App H264 and VP8 Host gates passed decoded playback, live/paused quality changes, quiet/background-source recovery, source replacement, failure cleanup and subsequent sharing; experiment-owned processes, ports and profiles were cleaned up.
    - Documentation, repository hygiene and release-note extraction passed.
    
    ## Impact / 影响
    
    Patch release v1.6.7. Browser/server v23, Native control v9, capture v7 and SQLite schema 2 remain unchanged. Existing WebRTC adaptation and route policy remain unchanged; no quality floor is introduced. Interaction and Windows x86 prototypes are excluded. Managed Server restart interrupts active media and preserves room authority. Physical macOS/Linux capture, broad public-network endurance and unmatched reporter environments remain outside local acceptance.
  • fix(media): preserve sharing startup and viewing continuity
    ## Problem and outcome / 问题与结果
    
    Native sharing could start capture before discovering that the browser could not create its local media connection. Connected Viewer routes could also be retired solely because decoded frames stopped advancing, including quiet or backgrounded game sources. This maintenance phase acquires the browser bridge before capture, preserves connected routes through frame silence, scopes Native keyframe recovery to the requested outputs, and reports terminal Browser sender failures to the existing connection owner. It also includes the accepted narrow-screen layout and tooltip corrections.
    
    ## Release notes
    
    ### 中文
    
    这是一次维护更新,重点修复分享启动、观看连续性和手机窄屏布局。
    
    - 修复浏览器媒体连接无法初始化时,App 仍启动采集后立即停止的问题,并保留更明确的失败原因。
    - 避免仅因画面暂时没有更新,就断开已连接的观看线路;适用于游戏切后台等静止画面场景。
    - 修正原生画面恢复请求的范围,避免某一路请求关键帧时影响其他输出;浏览器发送失败也会及时通知现有连接处理流程。
    - 修复窄屏下房间号与操作按钮的排布,改善长标题和提示浮层的显示。
    
    短时模糊与部分用户报告的偶发断流仍在调查,本次更新不代表所有相关情况均已解决。升级 App 或自部署 Server 后刷新页面即可,无需修改配置。
    
    ### English
    
    This maintenance update focuses on sharing startup, viewing continuity, and compact layouts on phones.
    
    - Fix capture starting and immediately stopping when the browser cannot initialize its local media connection, and preserve clearer failure details.
    - Keep connected viewing routes alive when the picture temporarily stops updating, including quiet or backgrounded game sources.
    - Keep Native keyframe recovery scoped to the requested outputs and report terminal Browser sender failures to the existing connection handler.
    - Fix room-code and action layout on narrow screens, and improve long headings and tooltip placement.
    
    Brief quality drops and some reports of intermittent stream loss remain under investigation; this update does not claim to resolve every reported case. Update Piik App or your self-hosted Server and refresh the page. No configuration changes are required.
    
    ## Verification / 验证
    
    - `npm run check`: 76 files / 1,133 tests, TypeScript and production Web build passed.
    - Targeted Browser sender/pool checks: 97 tests passed on maintenance and interaction candidates.
    - Go mediaedge/nativehost/nativecapture/forwarding tests and scoped vet passed; output-scope regression tests reject the old behavior.
    - Matched Chrome 152 VP8/H264 ordinary/pool tests with two viewers and a one-second network constraint completed with healthy sibling isolation. VP8's deeper pooled quality dip remains open.
    - Physical startup/resource-exhaustion and quiet-game reproduction boundaries are documented in the existing research owners.
    - `npm run check:go`: formatting, Go tests/vet, Windows/Linux builds, Windows native capture compilation/probes and regressions passed. Darwin packaging and Go race checks run on the native CI runners.
    - Actual Windows App H264 and VP8 Host gates passed: decoded video, live/paused profile changes, quiet/background-source recovery, source replacement, failure cleanup and subsequent sharing; all experiment-owned processes and ports closed.
    - Website build and repository hygiene checks passed. Independent full-phase frontend and native reviews found no release-blocking regression.
    
    ## Impact / 影响
    
    Patch release v1.6.6. Browser/server v23, Native control v9, capture v7 and SQLite schema 2 remain unchanged. No interaction prototype, route-selection policy, new quality heuristic, or configuration migration is included. Real-phone and heterogeneous network/device coverage remain bounded by the existing verification record.
  • feat(app): add camera sharing and Host microphone controls
    ## Problem and outcome / 问题与结果
    
    Add camera sharing and Host microphone commentary to the existing Host workflow,
    with shared source cards, device selection, input gain and grouped sharing settings.
    Browser and native capture keep one outgoing audio track and the existing room/media
    owners. Include optional password-free invitations, public-tunnel protocol fallback,
    capture retirement and App-discovery feedback fixes. This is the complete capture
    maintenance phase; interaction, x86 capture and 4K experiments are excluded.
    
    ## Release notes
    
    ### 中文
    
    这次更新让分享多了两种表达方式:用摄像头展示现场,用麦克风边分享边讲解。
    分享设置也重新整理,并修复了公网邀请、音视频切换和采集退出中的一些问题。
    
    #### 新功能与使用改进
    
    - **摄像头分享**:在原有选源器中选择摄像头,支持设备选择和画面预览;支持摄像头访问的手机浏览器也可使用。
    - **房主麦克风**:浏览器分享和 App 原生采集均可混入房主声音,支持选择麦克风、静音和输入音量调节。观众仍使用原有音量控件收听。
    - **更集中的分享设置**:画质、声音和详细连接选项集中在画面下方,常用操作保持直接可用,并调整了窄屏播控与等待提示的布局。
    - **邀请链接可选择是否免密加入**:关闭后,链接不再附带免密邀请;接收者按当前站点和房间的准入设置加入。
    - **更清晰的启动设置**:可选站点口令默认收起,已有站点地址提供 `demo.piik.tv` 建议,并澄清 NAT 增强选项的含义。
    
    #### 修复
    
    - 公网邀请在 UDP 受限但 TCP 可用的网络中,可使用隧道组件原有的协议回退,减少这类启动失败。
    - 调整音频时保留健康的视频发送;修复旧采集事件干扰当前分享的情况。
    - 停止或取消原生采集时,先正常释放采集会话,超时才强制退出;修复本地复现的强制终止后 Windows 黄框残留问题。
    - 从 App 打开的页面无法连接 App 时,选源器保留明确提示,不再只剩浏览器和摄像头选项而缺少原因说明。
    
    #### 使用说明
    
    摄像头和音频能力取决于系统、浏览器与设备。Windows 仍可能因权限或其他采集要求显示边框。
    使用新增的 App 麦克风功能,请更新 App;连接自部署站点时,也请更新站点以获得对应页面功能。
    
    ### English
    
    This update adds camera sharing and Host microphone commentary, alongside a
    clearer sharing-settings layout. It also fixes several public-invitation,
    audio/video transition and capture-shutdown issues.
    
    #### Features and usability
    
    - **Camera sharing:** choose a camera in the existing source picker, with device selection and thumbnail previews. Phone browsers with camera access can share too.
    - **Host microphone:** add commentary to Browser sharing or App-native capture, with device selection, mute and input gain. Viewers listen through their existing volume controls.
    - **Grouped sharing settings:** picture quality, sound and detailed connection options sit below the picture, while frequent actions remain directly available. Narrow-screen playback and waiting layouts are refined.
    - **Optional password-free invitations:** turn this off to copy a link without an invitation credential. Recipients then follow the site's and room's current admission settings.
    - **Clearer startup settings:** optional site-password settings are collapsed, the existing-site field suggests `demo.piik.tv`, and the NAT enhancement option has a clearer description.
    
    #### Fixes
    
    - Public invitations can use the tunnel component's existing protocol fallback when UDP is blocked but TCP is available, reducing startup failures on those networks.
    - Audio changes preserve healthy video sending. Retired capture events no longer affect an active share.
    - Stopping or cancelling native capture releases the capture session before enforcing the shutdown deadline. This fixes a locally reproduced case where forced termination left a Windows capture border behind.
    - Pages opened from the App keep a clear connection warning in the source picker when the App cannot be reached, instead of showing only Browser and Camera without an explanation.
    
    #### Usage notes
    
    Camera and audio support depend on the OS, browser and device. Windows may still
    require a border because of permissions or another active capture.
    Update the App to use its new microphone feature; update self-hosted sites as
    well to receive the matching page controls.
    
    ## Verification / 验证
    
    - npm run check: 74 files / 1054 tests passed, TypeScript and production Web build passed.
    - npm run check:go: Go tests, vet, target builds and Windows native compile/regressions passed.
    - npm run gate:app-native-host: actual Windows H264 Host/Viewer, live/paused profile changes,
      quiet-source recovery, source replacement/failure, subsequent share and cleanup passed.
    - Windows 11 capture-border check: parent cancellation retires the actual WGC session and
      clears its border; subprocess tests verify normal, concurrent and timed-out retirement.
    - Website build, scripts typecheck, documentation and repository hygiene passed.
    - Native macOS/Linux packaging and Linux race checks run in CI before publication.
      Physical phone camera and real audio-level/echo/multiple-device coverage remain recorded
      limits; the owner authorized release with those limits. No universal NAT/border fix is claimed.
    
    ## Impact / 影响
    
    Compatible feature release **v1.6.0**, explicitly approved by the owner. Browser/Server v23,
    Native control v9 and capture v7 stay unchanged; new App microphone commands use capability
    negotiation. No new dependency, port, media route, room lifecycle or storage migration.
    Published Server cutover retains configuration and room storage and uses bounded health
    checks with the previous executable available for rollback. Source, tests and owned
    documentation ship together; exact artifact/deployment identities remain outside the repo.
  • feat(app): improve capture controls and sharing feedback
    ## Problem and outcome / 问题与结果
    
    Windows App users can now choose whether to show the capture border. The same border owner handles source previews and active capture; unsupported or denied requests keep normal capture available. The source picker distinguishes an absent/incompatible App, unavailable capture capability, failed enumeration and a genuinely empty list. Chrome's pending local-access permission no longer holds optional Viewer reception.
    
    This phase also reduces tooltip obstruction and contains a failed Linux encoder output within its own branch. Browser/server v23, Native control v9 and capture v7 remain compatible. Closes #401.
    
    ## Release notes
    
    ### 中文
    
    这是一次分享体验更新,重点改进 Windows 采集边框、App 选源反馈和提示浮窗,并修复 Linux 采集输出的故障隔离。
    
    - **采集边框可选。** Windows App 选源器新增「显示采集边框」,位于声音开关左侧,默认关闭。支持的系统上,来源预览也会隐藏边框。
    - **找不到窗口时,提示更明确。** 区分 App 未连接、版本不兼容、采集不可用和读取失败;授权后可以刷新列表重试。改善 Chrome 首次访问时的观看连接,避免本机授权等待拖慢入座。
    - **提示浮窗更顺手。** 统一 500 毫秒悬停延迟,减少对画面和控件的遮挡,改善触屏长按和关闭操作;只用于说明的控件使用普通鼠标光标。
    - **Linux 分享更稳。** 修复单路编码输出失败可能连带中断其他输出的问题。
    - **排查文档更完整。** 补充 App 来源列表、Windows 10 黄框及浏览器 WebRTC 设置的排查说明。
    
    使用新的采集边框开关,请更新 Windows App 并刷新已打开的网页。Windows 10 没有对应的系统接口,边框仍由系统显示;文档中心提供可选处理方法。系统权限或其他采集会话也可能要求保留边框。
    
    ### English
    
    This sharing update improves Windows capture borders, App source selection and tooltips, and fixes failure isolation between Linux capture outputs.
    
    - **Choose whether to show the capture border.** The Windows App source picker adds a **Show capture border** switch to the left of audio, off by default. Source previews also hide the border on supported systems.
    - **Clearer source-selection feedback.** The picker distinguishes an unavailable or incompatible App, unsupported capture and a failed source list. Refresh after granting access to retry. Pending local-access permission in Chrome no longer delays Browser reception for Viewers.
    - **Less intrusive tooltips.** A consistent 500 ms hover delay, improved placement and touch-hold behavior make guidance easier to read and dismiss. Help-only controls use the ordinary cursor.
    - **More resilient Linux sharing.** A failed encoder output no longer interrupts healthy sibling outputs.
    - **More useful troubleshooting.** The documentation covers App source lists, Windows 10 capture borders and browser WebRTC settings.
    
    Update the Windows App and refresh open pages to use the capture-border switch. Windows 10 lacks the corresponding system API and retains its system border; an optional procedure is available in the documentation center. System permission or another capture session may also require the border to remain visible.
    
    ## Verification / 验证
    
    - `npm run check`: TypeScript, 998 tests and production Web build passed.
    - `npm run check:go`: Go formatting/tests/vet/target builds and Windows native capture checks passed. macOS cgo builds require their native CI runner.
    - Documentation, repository hygiene and website build passed.
    - Real Chrome 152 profiles: first-use local permission, recovery after consent and source-list refresh; optional Viewer discovery before/after consent; App Local without cross-address-space consent.
    - Public invitation gate: link creation, remote page and WebSocket access, App exit and link retirement passed.
    - Windows 11 border on/off, source preview and concurrent-capture checks have physical evidence. Tooltip hover, keyboard, touch-hold, dismissal and narrow-layout checks passed.
    - [Candidate CI](https://github.com/TNTcraftHIM/Piik/actions/runs/35157993032) passed at `1d159831`: Server/container, Windows/Linux/macOS packages, Go race checks and frontend validation. Publication was skipped.
    - Local Windows ZIP passed packaged startup, capture probing, embedded Web, helper identity/notices and clean-shutdown checks.
    - Windows H.264 and VP8 Host gates passed live/paused settings, background recovery, source replacement, source-end/restart, decoded Viewer frames and complete resource cleanup.
    - Final `0b370e6a` differs from the CI candidate only in TODO/status closure. Full Web/Go/native checks and website build passed again. The access/privacy gate passed credential-leak and cleanup checks.
    
    ## Impact / 影响
    
    Compatible feature update for **v1.5.0**. No wire or storage version change. Older Apps retain their existing capture behavior through capability negotiation. Publication and matching deployments follow the release workflow.
    
    The independent Windows x86 experiment is excluded. Physical 32-bit Windows, macOS/Linux capture, unsupported Windows border control, and actual border-permission denial remain outside this candidate's acceptance evidence. The original missing-window, public-link timeout and URL-handler crash reports still need affected-machine diagnostics.
  • feat: rename product and runtime to Piik
    Rename the active product, Go module, binaries, configuration, protocols and documentation to Piik while retaining the TV mascot and existing media/room behavior.
    
    Use one current private contract without old-name aliases. Preserve SQLite authority and copy compatible local settings once; other settings start fresh. Git-message cleanup and the infrastructure name cutover are coordinated with this phase, with original history and deployment data archived externally.
    
    Validated locally with Web and Go checks, Windows capture compilation, matched Client/Server builds, packaged Client control handshake and history-rewrite integrity checks. Skip duplicate hosted CI for this owner-authorized local release.
    
    [skip ci]
  • feat(media): integrate embedded media services and shared native encoding
    Embed STUN and SFU in the shared Go process, reuse native encoding pipelines with independent adaptation, and complete Client lifecycle, settings, diagnostics and packaging fixes. Retain standard Browser senders after measured encoded-reuse limitations.
  • fix: finish native client lifecycle and capture aspect
    Accepted native Client lifecycle and Windows capture aspect phase. All Web/Server and three-platform Client checks passed.