当前位置: 首页 > news >正文

WebRTC API

The WebRTC API

The public API of the WebRTC library consists of the api/ directory and its subdirectories. No other files should be depended on by webrtc users.

WebRTC库的公共API由API/目录及其子目录组成。webrtc用户不应依赖任何其他文件。

Before starting to code against the API, it is important to understand some basic concepts, such as:

在开始针对API进行编码之前,了解一些基本概念是很重要的,例如:

  • Memory management, including webrtc's reference counted objects
  • 内存管理,包括webrtc的引用计数对象
  • Thread management
  • 线程管理

Using WebRTC through the PeerConnection class

通过PeerConnection类使用WebRTC

The PeerConnectionInterface class is the recommended way to use the WebRTC library.

​PeerConnectionInterface类是使用WebRTC库的推荐方法。

It is closely modeled after the Javascript API documented in the WebRTC specification.

​它是根据WebRTC规范中记录的Javascript API进行紧密建模的。

PeerConnections are created using the PeerConnectionFactoryInterface.

​PeerConnection是使用PeerConnectionFactoryInterface创建的。

There are two levels of customization available:

有两个级别的自定义可用:

  • Pass a PeerConnectionFactoryDependencies object to the function that creates a PeerConnectionFactory. This object defines factories for a lot of internal objects inside the PeerConnection, so that users can override them. All PeerConnections using this interface will have the same options.
  • 将PeerConnectionFactoryDependencies对象传递给创建PeerConnection Factory的函数。这个对象为PeerConnection内部的许多内部对象定义了工厂,这样用户就可以覆盖它们。使用此接口的所有对等连接都将具有相同的选项。
  • Pass a PeerConnectionInterface::RTCConfiguration object to the CreatePeerConnectionOrError() function on the PeerConnectionFactoryInterface. These customizations will apply only to a single PeerConnection.
  • 将PeerConnectionInterface::RTCConfiguration对象传递给PeerConnectionFactoryInterface上的CreatePeerConnectionOrError()函数。这些自定义将仅适用于单个对等连接。

Most functions on the PeerConnection interface are asynchronous, and take a callback that is executed when the function is finished. The callbacks are mostly called on the thread that is passed as the “signaling thread” field of the PeerConnectionFactoryDependencies, or the thread that called PeerConnectionFactory::CreatePeerConnectionOrError() if no thread is given.

PeerConnection接口上的大多数函数都是异步的,并在函数完成时执行回调。回调主要在作为PeerConnectionFactoryDependencies的“信号线程”字段传递的线程上调用,或者在没有给定线程的情况下调用PeerConnection Factory::CreatePeerConnectivationOrError()的线程上。

See each class' module documentation for details.

有关详细信息,请参阅每个类的模块文档。

Using WebRTC components without the PeerConnection class

使用不带PeerConnection类的WebRTC组件

This needs to be done carefully, and in consultation with the WebRTC team. There are non-obvious dependencies between many of the components.

这需要仔细进行,并与WebRTC团队协商。许多组件之间存在不明显的依赖关系。

相关文章:

  • 大数据之Spark开发环境准备
  • 什么是Java运算?Java运算好学吗?
  • abaqus子程序vumat安装使用
  • 【Java项目】Minio的安装部署以及SpringBoot整合Minio
  • 架构设计第一讲:架构设计相关面试题汇总
  • LeetCode笔记:Biweekly Contest 101
  • 【python实操】马上毕业了,你还不懂什么是守护线程、线程、进程?(附12306抢票程序-源代码)
  • Springboot整合rabbitmq并实现消息可靠性和持久性
  • ChatGPT可以作为一个翻译器吗?
  • 一文学会 Spring MVC 表单标签
  • 【联邦学习(Federated Learning)】- 横向联邦学习与联邦平均FedAvg
  • 免费一键生成原创文章-原创文章批量生成
  • 众人围剿,GPT-5招惹了谁
  • Spring Boot 3.0系列【19】核心特性篇之自定义Starter启动器
  • oracle中sql 正则怎么写?
  • 11111111
  • Babel配置的不完全指南
  • CentOS7 安装JDK
  • ECMAScript 6 学习之路 ( 四 ) String 字符串扩展
  • Laravel5.4 Queues队列学习
  • Netty 框架总结「ChannelHandler 及 EventLoop」
  • Redash本地开发环境搭建
  • VuePress 静态网站生成
  • 工程优化暨babel升级小记
  • 工作手记之html2canvas使用概述
  • 基于 Babel 的 npm 包最小化设置
  • 前言-如何学习区块链
  • 如何借助 NoSQL 提高 JPA 应用性能
  • 算法-插入排序
  • ​2021半年盘点,不想你错过的重磅新书
  • ​草莓熊python turtle绘图代码(玫瑰花版)附源代码
  • # 再次尝试 连接失败_无线WiFi无法连接到网络怎么办【解决方法】
  • #14vue3生成表单并跳转到外部地址的方式
  • (1)(1.11) SiK Radio v2(一)
  • (14)Hive调优——合并小文件
  • (二)linux使用docker容器运行mysql
  • (二)基于wpr_simulation 的Ros机器人运动控制,gazebo仿真
  • (二十五)admin-boot项目之集成消息队列Rabbitmq
  • (附源码)spring boot基于小程序酒店疫情系统 毕业设计 091931
  • (附源码)ssm高校实验室 毕业设计 800008
  • (免费领源码)Python#MySQL图书馆管理系统071718-计算机毕业设计项目选题推荐
  • *p=a是把a的值赋给p,p=a是把a的地址赋给p。
  • .chm格式文件如何阅读
  • .NET 8.0 中有哪些新的变化?
  • .NET Core 通过 Ef Core 操作 Mysql
  • .NET DataGridView数据绑定说明
  • .NET HttpWebRequest、WebClient、HttpClient
  • .Net 高效开发之不可错过的实用工具
  • .NET/C# 在代码中测量代码执行耗时的建议(比较系统性能计数器和系统时间)...
  • .Net+SQL Server企业应用性能优化笔记4——精确查找瓶颈
  • .net2005怎么读string形的xml,不是xml文件。
  • .NetCore Flurl.Http 升级到4.0后 https 无法建立SSL连接
  • .NET成年了,然后呢?
  • .net开源工作流引擎ccflow表单数据返回值Pop分组模式和表格模式对比
  • .NET命名规范和开发约定