Commit Graph
18 Commits
  • feat(app): bring Android sharing and touch control into the shared runtime (#504)
    ## Problem and outcome / 问题与结果
    
    Bring Android into Piik's shared App workflow and make phone control usable without a separate Web UI. One signed APK covers ARM64 and x64; screen capture, room authority, routing, voice and site approval reuse the existing Go and Browser owners. Android opens the user's system browser rather than shipping an embedded browser.
    
    This phase also fixes capture replacement and encoding-clock failures, improves source-audio startup, contains recoverable input and transport failures, adds a bounded relay-volunteer setting and supports hostnames in `SFU_PUBLIC_IP`. The website separates desktop and mobile downloads, gives iOS users an online entry and aligns the bilingual installation guides.
    
    Related reports: #495, #499, #500, #501, #502 and #503. For #502, input execution failures now preserve authorization, and temporary target observations suspend rather than revoke it; the original Windows report remains open for candidate feedback.
    
    ## Release notes
    
    **Piik, now in your pocket.**
    
    Piik App now supports Android screen sharing, with touch controls for a friend's computer.
    
    **手机,也能开播。**
    
    Piik App 现已支持 Android 屏幕分享,也能用手机控制朋友的电脑。
    
    ### English
    
    Piik v2.5.0 brings the App to Android and improves capture reliability, touch control and everyday startup. The existing 2.x compatibility baseline is unchanged.
    
    - **Android App:** share your screen, join room voice or control a supported computer. One APK supports ARM64 and x64, using your own browser and the same Piik interface.
    - **Phone controls:** use direct touch or a compact floating mouse with dragging, left/right buttons and a scroll wheel. Pinch to zoom and pan the picture while controlling.
    - **More reliable sharing:** keep video progressing through source and encoder-output changes, and improve low-bitrate recovery and stationary-screen keyframes. Correct Windows window-size handling and Linux NVENC settings; start optional source sound after video is ready.
    - **Smoother App entry:** retry failed startup in place, reopen the running room and retain the correct App connection when returning from the browser. Compress shared page assets to reduce loading traffic and keep microphone choices stable during ordinary page updates.
    - **Recovery stays local:** a rejected input or canceled source replacement no longer revokes remote-control permission. Full ICE candidate queues and failed audio-parameter updates retain healthy connections. A failed local room leaves the App and unrelated approved sites running.
    - **Connection settings:** relay volunteers can cap their downstream viewers. Self-hosted SFU setups can use a DNS hostname in `SFU_PUBLIC_IP`.
    - **Clearer help:** refine sharing-error guidance, preserve input-failure diagnostics without recording input content, and update the bilingual platform and network guides.
    
    Update both the App and your self-hosted site to use the new features. Android can control a supported computer; the Android device itself is not a controlled endpoint.
    
    If you previously installed a test APK, uninstall it once before installing this release: the official signing key is different. Uninstalling clears App-local site approvals and starred-site choices; browser settings remain in the browser. Later official releases can be installed over this one.
    
    ### 中文
    
    Piik v2.5.0 带来 Android App,并改善采集稳定性、手机远控与日常启动体验。沿用现有 2.x 兼容基线。
    
    - **Android App:** 分享手机画面、加入房间语音,或控制支持远控的电脑。一个安装包同时支持 ARM64 与 x64,使用自己的浏览器和熟悉的 Piik 界面。
    - **手机远控:** 直接触摸操作,或展开小巧的悬浮鼠标,使用拖拽、左右键与滚轮;控制时也能双指缩放、移动画面。
    - **分享更稳定:** 修复切换采集来源、编码输出时画面停止推进的问题,改善低码率恢复与静止画面的关键帧响应。修正 Windows 窗口尺寸处理和 Linux NVENC 设置,来源声音会在画面就绪后启动。
    - **App 进出更顺畅:** 启动失败可原地重试,再次打开会回到正在运行的房间;从浏览器返回时保持连接到正确的 App。共用页面资源启用压缩,减少加载流量,麦克风选项不再随普通页面更新反复加载。
    - **局部问题就地恢复:** 单次操作失败或取消换源不再撤销远控授权;ICE 候选队列满或音频参数调整失败时保留健康连接。本地房间故障不会连带停止 App 和其他已授权站点的分享。
    - **连接设置:** 帮助转发的观众可设置承接人数上限;自部署 SFU 的 `SFU_PUBLIC_IP` 现在支持 DNS 主机名。
    - **排查更直接:** 打磨分享失败提示,补充不记录输入内容的远控故障诊断,并更新中英文平台说明与网络指南。
    
    使用新功能时,请一起更新 App 与自部署站点。Android 可作为控制端操作电脑,手机本身不作为被控端。
    
    曾安装测试 APK 的用户需先卸载一次,再安装正式版,两者签名不同。卸载会清除 App 内的站点授权和收藏,浏览器设置仍保留在浏览器中;后续正式版可直接覆盖安装。
    
    ## Verification / 验证
    
    - Local full Web/type/build checks passed: 104 test files, 1,848 tests; the website and documentation builds passed.
    - Android full-App emulator acceptance covered real decoded screen sharing, concurrent 1080p/540p encoder allocation, live bitrate changes, stationary keyframes, Viewer departure, consent reuse/reentry and final capture-resource retirement.
    - A local universal release APK passed signing, package identity, version-code, ABI and non-debuggable checks using the permanent release key. GitHub Actions receives the same key through encrypted Secrets; manual candidate runs use a disposable candidate signer.
    - Windows real capture checks covered H264/VP8 window resizing and restoration. Source-audio startup and failure/close ordering passed focused runtime checks; Linux race checks passed.
    - Desktop/mobile website layouts were reviewed in English and Chinese, both themes, including grouped downloads, the iOS online entry and self-hosting links.
    - All three Server and six App candidate targets, including the signed Android universal APK, passed in https://github.com/TNTcraftHIM/Piik/actions/runs/40350004792. This uses the same release packaging path with publication disabled.
    - The complete network laboratory passed in https://github.com/TNTcraftHIM/Piik/actions/runs/40354253735: 43 expected scenario outcomes (37 media connections, six expected-unavailable controls), six negative controls, and complete process/network cleanup.
    - Recoverable-error checks cover real encrypted input replies and legacy opt-in, retained grants and held-key cleanup, real Windows target geometry recovery, candidate queue overflow, and audio-parameter retry on the existing edge. Android room failure and full shutdown use real launcher, control WebSocket and supervised-process checks; unrelated site resources remain intact.
    - The lifecycle fixes at `7eb04de373567cfe7aff2db6c93adf2a38e0b1aa` passed all nine package targets and Go/vulnerability/race/Web checks in https://github.com/TNTcraftHIM/Piik/actions/runs/40362794088, including macOS x64/ARM64 cgo and Android. Publication was skipped.
    - Final cross-review found and fixed the same candidate-overflow false failure in the SFU voice owner. Its real-Pion regression verifies the first 64 candidates remain queued, a valid answer drains them, and renegotiation succeeds. Independent reviews confirmed real SDP and authorization failures still propagate.
    - A real-browser before/after check reduced microphone enumeration from nine calls to one across eight ordinary Host rerenders. Changing the native client or switching to Browser capture still enumerates the new devices. The separate focused contribution #507 preserves input focus during queued floating-panel opening and is not attributed to this phase.
    - The verified Windows candidate and reproduction steps have been updated in #502. macOS/Linux physical-device coverage and iOS device acceptance keep their documented boundaries.
    
    ## Impact / 影响
    
    - Planned release: **v2.5.0**; no public wire or storage version bump.
    - Android is a sharing and controlling endpoint, not a remotely controlled Android device. iOS is held outside this release.
    - New Android release target joins the existing complete-target, checksum, GitHub and Gitee artifact pipeline. Signing material stays outside Git; optional input SDKs/drivers are not bundled.
    - The owner authorized closure and publication after the final design review and acceptance checks. Restore the publication gate after the held focused contribution and merge this complete phase once; CI publishes only after its full checks and registered packages pass.
    - Current TODO, platform guidance, media/routing evidence and release operations retain their existing document owners; no additional audit ledger or changelog archive is introduced.
  • fix(media): improve connection recovery and capture compatibility (#498)
    ## Problem and outcome
    
    Stale ICE and transport callbacks, interrupted media ownership, and optional encoder capabilities could break otherwise recoverable sharing sessions. This maintenance phase corrects those owners across Web, Native and embedded SFU, improves current-state diagnostics, and finishes the affected UI and documentation animation paths.
    
    Android, QR invitations and App/Server headline presentation stay on their feature branch. This PR contains the accepted maintenance scope only.
    
    ## Release notes
    
    **Play together. Your turn!**
    
    Approved friends can play together with shared keyboard and mouse controls or optional gamepads.
    
    **远程同乐,轮到你啦!**
    
    获准的朋友可以共用键鼠,或使用可选手柄,一起玩本地多人游戏。
    
    ### English
    
    This maintenance update improves connection recovery, capture compatibility and troubleshooting for existing Piik rooms.
    
    - Keep ICE candidates and gathering completion tied to their current connection. Preserve Viewer route preferences through reconnection and retry newly available Peer opportunities after SFU fallback.
    - Correct picture and voice ownership during restart, source replacement and connection retirement. Report failed picture dependencies while keeping room voice available.
    - Separate capture and forwarding statistics and isolate pooled sender attachment failures.
    - Improve Windows H.264 compatibility with optional encoder properties, retain safe capture failure codes, and keep shared sound volume usable without microphone support.
    - Improve remote input continuity and mouse responsiveness after idle.
    - Fix fullscreen handling in some mobile browsers, source-picker refresh, delayed chat confirmations, starred-site startup and local App requests. Refine control motion and reduced-motion behavior.
    - Restore the mascot's face and shared animation lifecycle in the documentation header.
    - Include current connection and playback state in diagnostic exports, update Zod to 4.6.6 and simplify shared lifecycle code.
    
    Existing 2.x protocols, configuration and default quality settings are preserved.
    
    ### 中文
    
    本次维护更新改善现有房间的连接恢复、采集兼容性和故障诊断。
    
    - ICE 候选和收集结束事件跟随当前连接;重连保留观众线路偏好,SFU 兜底后出现新的可用 P2P 机会仍可尝试。
    - 修正重启、换源和连接结束时的画面与语音生命周期;语音继续时,画面失败会明确反馈。
    - 区分采集与转发统计,隔离编码池中单个输出连接的失败。
    - 改善 Windows H.264 可选属性兼容性,保留有效的采集失败原因;没有麦克风能力时也能调整共享声音音量。
    - 修复部分移动浏览器全屏、选源刷新、迟到聊天确认、收藏站点启动和本机 App 请求问题,打磨控件动效及减少动态效果行为。
    - 修复文档导航 mascot 面部一直隐藏的问题,接回共用动画生命周期。
    - 诊断导出补取当前连接与播放状态,升级 Zod 至 4.6.6,精简共用生命周期代码。
    
    沿用现有 2.x 协议、配置和画质默认值。Android、二维码邀请及 App/Server 新增的 HEADLINE 展示留待后续版本。
    
    ## Verification
    
    - `npm run check`: type-check, 98 test files / 1,765 tests, production Web build passed.
    - `npm run check:go-core`: Go formatting, tests, vet, Windows/Linux builds passed; Darwin builds require the native CI runners.
    - `npm run check:native`: current Windows capture compilation, fixtures and capability probe passed.
    - `npm run build:website`, TypeScript and repository hygiene checks passed after the documentation-brand fix.
    - Existing controlled media lifecycle and P2P/SFU voice acceptance covered the retained route/transport changes. Final local browser acceptance covered actual sharing and pause/resume, fullscreen, source refresh, voice/keyboard/settings, 320px to desktop layouts, both themes and all presentation modes. Documentation brand was reproduced broken, then verified on load, replay and reduced motion.
    - Independent scoped reviews found no integration blocker.
    
    ## Impact
    
    Patch release v2.4.1. Existing 2.x wire, configuration, authority, capacity and default quality contracts remain intact; no data migration. Source volume no longer depends on microphone availability. Zod 4.6.6 fixes GHSA-mrhx-c7xc-m3w5.
    
    The device-specific Windows reports #495 and #452 remain under investigation; this PR improves compatibility and diagnostics without claiming those reports fully resolved. Physical macOS acceptance remains with its native runner/device checks.
  • feat(room): add remote co-play and refresh the room experience (#497)
    ## Problem and outcome
    
    This phase adds consented remote co-play to normal App/Web rooms and integrates the accepted audio, playback, participant-state and multi-site improvements. It also rebuilds the bilingual README/documentation reading path, refreshes real-component illustrations, and publishes the selected website film.
    
    The candidate preserves the established 2.x sharing/viewing contracts. Optional new behavior follows negotiated capabilities; Windows gamepads use an externally installed driver. The separate accompaniment experiment and unselected film studies are outside this phase.
    
    ## Release notes
    
    **Play together. Your turn!**
    
    Approved friends can now play together with shared keyboard and mouse controls or optional gamepads.
    
    **远程同乐,轮到你啦!**
    
    获准的朋友现在可以共用键鼠,或使用可选手柄,一起玩本地多人游戏。
    
    ### English
    
    Piik 2.4 adds remote co-play, improves shared sound and room controls, and rewrites the bilingual getting-started and help guides around what you want to do.
    
    #### Highlights
    
    - Let approved friends control together. Each player's held keys and gamepad retire independently; everyone shares the Host's mouse pointer. On Windows x64, optional virtual gamepads use a Host-installed ViGEmBus driver. Piik does not bundle or install it.
    - Control shared output volume from the Host's playback bar. The optional share microphone adds your voice to the picture, independently of room voice; stopping the share leaves room voice running. Room voice now defaults to 64 kbps and offers a Host bitrate control.
    - See voice and remote-control participation directly on the couch. Connection details group picture and voice by receive/send direction. Playback actions, chat-overlay settings and dismissible operation feedback have clearer, consistent places.
    - Approve several Piik sites in App and manage each separately, with one optional startup favorite.
    - Follow rewritten English and Chinese README and documentation paths: watching, starting a share, room tools, remote control/co-play, and symptom-based help. Illustrated guides use current product components, theme-aware screenshots and shared diagrams. A dedicated network guide covers campus networks, media UDP, SFU sites and optional virtual LANs.
    - The website has clearer App and co-play FAQs and the selected bilingual 64-second film, with shared playback controls and a held closing card.
    
    #### Fixes
    
    - Tolerate small macOS capture-crop rounding errors without accepting genuinely invalid geometry.
    - Keep shared-audio and microphone volume changes independent, preserve commentary through source replacement, and retire each input at its owning lifecycle boundary.
    - Improve narrow-player controls, touch-held volume menus, tooltip placement and feedback cleanup after reconnection.
    - Repair the release recovery test on macOS and refresh the build and tunnel runtimes.
    
    #### Updating and limits
    
    Update the Host's App and the room site, then refresh open pages to use the new features. Established sharing and viewing remain compatible within 2.x; older peers retain the features they support. The wire versions and SQLite schema are unchanged. Restarting App or Server interrupts active sessions.
    
    Before downgrading App, remove extra approved sites in the newer launcher so at most one remains. Use the [remote-control guide](https://piik.tv/docs/remote-control.html?lang=en) for the optional Windows driver. Linux gamepads remain experimental; macOS virtual gamepads are not currently available. Windows 10 window-sharing black screens ([#495](https://github.com/TNTcraftHIM/Piik/issues/495)) remain under investigation; use screen sharing if affected.
    
    ### 中文
    
    Piik 2.4 新增多人远程同乐,改进分享声音与房间控制,并围绕实际任务重写双语上手教程和帮助文档。
    
    #### 主要更新
    
    - 允许获准的朋友同时控制。各人的按键持有和手柄独立释放,大家共用房主的鼠标指针。Windows x64 可使用房主自行安装的 ViGEmBus 驱动提供虚拟手柄;Piik 不捆绑或安装驱动。
    - 房主可通过播控调整分享输出音量。可选的分享麦克风把说话声加入画面,与房间语音独立;停播后房间语音继续。房间语音默认提升至 64 kbps,并提供房主码率设置。
    - 沙发人物直接呈现语音和远控参与状态;连接详情按画面/语音、接收/发送分组。播放操作、弹幕设置和可关闭的操作提示各有清楚、一致的位置。
    - App 可授权多个 Piik 站点,逐个管理,并选择一个启动时打开的星标站点。
    - 重写中英文 README 和文档中心:从观看、开始分享、房间工具、远控/同乐到按症状排障。图文教程使用当前正式组件、明暗主题截图与同源示意图;独立网络指南说明校园网、媒体 UDP、SFU 站点和可选虚拟局域网的用法。
    - 官网改进 App 与多人同乐 FAQ,采用选定的双语 64 秒短片,复用产品播控并保留结尾品牌卡。
    
    #### 修复
    
    - 容忍 macOS 采集裁剪中的微小舍入误差,仍拒绝真正无效的画面边界。
    - 分享总音量与麦克风音量分别更新;换源保留解说,各项输入按所属生命周期释放。
    - 改进窄屏播控、触摸长按音量菜单、提示定位,以及重连后的提示清理。
    - 修复 macOS 上发布恢复测试的可移植性,更新构建与公网隧道运行组件。
    
    #### 更新与限制
    
    将房主 App 和房间站点更新后,刷新已打开的页面,即可使用新功能。2.x 内保留已有分享与观看兼容性,旧端继续使用其支持的功能;协议版本和 SQLite schema 不变。重启 App 或 Server 会中断当前会话。
    
    如需降级 App,先在新版启动页删除额外授权,最多保留一个站点。可选的 Windows 驱动安装方法见[远控指南](https://piik.tv/docs/zh/remote-control.html)。Linux 手柄仍属实验能力,macOS 当前暂不提供虚拟手柄。Windows 10 窗口分享黑屏而整屏正常的反馈([#495](https://github.com/TNTcraftHIM/Piik/issues/495))仍在调查,本版不声称已修复。
    
    ## Verification
    
    - Integrated Web typecheck, 98 test files / 1,734 tests and production build passed. Later scoped UI repairs passed focused typecheck/tests and preview checks.
    - Focused Go checks cover input grant/held-state ownership, delayed device retirement, native control/Host, config/launcher/loopback, voice negotiation and source-volume binding. Windows capture compilation/probe and the isolated Linux uinput kernel gate passed.
    - Normal-page P2P (22 checks) and embedded-SFU (19 checks) gates passed. P2P explicitly exercised source commentary with room voice, independent shutdown, share retirement and the next share's default-off state; SFU also covers live voice bitrate and voice recovery.
    - Documentation links (108 Markdown files), generated-diagram freshness, the complete bilingual/theme screenshot pipeline and website production build passed. Website/readers were checked at 320, 768 and 1440 px with both languages/themes.
    - macOS crop logic retains geometric self-tests; this Windows environment did not repeat a macOS SDK/hardware run. Linux desktop/game recognition and macOS virtual-gamepad entitlement/runtime remain explicit limits.
    - Windows native window-sharing acceptance passed: Host/Viewer decoding, live and paused quality changes, resize/minimize/restore, source replacement, stop and restart. Capturing the Host Chrome window also passed with Auto/H.264 and VP8, including decoded-frame and pixel checks. The Windows 10 case in #495 was not reproduced and remains separate.
    - Current Go serializers passed the published v2.0.0/v2.3.0 TypeScript readers; existing native input opt-in checks passed. This checks payload compatibility, not an end-to-end run of old published clients.
    
    ## Impact
    
    Compatible 2.x feature release; Browser/server v24, Native control v10, capture v7 and SQLite schema 2 remain unchanged. New co-play, presence, voice settings and native volume behavior are capability-negotiated. Multi-site App settings retain the older single-site reader path; arbitrary binary downgrade is not promised. No independent room/router, new NAT policy, driver installer or separate accompaniment channel is introduced.
    
    ## Related work
    
    Includes the macOS crop correction reported in #492 and the macOS deployment-test portability contribution from #496. Supersedes the incomplete phase PR #494. #495 remains open.
    
    ## Attribution
    
    Co-authored-by: Yuqing Huang <670081066@qq.com>
    Co-authored-by: luol75569-collab <297886760+luol75569-collab@users.noreply.github.com>
  • feat(voice): add room voice and secure local invitations
    ## Problem and outcome / 问题与结果
    
    Planned release: **v2.3.0**, preserving the published 2.x sharing contracts.
    
    Friends can now talk in a Piik room before, during or after screen sharing. Room
    voice, media forwarding and the picture retain separate lifetimes under the
    existing room authority and route controller. This phase also improves direct LAN
    entry, native capture startup, interaction controls and first-use documentation.
    
    Related: #484, #437, #486, #488, #485 and #489. These references do not declare
    all reported hardware or distribution problems fixed.
    
    ## Release notes
    
    **Less typing. More talking.**
    
    Piik now supports room voice, with or without screen sharing.
    
    **聊不够?开麦吧!**
    
    Piik 现已支持房间语音,不开播也能聊。
    
    ### English
    
    This update adds room voice alongside sharing, chat and reactions, with clearer
    controls and direct HTTPS invitations for local and virtual networks.
    
    #### Highlights
    
    - Create a room before sharing. The Host opens or closes room voice; friends
      can join, control their own microphone and listening, or mute someone locally.
      Joining voice keeps the microphone off until you enable it.
    - Choose your microphone, adjust microphone, master and individual listening
      volumes from 0% to 200%, and enable voice processing in the interaction window.
      Audio icons offer quick volume sliders. The microphone icon shows live input
      level. Voice continues when the picture stops.
    - Use a local HTTPS invitation for microphone and remote-control features on a
      LAN or virtual LAN. A temporary local certificate requires a browser warning
      confirmation; a self-hosted Server can also use supplied certificate files.
    - Rotate your local picture, optionally volunteer more relay capacity, and
      download a native Windows x64 Server package.
    
    #### Fixes and polish
    
    - Align Windows automatic encoder probes with the surfaces used during actual
      capture; keep video capture progressing while optional source audio starts.
    - Correct Linux desktop pixel-aspect negotiation and accept fitted native
      source dimensions without forcing a different aspect ratio.
    - Avoid retaining false media queue congestion when producer and consumer
      clocks disagree.
    - Distinguish chat authors with identical names, clarify remote permissions,
      and keep floating tools, contextual hints and microphone indicators aligned.
    - Separate first-use guides, room tools and troubleshooting so help is easier
      to find.
    
    Use updated Server/Web pages for room voice and update the App for the native
    capture and local HTTPS improvements. Established 2.x sharing remains supported.
    macOS builds do not yet carry Developer ID signing or Apple notarization; see the first-launch instructions.
    The macOS audio-startup changes still need confirmation on an affected Mac.
    
    ### 中文
    
    本次更新为分享、聊天和表情互动加入房间语音,同时打磨操作控件,并为局域网和虚拟局域网提供直接 HTTPS 邀请。
    
    #### 主要变化
    
    - 不开播也能创建房间。房主开启或关闭房间语音;朋友可以加入、自行开关麦克风和收听,或仅在自己这边静音某人。加入语音时默认不开麦。
    - 在互动窗口选择麦克风、分别调整 0%–200% 的麦克风、总收听与个人音量,并设置语音处理。音频图标可展开快捷音量条,麦克风图标显示实时输入音量。停止画面分享后,语音仍可继续。
    - 局域网和虚拟局域网可使用本地 HTTPS 邀请,启用麦克风和远程控制;临时本地证书需要在浏览器确认警告。自部署服务端也可使用自行提供的证书文件。
    - 可旋转本地观看画面、自愿增加转发容量,并提供 Windows x64 服务端下载包。
    
    #### 修复与打磨
    
    - Windows 自动编码探测使用与实际采集一致的输入;可选来源音频启动期间,画面采集继续运行。
    - 修正 Linux 桌面采集的像素比例协商;原生来源保留实际画幅,不再要求固定比例的尺寸。
    - 避免生产者和消费者时钟不一致时,错误保留媒体队列拥塞状态。
    - 区分同名聊天作者,明确远控授权,并统一浮窗、上下文提示与麦克风指示器的细节。
    - 分开首次使用、房间工具和故障排查文档,让帮助更容易查找。
    
    房间语音需使用更新后的服务端和网页;原生采集与本地 HTTPS 改进需更新 App。既有 2.x 分享仍保持兼容。
    macOS 构建仍未正式签名和公证,首次启动请参照文档;音频启动调整仍需在受影响的 Mac 上确认。
    
    ## Verification / 验证
    
    Full Web checks, Go tests/vet/build/native probes, reachable vulnerability checks,
    normal-page P2P/SFU voice and compatible sharing, LAN HTTPS, detached interaction
    tools, responsive controls and tooltip/pure-visual checks provide acceptance
    evidence. Physical macOS/Linux capture and acoustic behavior on arbitrary devices
    are not established by these controls.
    
    Scoped contributions from #488 (Linux pixel aspect) and #485 (Windows Server
    packaging) are retained as their original authors' patch commits in this PR.
    The remaining implementation and integration belong to the maintainer.
    
    ## Impact / 影响
    
    Preserve the published 2.x sharing contract. New room-voice behavior is opt-in;
    Host voice activation, capture and picture lifetimes remain distinct. Local
    certificate material remains in memory; no system trust installation is performed.
  • feat: add attended remote control and refine shared viewing (#482)
    Piik can now let one invited Viewer control the Host's shared desktop or window, using the existing media route and explicit source-scoped consent. This phase also finishes Viewer playback settings, the combined interaction window, the shared control/theme/icon polish, and concrete forwarding-feedback recovery fixes.
    
    Remote input stays off by default, uses one controller and releases held input on revocation, retirement or loss. Existing 2.x sharing remains compatible; new capabilities are negotiated with supporting App/Site/relay peers. No virtual input driver, new media listener or route planner is added.
    
    Validation: full Web check (97 files / 1,677 tests), Windows Go/native checks; seven real Browser/App lifecycle scenarios covering P2P, SFU and fallback-to-direct continuity; existing cross-version and physical Windows routed-input evidence; native macOS/Linux packaging, Go race/security and container checks through the publishing pipeline. Physical macOS/Linux permissions, mobile devices, mixed DPI and commercial games retain their documented limits. README/wiki keep deployment under the optional self-hosted Server chapters.
    
    Refs #472, #477, #479, #480. Issue follow-up happens after publication; unmatched field reports remain open.
    
    ## Release notes
    
    ### 中文
    
    这是一次功能更新:一起看屏幕时,可以把键鼠交给一位朋友操作,聊天和表情也整合进了同一个互动窗口。本次还整理了分享与播放设置,并修复部分连接恢复和中转画质停滞的问题。
    
    #### 新功能与体验
    
    - **可选键鼠远控**:房主可以让一位朋友操作当前分享的桌面或窗口,随时撤回授权;换源或停播后关闭远控。提供手机触控、缩放和小键盘。当前实机验证覆盖 Windows App。
    - **观众播放设置**:新增完整显示、等比铺满、拉伸铺满,以及自动/仅 P2P/仅 SFU 线路选择;站点和房主的线路限制仍然生效。
    - **互动窗口**:聊天、参与者和表情放在同一窗口;可以从聊天头像选择接收者,新增点赞、倒彩等表情。支持的浏览器可以独立置顶,继续查看聊天和互动。全屏保留弹幕开关。
    - **分享与播放设置更清楚**:暂停与停止相邻,画面、声音、连接和远控各有对应入口。观众播控在移动鼠标时显现,远控时收进画面边缘的小抽屉;点击画面不再意外暂停。没有声音输入时播控给出明确反馈,恢复输入后保留观众的音量设置。
    
    #### 修复
    
    - **连接与播放修复**:修正部分中转路径的媒体时钟、往返时间与重复反馈统计,改善这些错误导致的画质恢复停滞;重新进入房间后,SFU 连接仍可继续尝试直连。同步底层握手恢复修复。
    - **界面修复**:修复浮窗返回后遮挡全屏、无法操作,窄屏控件错位、菜单超出边界等问题。虚拟键盘长按不会选中文字,拖出、取消或失焦后释放按键。页面和选源面板统一中性底色;App 图标与 favicon 保留小电视轮廓,精修对比度与底板层次。
    - **兼容性修复**:新表情按站点支持情况显示,避免旧站点拒收后断开连接。补齐旧浏览器的浮层支持;修正 macOS `.app` 对包外启动文件的依赖。macOS 的 Finder、权限和远控仍需实机验证。
    
    #### 更新说明
    
    沿用 2.x 兼容边界。使用远控需要更新房主 App 和所连接的站点;要获得完整的中转修复,请同时更新 App 与自部署 Server。
    
    ### English
    
    This feature update lets a Host hand keyboard and mouse control to one friend while sharing a screen. Chat and reactions now share one interaction window. It also clarifies sharing and playback settings and fixes specific connection-recovery and server-forwarding quality stalls.
    
    #### Features and experience
    
    - **Optional keyboard and mouse control:** the Host can let one friend control the shared desktop or window and revoke access at any time. Changing sources or stopping sharing disables control. Touch controls, zoom and an on-screen keyboard are included. Physical validation currently covers the Windows App.
    - **Viewer playback settings:** choose fit, crop or stretch, and Auto, P2P-only or SFU-only routing. Site and Host restrictions still apply.
    - **One interaction window:** chat, participants and reactions stay together. Choose a recipient from their chat avatar and use new reactions, including thumbs up and down. Supported browsers can detach the window and keep chat and reactions visible on top. Fullscreen retains the chat-overlay toggle.
    - **Clearer sharing and playback controls:** pause and stop stay together, with separate picture, sound, connection and remote-control settings. Pointer movement reveals the playback bar during viewing; remote control uses a small drawer at the picture edge. Clicking the picture no longer pauses it accidentally. Sound controls reflect missing input and retain the Viewer's volume when it returns.
    
    #### Fixes
    
    - **Connection and playback fixes:** correct media clocks, round-trip-time updates and duplicate feedback accounting on affected forwarding paths, improving recovery from the quality stalls caused by those errors. Rejoining a room restores direct-connection attempts while SFU playback continues. Incorporate upstream handshake-recovery fixes.
    - **Interface fixes:** returning a detached tool during fullscreen no longer leaves an inaccessible panel over the picture. Fix compact-layout shifts and overflowing menus. Holding a virtual key no longer selects its label; release, cancellation and focus loss clear held keys. Pages and the source picker use shared neutral surfaces. Refine App icons and favicons while retaining the familiar television outline.
    - **Compatibility fixes:** show new reactions only when the site supports them, preventing disconnects on older sites. Support popovers on older browsers and remove the macOS `.app` launcher's dependency on files outside the bundle. Finder, permissions and remote input still need physical macOS validation.
    
    #### Updating
    
    The existing 2.x compatibility boundary is retained. Remote control needs an updated Host App and site; update both App and self-hosted Server for the complete forwarding fix.
  • feat(app): improve startup and media recovery (#478)
    This compatible update improves quality recovery after congestion and stream changes, and lets an approved Site become the App's startup page. It also aligns responsive controls and external brand assets while preserving the in-page mascot and illustrations.
    
    The existing media allocator, room graph and authorization owners remain in place. The scoped LiveKit demand-input patch is pinned and submitted upstream in livekit/livekit#5016; its removal condition is documented. No wire or storage version changes.
    
    ## Validation
    
    - Web type-check, unit tests and production build; Go core/native acceptance and website build.
    - Focused controlled recovery/relay/NAT evidence reused from this phase, plus final integrated lifecycle checks.
    - Independent media and UI reviews; corrected the ready App button's stale passive styling.
    - Repository hygiene, documentation links, responsive launcher/theme previews and package icon propagation.
    - Physical macOS/Linux capture and unmatched reporter cases remain documented; controlled tests do not establish a public connection success rate.
    
    ## Release notes
    
    ### 中文
    
    这是一次兼容 2.x 的功能与维护更新,重点改善网络波动后的画质恢复,并让常用站点的 App 启动流程更方便。
    
    - **更快恢复画质:** 修复部分 App 分享与服务器中转线路在网络恢复后仍长时间保持低码率的问题;调整 Windows 原生编码,减少短暂波动造成的分辨率下降,并加快恢复。
    - **更稳定的中继播放:** 修复原生中继在分辨率变化、画面数据不完整和换源时的恢复处理,以及延迟关键帧请求被丢失的问题。
    - **启动时打开常用站点:** 可以为已授权站点加星,下次启动 App 时直接打开它;仍可通过网页 App 按钮或终端地址返回启动页管理授权和选择模式。
    - **简化连接设置:** NAT 穿透增强在能力可用时自动启用;高级用户可通过 `PIIK_STUN_URLS` 指定 App 公网邀请使用的 STUN 服务。
    - **界面与图标打磨:** 修正窄屏房间工具栏、昵称编辑和浮层排版,精简启动页说明,统一官网与应用的语言、深浅色控件,并更新 App 图标与网站 favicon。页面内的 mascot 和插画保持原有风格。
    - **补充连接排查指引:** 更清楚地区分公网邀请服务、站点访问与媒体连接问题。
    
    本次更新不改变 2.x 通信协议或数据库格式。浏览器采集在部分网络波动后仍可能恢复较慢;此次修复不代表所有网络和设备上的画质问题均已消除。
    
    ### English
    
    This compatible 2.x feature and maintenance update improves quality recovery after network disturbances and makes it easier to launch the App with your usual Site.
    
    - **Faster quality recovery:** Fixed cases where native App sharing or server-relayed media stayed at a low bitrate after bandwidth returned. Tuned Windows native encoding to reduce resolution drops during brief disturbances and recover sooner.
    - **More reliable relay playback:** Fixed native relay recovery across resolution changes, incomplete frames and source replacement, and preserved delayed keyframe requests until they can be fulfilled.
    - **Open your usual Site on startup:** Star an approved Site to open it when the App starts. The page's App button and the terminal's launcher address still provide access to approval management and room modes.
    - **Simpler connection settings:** Available NAT traversal enhancement now activates automatically. Advanced users can set `PIIK_STUN_URLS` to choose the STUN services used by App public invitations.
    - **Interface and icon polish:** Fixed narrow-screen room controls, nickname editing and overlays; simplified launcher guidance; aligned website language and theme controls with the App; and refreshed App icons and website favicons. In-page mascots and illustrations retain their existing appearance.
    - **Clearer connection troubleshooting:** Updated guidance distinguishes public-invitation service failures, Site access and media connectivity.
    
    This update preserves the 2.x communication protocols and database format. Browser capture can still recover slowly after some network disturbances; these fixes do not resolve every quality issue on every network or device.
  • 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(rooms): reclaim empty rooms on public sites (#456)
    Public sites can exhaust the four-digit room-code pool because retained room authority has no default expiry. Add an opt-in empty-room timeout and reclaim the oldest eligible empty room when capacity is exhausted. Connected Hosts and Viewers retain their rooms through sharing, pause and idle chat; the existing reconnect grace protects early reclamation.
    
    The default remains disabled, including App Local and the internal deployment. The public Demo will use `ROOM_EMPTY_TIMEOUT_SECONDS=3600`. Retirement reuses the storage-first deletion and signaling cleanup owners; no protocol or SQLite schema changes are required.
    
    Validation: Web type-check, 81 test files / 1372 tests and production build; Go core tests, formatting, vet and target builds; documentation/project hygiene; access-privacy gate; live server expiry/occupied-room check. Regression coverage includes all 9000 codes, restart, stale credentials, reconnects, revocation and atomic storage failure. Native device behavior is unchanged; physical macOS/Linux acceptance retains its documented limits.
    
    ## Release notes
    
    ### 中文
    
    这是一次面向公共站点的维护更新,解决长期保留的空房间占满房间号的问题。
    
    - 管理员可配置空房间回收时长;号码用满时,优先回收过期空房间,再按创建顺序回收符合条件的空房间。在线分享、暂停和聊天均会保留。
    - 房间号确实已用满时,界面会显示更明确的提示。
    - 自动回收默认关闭。公共站点可设置 `ROOM_EMPTY_TIMEOUT_SECONDS=3600`,在房间连续无人在线一小时后回收;未配置的站点保持原有行为。
    
    ### English
    
    This maintenance release helps public sites avoid exhausting room codes through indefinitely retained empty rooms.
    
    - Operators can configure an empty-room timeout. When all codes are in use, allocation reclaims expired empty rooms first, then the oldest eligible empty room. Connected sharing, paused sessions and chat remain protected.
    - Capacity errors now provide clearer guidance when no room code is available.
    - Automatic reclamation is disabled by default. Public sites can set `ROOM_EMPTY_TIMEOUT_SECONDS=3600` to retire rooms after one continuous hour with no connected participants. Unconfigured sites retain their existing behavior.
  • feat(app): improve sharing controls, recovery and troubleshooting
    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.
  • feat: improve microphone, chat and platform support
    This release adds microphone processing controls and local chat controls, expands platform packages, and synchronizes the website and guides. It also fixes native H.264 input/format handling, signaling recovery, fresh STUN discovery, and UDP ownership during overlapping connections.
    
    This is **v1.8.0**. Browser/Server v23, Native control v9 and capture v7 remain unchanged, with the existing 1440p ceiling. Additional resolutions, capability negotiation and Magicsock are separate follow-up work.
    
    ## Validation
    
    - Full local Web check: 79 files / 1,317 tests, TypeScript and production build.
    - Full Go checks, platform builds and Windows native capture regressions/probe.
    - Native H.264 Host lifecycle, Browser-to-App fanout and App-exit recovery, and Native H.264 through embedded SFU: all passed with owned process/port/profile cleanup.
    - Website build, documentation and repository hygiene passed. Existing UI acceptance covers narrow screens, both languages/themes, architecture downloads and all 23 film checks; final packaging and Go race checks run on the merged revision in CI.
    - Physical macOS/Linux capture, representative public networks and unmatched field reports retain their documented evidence limits. No claim that every blur/disconnection report is resolved.
    
    ## Release notes
    
    ### 中文
    
    这是一次功能与兼容性更新:麦克风和聊天增加了实用的小选项,App 与 Server 支持更多设备,同时修复了原生分享和连接恢复中的若干问题。现有 1.x 协议保持不变。
    
    #### 新增与改进
    
    - 浏览器麦克风新增「降噪与回声消除」开关,默认开启回声消除、降噪和自动增益;分享音乐或使用虚拟音频输入时,可按需关闭。
    - 可调整弹幕字号和透明度,并将当前保留的聊天记录导出为 TXT。当前会话最多保留 1,000 条文字消息,刷新页面后清空;需要保存时请先导出。
    - 新增 Intel Mac、Linux ARM64 App,以及 Linux ARM64 Server 和容器镜像。官网下载区可直接选择对应架构,并显示最新版本和发布时间。
    - 更新官网演示、README 截图和中英文教程,明确浏览器分享也可选择窗口或屏幕;开始分享前显示房间号占位,保持底栏控件位置稳定。
    - 官网新增直达问题排查的入口,补充浏览器 WebRTC 限制、校园网和 Windows 显卡相关的排查步骤。
    - App 模式选择页显示免费开源说明、作者与贡献者署名,以及官方网站和源码链接。
    
    #### 修复
    
    - 修正部分 H.264 原生分享的格式兼容性校验,以及 Windows 编码器输入长度和输出缓冲区对齐问题。
    - 清理已失效的重连任务和 Native 接收信令,避免旧连接继续影响当前会话。
    - 修复 App 重连时可能复用过期公网地址的问题;重新探测使用当前地址,并处理探测丢包和过期响应,保留其他正常连接。
    - 修复 App 新旧媒体连接重叠时共用端口造成的冲突,避免准备或撤销新连接打断仍在使用的画面;关闭连接时及时取消未完成的端口映射请求。
    - 无站点密码时,连接恢复不再误引导用户输入站点密码。
    - 房间失效或会话终止时,开播前后的原因提示统一显示在电视状态图标中,避免额外提示条。
    - 修正 Linux 原生采集的时间戳与关键帧时间基准。感谢 Pedro Antonio 在 [#449](https://github.com/TNTcraftHIM/Piik/pull/449) 的贡献。
    
    #### 使用说明
    
    下载对应平台的完整压缩包,退出旧 App 后解压使用。Windows 继续提供 x64;macOS 提供 Apple 芯片与 Intel 版本,原生采集需要 macOS 13 或更新版本。Linux 提供 x64 与 ARM64,原生采集还需安装[系统组件](https://github.com/TNTcraftHIM/Piik/blob/main/native/capture/linux/README.md)。macOS 和 Linux 的实机覆盖仍有限,欢迎反馈。
    
    ### English
    
    This update adds useful microphone and chat controls, brings Piik to more devices, and fixes several native-sharing and connection-recovery issues. The existing 1.x protocols remain unchanged.
    
    #### New and improved
    
    - Browser microphones now have a “Noise & echo reduction” toggle. Echo cancellation, noise suppression and automatic gain control are on by default; turn them off when appropriate for music or virtual audio inputs.
    - Adjust chat-overlay text size and opacity, and export retained messages as TXT. The current session keeps up to 1,000 text messages and clears on page refresh; export first if you want to keep them.
    - Added Intel Mac and Linux ARM64 App packages, plus Linux ARM64 Server and container images. The website provides architecture selectors and shows the latest release and publication date.
    - Updated the website demonstration, README screenshots and bilingual guides, clarifying that browser capture can also select windows or screens. A room-code placeholder keeps the bottom bar stable before sharing starts.
    - Added direct website links to troubleshooting, with steps for browser WebRTC restrictions, campus networks and Windows graphics issues.
    - The App mode-selection page now shows its free and open-source status, author and contributor credit, and links to the official website and source.
    
    #### Fixes
    
    - Corrected H.264 format compatibility checks and Windows encoder input-length and output-buffer alignment handling.
    - Retired stale reconnect tasks and Native receive signals so they cannot continue affecting the current session.
    - Fixed App reconnection reusing an expired public address. Fresh discovery handles lost probes and stale responses while preserving other working connections.
    - Fixed UDP socket conflicts between overlapping App media connections so preparing or canceling a replacement preserves the active picture. Closing a connection now cancels unfinished gateway mapping requests.
    - Connection recovery on passwordless sites no longer incorrectly asks for a site passphrase.
    - Expired-room and session-termination reasons now use the same TV status indicator before and during sharing, without an extra notice strip.
    - Corrected Linux native capture timestamps and keyframe time bases. Thanks to Pedro Antonio for [#449](https://github.com/TNTcraftHIM/Piik/pull/449).
    
    #### Updating
    
    Download the complete archive for your platform, quit the old App, and extract the new package. Windows remains x64-only. macOS packages support Apple silicon and Intel; native capture requires macOS 13 or newer. Linux supports x64 and ARM64 and requires additional [system components](https://github.com/TNTcraftHIM/Piik/blob/main/native/capture/linux/README.md) for native capture. Physical-device coverage on macOS and Linux remains limited; feedback is welcome.
    
    ## Attribution
    
    Co-authored-by: Pedro Antonio <wrenchwastaken@gmail.com>
  • feat: add room interactions and media sharing improvements
    ## Problem and outcome / 问题与结果
    
    This phase adds lightweight room interaction without making media depend on chat,
    and adds Windows source-audio exclusion and optional SFU-only hosting at their
    existing owners. It also corrects confirmed encoder/capture ownership and native
    color-conversion defects. Host microphone commentary remains on the shared media
    path; room voice and 4K are outside this phase.
    
    ## Release notes
    
    ### 中文
    
    这是一次功能更新:Piik 加入了文字聊天与表情互动,并完善了 Windows 声音采集、画面颜色和自部署选项。
    
    #### 新功能
    
    - **边看边聊。** 在可移动、可缩放的聊天窗口中发送消息,或开启弹幕。停止分享后,房间中的朋友仍可继续聊天。
    - **表情互动。** 点击沙发上的人物,给自己发表情,或把番茄等表情送给朋友;各端按同一事件显示动画。
    - **排除应用声音。** Windows App 分享整个屏幕时,可排除一个应用及其子进程的声音,适合同时使用语音软件。所选应用退出后,来源声音停止,避免恢复为未过滤的系统声音。
    - **可选的纯 SFU 模式。** 自部署管理员可让共享画面和声音统一通过媒体服务器转发。默认仍为优先 P2P;App 公网邀请保持纯 P2P。
    - **Windows HDR 转 SDR。** 原生采集与缩略图自动将 HDR 来源转换为 SDR,沿用现有观看链路。
    
    #### 修复与改进
    
    - 修复原生颜色转换的范围与矩阵处理,避免已复现的暗部丢失、高光裁切和颜色偏差。
    - 修复共享编码器切换时使用过期需求或过期帧信息的问题,保护正在观看的画面;修复换源后旧采集事件可能影响新来源的问题。
    - 统一新控件、浮窗与来源选择文案,补充中英文使用说明。
    
    #### 使用与升级
    
    聊天与表情需要新版站点页面和 Server;声音排除需要新版页面与支持此能力的 Windows App。聊天只保留本页最近收到的消息,刷新后清空,不补发历史,且不提供端到端加密。
    
    HDR 转换输出为 SDR,不代表端到端 HDR 或多声道支持。既有房主麦克风与立体声能力保留。
    
    ### English
    
    This feature update brings text chat and reactions to Piik, alongside improvements to Windows audio capture, picture colors and self-hosting options.
    
    #### New features
    
    - **Chat while watching.** Send messages in a movable, resizable window, or enable on-screen chat. Friends can keep chatting after the host stops sharing.
    - **Reactions.** Select a person on the sofa to react above yourself or send a tomato and other reactions to a friend. Participants animate the same shared event.
    - **Exclude application audio.** When sharing a whole screen with Windows App, exclude one application and its child processes, useful when using a separate voice app. Source audio stops if the selected app exits, preventing a return to unfiltered system sound.
    - **Optional SFU-only hosting.** Site operators can require shared video and audio to pass through the media server. P2P-first remains the default; App Public invite remains P2P-only.
    - **Windows HDR-to-SDR conversion.** Native capture and source thumbnails automatically convert HDR sources to SDR for the existing viewing path.
    
    #### Fixes and improvements
    
    - Correct native color-conversion ranges and matrices, addressing reproduced crushed shadows, clipped highlights and color shifts.
    - Correct stale demand and frame evidence during shared-encoder handoffs to protect the current picture. Prevent events from a replaced capture from affecting its successor.
    - Align new controls, floating panels and source-picker copy, with updated Chinese and English guides.
    
    #### Using this update
    
    Chat and reactions require updated site pages and Server. Audio exclusion requires updated pages and a Windows App that supports the capability. Chat retains only recent messages received by the current page, clears on refresh and does not replay history. It is not end-to-end encrypted.
    
    HDR conversion produces SDR; it does not add end-to-end HDR or surround sound. Existing host microphone commentary and stereo support remain available.
    
    ## Verification / 验证
    
    - Web type checks, 78 test files / 1275 tests and production build: PASS.
    - Go core tests, formatting/vet and target builds: PASS; Darwin cgo remains platform-limited on this Windows runner.
    - Native build/check/color probes and synthetic HDR-to-SDR H.264/VP8 browser reception: PASS.
    - Access/privacy gate, Native H.264 SFU-only media gate and local Auto/H.264 Host gate: PASS.
    - Three real production pages: chat/reactions, stop/resume, idle-room join, host departure/return, offline draft recovery and invitation revocation: PASS.
    - Synthetic parent/child process-audio exclusion and target lifetime: PASS; no raw audio retained.
    - Windows candidate archive extraction and packaged Local startup/shutdown: PASS.
    - Documentation and website build: PASS.
    - [Candidate CI](https://github.com/TNTcraftHIM/Piik/actions/runs/36873766646) at
      `f26cd208d03bc0dcbe353f8cac217f993216b0a3`: Go core and race checks, Web tests,
      Server/container checks and Windows/macOS/Linux App packaging all PASS.
      Publication was skipped as intended.
    
    The owner accepted the UI/model and bounded local walkthrough for phase closure.
    Physical HDR/mixed displays, mobile keyboard,
    real voice applications across output devices and macOS/Linux capture remain
    unverified. Existing field reports without matched evidence are not claimed
    resolved. The owner authorized v1.7.0 publication on 2026-10-02. The final
    documentation-only commit records that authorization; product code matches
    the verified candidate above.
    
    ## Impact / 影响
    
    Authorized version: **v1.7.0**, matching the local release planner. Current wire
    contracts remain Browser/server 23, Native control 9 and capture 7. Optional
    capabilities gate new functionality; existing room/media authority remains owned
    by the existing services. No new ports, message persistence, room voice or
    automatic room creation on page visit. Updated README, guides, standards,
    research evidence and TODO stay with the candidate phase.
  • fix(media): stabilize sharing startup and recovery
    ## Problem and outcome / 问题与结果
    
    Sharing could fail when an optional output or encoder comparison failed, while retired Browser work could block media cleanup. Browser pooling also spent its startup protection before publication and classified its synthetic transport clock as realtime video, delaying recovery after a bandwidth drop. These repairs stay within the existing capture, producer, edge and connection owners.
    
    Self-hosting samples now follow the configured public Origin and permit the site's requested camera/microphone capture. Piik's own Origin rejection has a specific bilingual explanation, distinct from arbitrary proxy 403 responses.
    
    ## Release notes
    
    ### 中文
    
    这是一次分享稳定性维护更新,重点修复开播、换源与画质恢复,并改善自部署站点的配置和错误说明。
    
    - Windows 自动选择编码器时,如果已验证 H.264 可用,后续软件编码对比失败或超时会保留可用的 H.264,避免因此无法开播。
    - 较低画质输出或单条音频发送连接失败时,保留仍然健康的分享和其他连接。
    - 修复停止分享、换源和媒体连接退役时,旧异步任务阻塞清理与恢复的问题。
    - 改善浏览器共享编码的首播画质与网络波动后的恢复,避免因短时码率变化反复重建编码器。
    - 自部署配置示例默认跟随站点网址;创建房间因网址未获允许而返回 403 时,页面会指出需要检查的配置。nginx 示例也修正了对本站摄像头、麦克风的权限限制。
    
    已有自部署站点若遇到 403,请检查 `PUBLIC_BASE_URL` 与 `ALLOWED_ORIGINS`。使用旧 nginx 示例的站点需更新 `Permissions-Policy`;步骤见[自部署教程](https://piik.tv/docs/zh/self-hosting)。本次更新不改变房间、信令或 App 控制协议。
    
    ### English
    
    This maintenance update improves sharing startup, source changes and video-quality recovery, with clearer configuration and error guidance for self-hosted sites.
    
    - Windows automatic codec selection retains a verified H.264 encoder if the subsequent software comparison fails or times out, instead of failing to start sharing.
    - A failed lower-quality output or individual audio sender no longer interrupts healthy sharing and other connections.
    - Fixes retired asynchronous work blocking cleanup and recovery when stopping sharing, changing sources or retiring media connections.
    - Improves initial quality and recovery after network fluctuations in Browser pooled encoding, while avoiding unnecessary encoder recreation after short bitrate changes.
    - The self-hosting sample follows the configured site address by default. Piik's Origin-related room-creation 403 now identifies the settings to check. The nginx sample also permits camera and microphone requests from the site itself.
    
    If an existing self-hosted site returns 403, check `PUBLIC_BASE_URL` and `ALLOWED_ORIGINS`. Sites using the old nginx sample must update `Permissions-Policy`; see the [self-hosting guide](https://piik.tv/docs/self-hosting). Room, signaling and App control protocols are unchanged.
    
    ## Verification / 验证
    
    - `npm run check`: 75 files / 1,106 tests, TypeScript and production Web build passed.
    - `npm run check:go`: Go formatting, tests, vet, supported core builds, Windows native compile and regressions passed. Darwin cgo packaging remains owned by its macOS CI runner.
    - Repository hygiene, documentation checks and website/documentation build passed.
    - Isolated VP8/H.264 Browser checks: constrained-child isolation and recovery, short congestion pulse, live and quiet settings, pause/resume, source replacement and ordinary fallback passed. Controlled bandwidth can still cause temporary low resolution, stalls and A/V jitter.
    - Windows native Auto/H.264/VP8 startup, window resize/fullscreen/minimize/restore, Browser-to-App fanout and embedded-SFU checks passed in the bounded local fixtures.
    - Old-code negative controls reproduce the repaired failure paths. A real Chromium policy check rejects camera/microphone with the previous nginx header and captures both fake devices with the corrected same-origin policy; geolocation remains denied.
    - Independent read-only review covered root ownership, cancellation and the producer/carrier adaptation boundary.
    
    ## Impact / 影响
    
    Compatible patch release, planned as v1.6.4. No wire, storage, routing-authority or interaction-model change. Matching Server restart interrupts current process-owned media; package cutover retains the existing bounded rollback procedure. Unknown field reports still require device/network evidence and are not claimed resolved by local fixtures. Raw diagnostics and experiment artifacts remain ignored; accepted constraints and concise evidence live in their existing documentation owners.
  • 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.
  • fix(ui): prevent playback controls overlapping in narrow windows
    ## Problem and outcome
    
    At 260–300px viewport widths, the playback audio group could shrink below its controls and overlap the window buttons. The shared flex layout now respects each group's minimum content width and wraps only when the groups cannot fit. Ordinary phone layouts remain on one row.
    
    The change also removes the unnecessary macOS-specific troubleshooting section added in v1.5.4 and updates the playback layout contract.
    
    ## Validation
    
    - `npm run check`: TypeScript, 71 test files / 1003 tests, and the production Web build passed with the interaction prototype excluded.
    - Documentation checks, repository hygiene and the complete website/documentation build passed.
    - Browser geometry checks at 260, 300, 320, 375, 440, 480, 768 and 1280px found no overlapping or clipped controls. Viewports from 320px retained one row.
    
    ## Release notes
    
    ### 中文
    
    这是一个小修复版本,解决极窄窗口中播放控件重叠、容易误触的问题。
    
    #### 修复
    
    - 播控优先保持单行,音量滑条随可用空间缩短;空间不足时,音量与窗口操作分组换行,保留全部控件。
    - 精简排查文档,移除上版多余的 macOS 音频专项说明,保留通用排查入口。
    
    #### 更新说明
    
    更新 App 或已部署站点后刷新页面即可。通信协议、配置和存储格式保持兼容。
    
    ### English
    
    This small maintenance update fixes overlapping playback controls in very narrow windows.
    
    #### Fixes
    
    - Playback controls prefer one row and shorten the volume slider to fit. When space runs out, the audio and window controls wrap as separate groups, keeping every control accessible.
    - Removed the unnecessary macOS-specific audio troubleshooting section added in the previous release; general troubleshooting remains available.
    
    #### Updating
    
    Update the App or your deployed site, then refresh the page. Wire protocols, configuration and storage formats remain compatible.
  • fix(app,ui): polish handoff links and mobile playback controls
    ## Problem and outcome
    
    The App console could show a launch address that still contained private activation data when copied, while the terminal hyperlink opened a cleaned address. On narrow phones, playback controls could wrap into a second row and cover too much of the video. The handoff now presents the same safe, activation-preserving address everywhere, and the playback bar keeps one compact row with a shorter flexible volume control.
    
    ## Changes
    
    - Sanitize the App activation URL before rendering both copyable console output and terminal hyperlinks, preserving App handoff without exposing credentials.
    - Keep the mobile playback bar on one row; let the volume slider shrink with the available width and hide the nonessential percentage readout at the narrowest sizes.
    - Add bilingual macOS browser/App audio-capture troubleshooting guidance and record the physical-device boundary.
    
    ## Verification
    
    - `npm run check`: TypeScript, 73 test files / 1008 tests, and the Web production build passed.
    - `npm run check:go-core`: Go tests, formatting, vet and supported core target builds passed.
    - `node scripts/check-docs.mjs` and `scripts/check-project-state.ps1` passed.
    - Narrow-layout browser checks covered 320px, 360px, 375px, 390px, 430px, 768px and 1280px widths without wrapping or horizontal overflow.
    - The interaction prototype remains local and uncommitted for later acceptance; it is not part of this PR.
    
    ## Release notes
    
    ### 中文
    
    这是一个维护版本,改善 App 启动链接的安全提示和手机上的播放控制体验。
    
    #### 修复
    
    - 修复 App 控制台复制链接时可能带出私有激活参数的问题。复制、终端链接和手动打开地址现在保持一致,并继续支持自动唤起 App。
    - 修复窄屏手机上的播控挤成两行、遮挡画面的问题。控件保持单行,音量滑条会按可用空间缩短,过窄时隐藏非关键的百分比读数。
    - 补充 macOS 浏览器与 App 采集声音选项的排查说明,明确不同浏览器和系统版本的能力边界。
    
    #### 兼容性
    
    本版本不改变通信协议、配置格式或存储格式。App 公网邀请、本地模式和已部署站点按原方式更新即可;已打开的页面刷新后使用新的播控布局。
    
    ### English
    
    This maintenance release improves App launch links and playback controls on phones.
    
    #### Fixes
    
    - Fixed the App console sometimes exposing private activation parameters in a copied launch address. The copied address, terminal hyperlink and manual URL now match while still supporting App handoff.
    - Fixed narrow phone layouts wrapping playback controls into a second row and covering the video. Controls stay on one row, the volume slider shrinks with the available space, and the nonessential percentage readout hides when space is tight.
    - Added macOS troubleshooting guidance for browser and App audio capture, including the current browser and OS support boundaries.
    
    #### Compatibility
    
    This release changes no wire protocol, configuration format or storage format. Update the App for public invitations or Local mode, or update the deployed site as usual; refresh an open page to use the new playback layout.
  • 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: improve feedback and App lifecycle reliability (#404)
    Waiting feedback and tooltips now share consistent presentation lifecycles, while App shutdown and native-media operation failures stay within their owning session or output. This phase also consolidates the project standards and publishes searchable English/Chinese reader documentation alongside the homepage.
    
    Validation: repository hygiene and Markdown links; TypeScript, 971 Web tests and production build; website/documentation build; Go tests, vet and Windows/Linux builds with Windows capture checks; desktop/mobile UI and documentation review. Linux race, container and three-platform packaging checks run in the release pipeline. Physical macOS/Linux capture and broader network coverage remain outside this acceptance.
    
    The owner approved v1.4.0 publication. Existing empty-source, Windows URL-handler and public-invitation timeout reports remain tracked; this release makes no claim to resolve those device/network reports. The Windows capture-border request is next-phase work.
    
    ## Release notes
    
    ### 中文
    
    这是一次以稳定性和交互一致性为重点的功能更新。等待与提示更有反馈,App 启动、原生分享和连接恢复的边界处理得到改善,使用与部署指南也有了统一的文档中心。
    
    #### 新增与改进
    
    - 欢迎语、等待短句和六类可轮换的标签页标题共用一致的显示规则。等待短句从一开始就出现,并在停留时轮换;明确的错误与操作提示保持固定。
    - 房间准入等漫画采用更克制的小人物与循环动效。改进 tooltip 的定位与指向,减少对播放器的遮挡;状态、图标和文案保持相同含义。
    - 新增中英文文档中心,提供搜索、手机目录、使用教程、问题排查与自部署指南。官网 FAQ 聚焦开始使用前的问题,详细排查统一进入文档中心。
    
    #### 修复
    
    - 使用 `--local` 启动不再清空已保存的 Piik 站点地址。
    - 打开系统浏览器不再阻塞 App 的退出流程;改进临时公网邀请、终端和诊断导出在关闭时的清理及错误反馈。
    - 单条原生媒体连接的操作失败不再被误判为整个会话的协议错误;重复停止分享保持幂等。
    - 修复连接替换、转发停止和异常退出时的部分资源清理问题,避免迟到结果影响当前连接。
    - Windows 原生采集中,单个输出的编码错误只结束对应输出;共享采集源本身的错误仍会结束分享。
    
    #### 升级与已知边界
    
    本次保持现有协议版本与配置格式。更新 App 或自托管 Server 后,重新打开页面即可使用对应的新界面。
    
    个别设备的空窗口列表、Windows 浏览器启动异常,以及 Linux 编码输出的故障隔离仍在跟进。macOS/Linux 的物理采集和更广泛的公网网络场景仍需实机验证;本次不宣称这些问题已经解决,也不承诺所有网络都能直连。
    
    ### English
    
    This feature update focuses on stability and consistent feedback. Waiting states are easier to follow, App startup and native sharing handle several failure cases more reliably, and the new documentation center brings usage and deployment guides together.
    
    #### New and improved
    
    - Welcome lines, waiting captions and six groups of rotating tab titles follow one presentation lifecycle. Waiting captions appear immediately and rotate while visible; actionable errors and instructions remain fixed.
    - Room-admission comics use restrained characters and looping motion. Tooltips point more accurately to their controls and interfere less with the player, with consistent meanings across illustrations, icons and copy.
    - A new English/Chinese documentation center includes search, mobile navigation, usage guides, troubleshooting and self-hosting. The homepage FAQ covers questions before getting started and links to the documentation for detailed help.
    
    #### Fixes
    
    - Starting with `--local` no longer clears a saved Piik site address.
    - Opening the system browser no longer blocks App shutdown. Temporary public invitations, the terminal and diagnostic exports handle cleanup and exit errors more consistently.
    - An operation failure on one native media connection no longer becomes a protocol failure for the entire session. Repeated stop-sharing requests are safe.
    - Fixed cleanup cases during connection replacement, relay shutdown and unexpected exits, preventing late results from affecting the current connection.
    - On Windows, an encoder failure for one native output stops that output only. A failure of the shared capture source still ends sharing.
    
    #### Updating and known limits
    
    Protocol versions and configuration formats are unchanged. After updating the App or your self-hosted Server, reopen the page to use its updated interface.
    
    Empty source lists on some devices, Windows browser-launch failures and Linux output-failure isolation remain under investigation. Physical macOS/Linux capture and broader public-network coverage still need device testing; this update does not claim to resolve those cases or guarantee a direct connection on every network.