显示HN:Pion/handoff – 将WebRTC从浏览器迁移到Go
Show HN: Pion/handoff – Move WebRTC out of browser and into Go

原始链接: https://github.com/pion/handoff

## Handoff:掌控 WebRTC Handoff 是一款工具,允许您将**在浏览器中启动的 WebRTC 会话转移到独立的、受控的进程**中。这解锁了超越标准浏览器限制的强大功能。 本质上,Handoff 拦截 WebRTC 信号,让您可以**录制媒体流**、**注入外部源(例如 FFmpeg)**,甚至**逆向工程通信协议**(ICE、DTLS、RTP)。 它的工作原理是在浏览器中“模拟”WebRTC API,并将信号转发到您的进程。示例包括保存录音、用自定义源替换浏览器视频,以及使用脚本自动覆盖 `RTCPeerConnection`。 Handoff 得到 Pion 社区的支持,提供资源和通过 [email protected] 提供商业支持。它是一个开源项目(MIT 许可证),积极寻求贡献。

对不起。
相关文章

原文

Create WebRTC session in the browser—run it somewhere else

join us on Discord Follow us on Bluesky Twitter Widget

WebRTC is the real-time communication technology used for real-time media streaming. Used for things like Google Meet, Discord and Zoom on the web. With Handoff you create your WebRTC session in the browser, but then move it to a process you control. This lets you do a few interesting things.

  • Record - Join the Zoom call via handoff and save media as it passes through.
  • Send - Use FFmpeg or send an external source. Not limited by browser quality/capture code.
  • Reverse Engineer - Capture ICE/DTLS and decrypted RTP/RTCP/SCTP traffic
sequenceDiagram
    participant Handoff
    participant Browser
    participant Website

    Browser->>Website: Authenticate and use the site normally
    Website->>Browser: WebRTC Signaling
    Note over Browser: WebRTC API is mocked
    Browser->>Handoff: Forward Signaling
    Handoff->>Website: Establish WebRTC session
Loading

See examples directory. examples/datachannel shows a normal page with an optional override, examples/media-save saves VP8 video on the backend while still showing it in the browser, examples/media-send forwards VP8 RTP from the backend into the browser, and examples/greasemonkey generates a userscript that overrides RTCPeerConnection automatically.

Typically you will install the greasemonkey script and then run one of the examples.

Below is an example of sending a users webcam to a WebRTC service, but replacing outgoing video with a ffmpeg testsrc. Handoff sits between the users so it can replace with any arbitrary video.

Example

Pion has an active community on the Discord.

Follow the Pion Bluesky or Pion Twitter for project updates and important WebRTC news.

We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at [email protected]

Check out the contributing wiki to join the group of amazing people making this project possible

MIT License - see LICENSE for full text

联系我们 contact @ memedata.com