npm install agora-rtc-sdk-ng --save 你也可以通过script标签的形式引入SDK。 <!-- or --> 之后我们只需要在项目代码中引入agora-rtc-sdk-ng就可以直接使用了。 importAgoraRTCfrom"agora-rtc-sdk-ng"; 实现基础的1对1视频通话 现在我们开始来按步骤实现基础的1对1视频通话。 1. 创建本地客户端对象 首先...
1. 安装 SDK 根据你的开发经验不同,你可以选择使用包管理器安装 Agora 的 SDK, 或者直接加载 CDN 的 JS 文件来快速接入。 1.1 使用包管理器接入 安装SDK npm install agora-rtc-sdk-ng --save # yarn add agora-rtc-sdk-ng 在项目中引入依赖文件 import AgoraRTC from "agora-rtc-sdk-ng" 1.2 使用...
AgoraRTC SDK (Version 4.x) English |简体中文 Getting Started Install Usenpm,pnpmoryarn #with npmnpm i agora-rtc-sdk-ng#or with pnpmpnpm add agora-rtc-sdk-ng#or with yarnyarn add agora-rtc-sdk-ng CDN is also provided The SDK exports anAgoraRTCobject globally for use. Quick start ...
我的应用程序使用交互式音频流。不需要视频。 我想知道如何检索属于频道“观众”(而不是“主持人”)的所有用户。我想在UI中显示这样的“观众”用户。 不幸的是,我在这里找不到任何方法来做到这一点,https://agoraio-community.github.io/AgoraWebSDK-NG/api/en/interfaces/iagorartcclient.html#getlisteners 请...
importAgoraRTC,{IAgoraRTCClient}from'agora-rtc-sdk-ng'constclient:IAgoraRTCClient=AgoraRTC.createClient({mode:'rtc',codec:'vp8'}) 实现基础的视频通话 现在我们来实现视频通话功能,在 App.js 中创建一个 async 函数startBasicCall(),我们之后的代码都将在这个函数内部编写(NG 版本中我们可以使用 Promise...
import AgoraRTC from "agora-rtc-sdk-ng"; 实现基础的1对1视频通话 现在我们开始来按步骤实现基础的1对1视频通话。 1. 创建本地客户端对象 首先我们需要创建一个本地客户端对象,由于我们不是直播,mode我们选择rtc,编码有H.264和VP8两种,我这里没有兼容性要求,所以选用推荐的VP8,参考官方文档。
yarnaddagora-rtc-sdk-ng 在App.js 文件中引入这个模块 import AgoraRTC from 'agora-rtc-sdk-ng' const client = AgoraRTC.createClient({ mode: 'rtc', codec: 'vp8' }) 如果你使用 TypeScript,还可以引入 SDK 的类型声明对象: import AgoraRTC, { IAgoraRTCClient } from 'agora-rtc-sdk-ng' ...
如果你使用 TypeScript,还可以引入 SDK 的类型声明对象: import AgoraRTC, { IAgoraRTCClient } from 'agora-rtc-sdk-ng' const client: IAgoraRTCClient = AgoraRTC.createClient({ mode: 'rtc', codec: 'vp8' }) 实现基础的视频通话 现在我们来实现视频通话功能,在 App.js 中创建一个 async 函数start...
现在,你可以用 Agora Web SDKNG版很优雅地解决这个需求: // 使用 Agora Web SDK NG// 我们假设这段代码运行在一个 async 环境下,所以直接使用 await,同时我们假设这个时候已经加 入了频道 // 主播的⻨克⻛音频轨道constmicrophoneTrack =awaitAgoraRTC.createMicrophoneAudioTrack;// 背景音乐1的音频轨道const...
electron-agora-rtc-ng 4.0.0-beta.3•Public• Published2 years ago Agora RTC SDK for Electron ✨Features 📦Newly designed middle-tier API and Native C++ SDK. 🛡Written in TypeScript with predictable static types. 🖥Environment Support ...