Commit Graph
90 Commits
  • feat: tune relay limits and improve sharing recovery (#524)
    Room defaults and personal relay limits now use the existing route controller. Hosts can set the room default; viewers can follow it or select a lower or higher personal limit, including zero. Lowering a limit uses the existing handoff, and retired connection attempts no longer consume a later viewer's opportunity.
    
    The candidate also preserves native sharing when its local preview fails, prefers a preview-compatible codec in Auto mode when the App supports it, and improves terminal shutdown, input failure feedback and attached-menu positioning.
    
    Validation: Web type checks, 1,936 frontend tests and the production Web build pass. Server, routing, Native host and media-edge tests and vet pass. Real three-viewer browser checks cover default/override synchronization, receive-only, signaling reconnect, downscaling to a chain and automatic recovery after increasing an exhausted route's limit. Narrow-screen, theme and visual-mode control previews were inspected.
    
    Current field investigations remain open: the niri-specific capture failure (#499), the Windows input-refusal trigger (#502), the UU title-only load report and the older capture/source-cadence reports. These are not claimed fixed by this release.
    
    ## Release notes
    
    **Piik, now in your pocket.**
    
    Piik App supports Android screen sharing, with touch controls for a friend's computer.
    
    **手机,也能开播。**
    
    Piik App 支持 Android 屏幕分享,也能用手机控制朋友的电脑。
    
    ### English
    
    - Set a room-wide default relay limit. Viewers can follow it or set their own higher or lower limit; zero receives without forwarding. Limits still follow each device's capability, and route selection remains automatic.
    - Improve connection recovery when viewers join during route preparation or a peer connection is rebuilt. Canceled connection attempts no longer prevent later retries, and rebuilt routes require fresh media before showing as ready.
    - Keep native sharing active when the host's local preview cannot play. Automatic selection prefers a codec the browser can preview when the App supports it, and restoring a preview preserves its playback state.
    - Improve App shutdown when its terminal closes and complete macOS permission descriptions.
    - Retain useful remote-input failure feedback while pending key releases clear. Fix attached-menu scroll jumps, invisible tooltips intercepting clicks and volume guidance when source sound is unavailable.
    
    This update preserves the existing 2.x compatibility baseline. The new relay settings require an updated site; older pages retain their previous relay behavior.
    
    ### 中文
    
    - 房主可以设置房间默认转发上限。观众可跟随默认,也可自行调高或调低;设为 0 时只接收、不转发。实际额度仍受设备能力约束,线路继续自动安排。
    - 改善观众在建立线路期间加入,以及连接重建后的恢复。取消连接尝试后,后续连接仍可正常重试;重建后的线路收到新画面才会显示就绪。
    - 房主本地预览无法播放时,原生分享继续。App 支持时,自动选择优先采用浏览器可预览的编码,恢复预览时保留原有播放状态。
    - 改善终端关闭时 App 的退出流程,补齐 macOS 权限用途说明。
    - 释放待处理按键期间保留远控失败提示;修复附属菜单导致的滚动跳动、不可见提示拦截点击,以及没有分享声音时的音量说明。
    
    本次更新保持现有 2.x 兼容约定。新的转发设置需要更新站点,旧页面保留原有转发行为。
  • 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!: 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>
  • 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(connection): retry startup and clarify sharing status
    Public invitations could stop after an early tunnel-process exit, and connection progress and Viewer status did not consistently describe the current attempt or Host state. This maintenance release adds bounded startup retries, aligns enhanced NAT retry feedback across entry paths, and fixes camera-preview and room-entry layout.
    
    The existing route owner and published contracts remain in place. Four-attempt progress is advertised and opted into; older readers retain supported messages. Interaction/chat experiments are outside this PR.
    
    Validation: npm run check (74 files, 1072 tests and production build), npm run check:go (including Windows capture compile), documentation/repository hygiene, 10 production Viewer-entry discovery cases, and a real public-link gate with remote HTTP/WebSocket access and shutdown cleanup all passed. Existing device/network evidence limits remain documented.
    
    ## Release notes
    
    ### 中文
    
    这是一次维护更新,重点改善公网邀请启动、连接重试反馈和分享状态提示,并修正两处界面布局问题。
    
    - 公网邀请服务在连接就绪前意外退出时,会自动重试,最多重试 3 次;所有尝试仍共用 30 秒启动预算。
    - 增强穿透连接在首次尝试失败后最多重试 3 次,重试进度显示为 1/3、2/3、3/3。邀请链接和房间号加入都支持新版进度提示。
    - 修正观众状态提示:房主离线时不再误报“没有可用的媒体线路”,服务器连接恢复与媒体恢复也会分别呈现。
    - 修正电视内房间号输入界面的居中位置,以及摄像头选择预览被裁切的问题。
    - 尚未确认来源声音状态时,不再提前提示“未分享来源声音”。
    
    本次保持现有版本兼容;新版重试进度需要页面与服务端均支持。额外重试不能保证所有网络都能直连。
    
    ### English
    
    This maintenance update improves public invitation startup, connection retry feedback, and sharing status messages, with two layout fixes.
    
    - If the public invitation service exits before connecting, Piik retries up to three times within the existing shared 30-second startup budget.
    - Enhanced NAT traversal now allows up to three retries after the initial attempt, shown as 1/3, 2/3, and 3/3. Both invitation links and room-code entry support the updated progress display.
    - Viewer status now distinguishes an offline host from an unavailable media route, and reports server reconnection separately from media recovery.
    - Fixed the alignment of room-code entry inside the TV and cropping in camera-selection previews.
    - The missing-source-audio notice now waits until the source's audio availability is known.
    
    Existing version compatibility is preserved. Updated retry progress requires support from both the page and server. Additional retries cannot guarantee a direct connection on every network.
  • feat: launch Piik with a unified interface and public website
    Piik now has one public presentation and a coordinated App/Server release path. This phase unifies the room UI, rewrites the bilingual README and guides, adds a static website with an inline product film, and prepares matching GitHub/Gitee packages and update links.
    
    The film uses the current homepage and shared product controls on one seekable timeline. Runtime fixes preserve presentation when the App opens a room, normalize Site origins, and keep capture and media-recovery status in the television indicator. New visits use Chinese for a Chinese system language and English otherwise; explicit language and visual-mode choices remain available. An optional site passphrase controls site entry, while room authorization remains enforced.
    
    GitHub is the release authority. Gitee mirrors verified packages and provides update metadata when GitHub is unavailable. Reviewed PR release notes become the GitHub Release description. The separate public demo uses P2P only, with HTTPS and STUN verified.
    
    Validation: 756 Web tests, TypeScript and production build; Go core tests, formatting, vet and available target builds; bounded Windows capture and App/Site interoperability; browser film checks, audible playback and narrow layouts; anonymous Gitee Windows-package download, checksum and launcher/update-link checks. Public demo acceptance covers authenticated WebSocket signaling, synthetic P2P video and room cleanup on one network. macOS/Linux physical capture and the wider device/network/endurance matrix remain explicitly deferred.
    
    Publication builds every package from the merged source SHA. The repository is public, main protection is active, and Pages is configured for piik.tv. CI/publisher and Pages deployment records own publication results.
    
    ## Release notes
    
    ### 中文
    
    Piik 是免费开源的屏幕共享工具。开个房间,发出邀请,最多 20 位朋友就能用浏览器加入观看。
    
    - 使用浏览器或 Piik App 分享游戏、窗口和整个屏幕。
    - 优先建立直连;自托管站点可开启媒体转发作为备用线路。
    - Piik App 支持本地房间、临时公网邀请和已有站点。
    - Piik Server 内置网页界面、房间管理和连接服务,方便自行部署。
    - 提供中英文界面与使用指南,以及 GitHub、Gitee 两条下载线路。
    
    [官网](https://piik.tv) · [在线体验](https://demo.piik.tv) · [使用指南](https://github.com/TNTcraftHIM/Piik/blob/main/docs/guide/getting-started.zh-CN.md) · [自行部署](https://github.com/TNTcraftHIM/Piik/blob/main/docs/operations/self-hosting.zh-CN.md) · [Gitee 下载](https://gitee.com/TNTcraftHIM/Piik/releases)
    
    Windows App 和桌面浏览器是本次主要验证的平台。macOS 和 Linux 尚未经过实机测试,欢迎有设备的朋友测试并反馈。演示站和 App 公网邀请使用 P2P,受限网络下可能无法连接;自托管站点可开启媒体转发。
    
    ### English
    
    Piik is free, open-source screen sharing for you and up to 20 viewers. Start a room, send an invitation, and your friends can join in a browser.
    
    - Share games, windows or a whole screen from your browser or Piik App.
    - Direct connections come first, with optional media forwarding on self-hosted sites.
    - Piik App supports local rooms, temporary public invitations and existing sites.
    - Piik Server includes the web interface, rooms and connection services for self-hosting.
    - English and Chinese interfaces and guides are available, with GitHub and Gitee downloads.
    
    [Website](https://piik.tv) · [Online demo](https://demo.piik.tv) · [User guide](https://github.com/TNTcraftHIM/Piik/blob/main/docs/guide/getting-started.md) · [Self-hosting](https://github.com/TNTcraftHIM/Piik/blob/main/docs/operations/self-hosting.md) · [Gitee downloads](https://gitee.com/TNTcraftHIM/Piik/releases)
    
    Windows App and desktop browsers are the primary validated paths. macOS and Linux have not yet been tested on physical devices; testing and feedback are welcome. The demo and App public invitations rely on P2P and may not connect on restrictive networks. Self-hosted sites can enable media forwarding.
  • feat: rename product and runtime to Piik
    Rename the active product, Go module, binaries, configuration, protocols and documentation to Piik while retaining the TV mascot and existing media/room behavior.
    
    Use one current private contract without old-name aliases. Preserve SQLite authority and copy compatible local settings once; other settings start fresh. Git-message cleanup and the infrastructure name cutover are coordinated with this phase, with original history and deployment data archived externally.
    
    Validated locally with Web and Go checks, Windows capture compilation, matched Client/Server builds, packaged Client control handshake and history-rewrite integrity checks. Skip duplicate hosted CI for this owner-authorized local release.
    
    [skip ci]
  • fix: preserve room authority and repair Browser/Client recovery (#386)
    * fix: preserve room authority and recover current media connections
    
    * docs: close room authority and recovery integration
  • feat(media): integrate embedded media services and shared native encoding
    Embed STUN and SFU in the shared Go process, reuse native encoding pipelines with independent adaptation, and complete Client lifecycle, settings, diagnostics and packaging fixes. Retain standard Browser senders after measured encoded-reuse limitations.
  • refactor: unify Go runtime and audited frontend
    Squash integration of the reviewed Go core, frontend audit fixes, release tooling, and deployment hygiene. CI passed all Server/Client jobs.
  • fix: finish native client lifecycle and capture aspect
    Accepted native Client lifecycle and Windows capture aspect phase. All Web/Server and three-platform Client checks passed.
  • feat(nat): make NAT prediction deployment-configurable (#372)
    * Make NAT prediction deployment-configurable
    
    * Ignore optional predicted candidate rejection
  • feat(diagnostics): expose sanitized packet loss evidence (#362)
    Use fresh RTCP loss reports for sender diagnostics and include existing Viewer packet loss, RTT, and jitter in sanitized route logs without changing routing.
  • perf(media): optimize browser media pipeline evidence (#359)
    Measured Browser-pipeline improvements, bounded SFU observability, and one-commit release ownership. Local repository hygiene, 860 tests, client/server builds, and the 20-Viewer seven-check gate passed. GitHub Actions did not start because of the account billing/spending-limit annotation.
  • feat(route): enable topology convergence by default (#311)
    Default new Host shares to native-edge topology convergence while preserving the pre-share opt-out and peer-only default.
  • fix(route): make route convergence measured and presentation-stable (#305)
    * Align stable route debug ordinals
    
    * Make route convergence measured and presentation-stable
  • fix(route): guard SFU quality convergence (#301)
    Fixes the production-proven P2P-to-SFU quality misrouting. Local full checks and independent P0/P1 review passed; the GitHub job did not start any steps.
  • feat(route): implement native-edge topology convergence (#299)
    Implements the accepted opt-in native-edge local convergence controller and the pre-share topology optimization and peer-only policies. Local full checks and independent P0/P1 reviews passed; the GitHub job did not start any steps.
  • feat(media): add stable room controls and codec selection (#272)
    * feat: add host codec preference controls
    
    * test: retain relay codec across source replacement
    
    * feat: identify graceful service restarts
    
    * feat: add atomic room replacement
  • fix(media): stabilize reconnect and startup quality (#266)
    * fix(media): scope viewer reconnect
    
    * fix(media): serialize peer recovery
    
    * fix(media): apply peer profile when connected
    
    * fix(viewer): preserve unaffected route presentation
    
    * fix(media): default game sharing to fluid
    
    * fix(media): initialize peer quality before offer
    
    * fix(media): seed peer startup bitrate
    
    * fix(media): defer adaptive scaling until startup
    
    * docs(media): record startup adaptation matrix
  • fix(media): align quality presets (#264)
    * fix(media): default screen audio to saver
    
    * fix(media): align screen audio tiers
  • feat(rooms): finish Browser v12 room and UI controls
    * feat(rooms): simplify code entry
    
    * fix(host): clarify room entry labels
    
    * docs(rooms): decouple access management from sharing
    
    * feat(host): streamline room and quality controls
    
    * docs(rooms): define private code entry
    
    * feat(rooms): support private invitation-only entry
    
    * docs(ui): unify viewer connection details
    
    * feat(ui): unify viewer connection details
    
    * docs(todo): queue product UI polish
    
    * docs(route): settle local observation boundaries
    
    * docs(rooms): align private entry truth
  • feat(rooms): replace SQLite with leased memory rooms (#211)
    Implements the accepted memory-resident room and access model on the single piik-v8 Browser wire. Local repository, full Web, build, and Chrome access/privacy gates passed before merge.