## 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.
8.2 KiB
第一次用 Piik
Piik 支持一位房主分享屏幕,最多 20 位受邀观众通过浏览器观看。 本指南介绍加入房间、使用在线版、使用 Piik App,以及通过已有站点分享的方法。
加入房间 · 在线版 · Piik App · 已有站点 · 问题排查
观众只需要浏览器和邀请链接。 分享画面推荐下载 Piik App,选择 公网邀请。 想免安装,可以打开在线版,直接在浏览器里创建房间并分享。
加入朋友的房间
- 用电脑或手机浏览器打开朋友发来的邀请链接。
- 等待画面出现。如果浏览器没有自动播放,点击 播放。
- 将鼠标移到画面上,或轻点画面,显示播放控制栏。
播放控制栏只改变你自己看到的画面和听到的声音。 电脑上单击画面可暂停或继续,双击可进入或退出全屏(浏览器支持时)。 手机上轻点画面唤出控制栏,再使用其中的按钮。Safari 的视频全屏可能使用系统播控。
播放按钮分别做什么?
| 按钮 | 作用 |
|---|---|
| 剧场模式 | 在浏览器标签页内展开画面。 |
| 全屏观看 | 让画面铺满屏幕。 |
| 悬浮小窗 | 浏览器支持时,把视频放进独立小窗。 |
| 音量 | 支持增强时最高 200%,否则最高 100%;声音失真时调低一些。 |
只有四位房间号时,打开同一个 Piik 站点,选择 加入房间。 你可能需要站点口令和房间密码。能否通过房间号加入由房主决定; 无法加入时,请朋友发邀请链接。
房主可关闭链接旁的 免密邀请,复制普通房间地址。访客打开地址后按站点和房间设置 验证口令或密码;仅限邀请的房间需保留凭证。这个开关不会撤销已发出的邀请。
旧链接失效了,就请房主重新发一份当前邀请。 App 的本地房间和临时公网邀请会随本次 App 退出而结束。
使用在线版
- 在浏览器中打开 demo.piik.tv。
- 点击 开始分享,选择 浏览器 分享屏幕、窗口或标签页;也可在电脑或手机上选择 摄像头(需浏览器支持访问)。如需来源声音且选择器提供该选项,启用音频。
- 确认预览后,点击 复制邀请链接,用另一台设备打开,或发送给朋友。
- 分享结束后,点击 停止分享。
在线版由项目提供,画面仅通过设备间直连(P2P)传输。 在受限网络下,可能出现页面能打开、画面无法连接的情况。
用 Piik App 分享
- 从 GitHub Releases 或
Gitee 镜像下载以
piik-app开头、 对应平台的压缩包,完整解压并保留目录结构。 - Windows 打开
piik-app.exe,macOS 打开Piik App.app,Linux 运行./piik-app。 启动页会在系统浏览器里打开。 - 邀请不在同一局域网的朋友时,选择 公网邀请,再点击 进入 Piik。 其他模式的用途见下表。
- 点击 开始分享,按可用选项选择 浏览器、摄像头、程序 / 窗口 或 屏幕, 然后选定要分享的画面与声音。
- 复制房间邀请发给朋友。分享期间保持 App 和分享标签页打开。
| 文件名包含 | 适用平台 |
|---|---|
windows-amd64 |
Windows x64 |
darwin-arm64 |
Apple 芯片;原生采集需 macOS 13 及以上 |
linux-amd64 |
Linux x64 |
目前主要测试 Windows 版 Piik App 和浏览器分享。macOS 和 Linux 版 Piik App 尚未经过实机测试, 欢迎有设备的朋友试用并反馈问题。 Linux 原生采集还需要系统组件。 程序包与启动参数的细节见 App 指南。
选择 App 模式
| 模式 | 什么时候用 | 需要知道 |
|---|---|---|
| 本地房间 | 朋友和你在同一个局域网。 | 出现多个「局域网邀请地址」时,选择与朋友同一网络的网卡和 IP。对方需要能连接到你的电脑,可以设置本地站点口令。 |
| 公网邀请 | 朋友在别处,想临时发个邀请。 | 需要互联网连接;公网地址只在本次 App 运行期间有效。 |
| 连接站点 | 你们已经有一个 Piik 站点。 | 输入站点地址,在原有分享页面使用 App 的采集能力。 |
本地房间和公网邀请可展开 站点口令 设置可选的访问口令。
使用 连接站点 时,填写完整地址,例如 https://demo.piik.tv,然后点击 进入 Piik。
如果站点要求访问口令,在打开的站点页面输入。通过 App 打开过一次后,同一浏览器会记住这个入口。
保持 App 运行并使用该站点配置,之后就能直接访问网址。点击 开始分享,
在选择器里选 程序 / 窗口 或 屏幕,即可使用 App 采集。
浏览器询问本地网络权限时,请允许访问。换浏览器、使用无痕窗口或清除站点数据后,
需要重新从 App 进入一次;换用其他站点时,先在 App 中更新地址。
网页能打开,不代表视频一定能连通。 公网邀请为房间提供临时网页地址, 画面和声音仍靠参与者之间的连接传输。此模式没有媒体服务器兜底, 临时地址也不保证持续可用。所有模式都需要可用的 UDP 媒体路径。 具体连接方式见 App 指南。
使用已有站点分享
需要先有一个运行 Piik Server 的 HTTPS 站点,可以使用朋友或管理员提供的地址。 也可以使用项目提供的在线版或 Piik App。 自建站点属于进阶操作,服务器、HTTPS 和网络端口的配置步骤见部署指南。
- 打开 Piik 站点。如果站点设置了口令,先输入口令。
- 点击 开始分享,选择 浏览器 后在系统弹窗里选择屏幕、窗口或标签页; 浏览器支持时,电脑和手机也可选择 摄像头。如需来源声音且选择器提供该选项,启用音频。
- 确认预览画面后,点击 复制邀请链接 发给朋友。
- 保持分享标签页打开。需要时使用 暂停分享、切换来源 或 停止分享。
浏览器屏幕采集需要 HTTPS 站点或 localhost。
弹窗里有哪些画面和声音可选,取决于浏览器与操作系统。
拿到邀请链接的人可以进入这个房间,请把它发给你想邀请的人。
想在同一站点使用 App 采集,可按连接站点的步骤操作。 站点负责房间与邀请,App 提供原生采集。 如果管理员已启用 SFU 转发,房主可在开始分享前关闭 隐私模式,允许使用这条兜底线路。 项目提供的在线版仅使用 P2P。
加上自己的声音
分享时,点击画面下方的 麦克风,并允许访问。 再次点击即可静音。在画面下方的 分享设置 中可以选择麦克风和调节输入音量,默认 100%,最高可调至 200%。 观众会同时听到来源声音和你的解说;房主本机预览保持静音。
摄像头分享不会自动开启麦克风。App 的 程序 / 窗口 和 屏幕 采集也使用同一组控件, 可以保留「默认设备」,也可以指定麦克风。在 摄像头 页签中允许访问后,点击对应的画面卡片开始分享。 设备名称和可用预览取决于浏览器权限;正在分享摄像头时,其他摄像头只显示名称。 建议佩戴耳机,避免扬声器声音被麦克风再次收进去。
遇到问题了
声音、采集、启动或播放遇到问题时,先看问题排查。
画面连接不上
出现「没有可用的媒体线路」等提示时,参阅画面连接排查。