## 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.
6.0 KiB
Piik Documentation
About Piik · 中文介绍 · 中文上手指南
For using Piik, troubleshooting or self-hosting, start with the reader documentation · 中文文档中心. This page also indexes developer and maintainer references.
Guides And References
| Task | Guide |
|---|---|
| Use Piik online | Open the online site · Online sharing guide |
| Watch a friend or share my first screen | Getting started |
| Choose an App mode or fix sound and connection trouble | First-use help |
| Page opens but video will not connect / 网页能打开,画面连不上 | Connection troubleshooting · 中文排查 |
| Run Piik App, check platform requirements, or build a package | App guide · 中文 App 指南 |
| Try or change the source code | Run from source |
| Find a directory or the module responsible for a behavior | Repository layout and module map |
| Find the shared product, design and lifecycle rules | Standards index |
| Host a site for my group | Self-hosting · 中文部署 |
| Keep a server running with systemd or Docker | Service management · 中文服务管理 |
| Set passwords, ports, or room storage | Configuration |
| Update my server | Server updates |
| Build, publish or recover a maintained release | Maintainer release tooling |
| Send a useful bug report | Diagnostics and export |
| Translate Piik or improve wording | Translation guide · 中文翻译教程 |
| Check release and platform readiness | Current status |
The introduction, getting-started, App, self-hosting, service-management and translation guides are available in English and Chinese. Technical references keep one shared version.
Run from source
You can try the Browser application locally with Node from .node-version, npm from package.json, and Go 1.26 from go.mod. Run these commands from the repository root.
Start the web UI:
npm ci
npm run dev
In a second terminal, start the server. For a POSIX shell:
PORT=8788 PUBLIC_BASE_URL=http://localhost:8787 go run ./cmd/piik-server
Or in PowerShell:
$env:PORT = '8788'
$env:PUBLIC_BASE_URL = 'http://localhost:8787'
go build -o build/dev/piik-server.exe ./cmd/piik-server
./build/dev/piik-server.exe
The fixed Windows executable path avoids repeated firewall prompts from go run.
Open localhost:8787, start sharing, and open the invitation
in another browser tab to try watching. This localhost invitation stays on your
computer; remote invitations need a reachable origin as described in
configuration.
Browser capture requires localhost or HTTPS.
For the self-contained App, follow App development and packaging, including the platform's native capture requirements.
Work on Piik
Contributing covers the workflow and choosing focused checks. The main verification commands are:
npm run check
npm run check:go
Use the naming and copy guide for product names, commands, role labels and Chinese/English voice. Piik-owned code uses MIT; see the licensing guide for third-party components.
For the public website, see the introduction design and website preview and publishing.
Understand the product
| Topic | Its reference |
|---|---|
| Invitations, room codes and passwords | Rooms and access |
| How viewers connect | Routing and transport |
| Screen capture, quality controls and sound | Media quality |
| Host and viewer behavior | Presentation and lifecycle |
| Why a design was chosen | Architecture decisions |
| Measurements and platform limits | Research and verification status |
| Camera and Host microphone candidate | Capture scope and limits |
Shared conventions
| When changing… | Follow this owner |
|---|---|
| Module responsibilities or interfaces | Engineering and contract map |
| Product/tool names, role labels or copy | Naming and copy |
| UI colour, illustration, motion or layout | Visual language |
| Overlays, titles or state indicators | Media status |
| Releases, protocols or stored formats | Versions and compatibility |
| Main protection or automatic publishing | GitHub operations |
| Documentation or a duplicated rule | Documentation ownership |
| Checks, PRs, integration or cleanup | Contributing |
For ongoing work, use TODO. Project memory provides the compact product map; status indexes current source and deployment boundaries. Completed work lives in Git history and pull requests.