开始使用WebRTC

Getting started with WebRTC

开始使用WebRTC

Creating a new application based on the WebRTC technologies can be overwhelming if you're unfamiliar with the APIs. In this section we will show how to get started with the various APIs in the WebRTC standard, by explaining a number of common use cases and code snippets for solving those.

如果不熟悉API,那么创建一个基于WebRTC技术的新应用程序可能会非常困难。在本节中,将通过解释一些常见用例和解决这些问题的代码片段,展示如何开始使用WebRTC标准中的各种API。

WebRTC APIs

The WebRTC standard covers, on a high level, two different technologies: media capture devices and peer-to-peer connectivity.

WebRTC标准在高水平上涵盖了两种不同的技术:媒体捕获设备和对等连接。

Media capture devices includes video cameras and microphones, but also screen capturing "devices". For cameras and microphones, we use navigator.mediaDevices.getUserMedia() to capture MediaStreams. For screen recording, we use navigator.mediaDevices.getDisplayMedia() instead.

媒体捕捉设备包括摄像机和麦克风,也包括屏幕捕捉“设备”。对于相机和麦克风,使用navigator.mediaDevices.getUserMedia()来捕获MediaStreams。对于屏幕录制,使用navigator.mediaDevices.getDisplayMedia()。

The peer-to-peer connectivity is handled by the RTCPeerConnection interface. This is the central point for establishing and controlling the connection between two peers in WebRTC.

对等连接由RTCPeerConnection接口处理。这是在WebRTC中建立和控制两个对等点之间连接的中心点。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值