跳到主要内容

导入 SDK

安装依赖

方法

shell
npm install @rongcloud/react-native-rtc
npm install @rongcloud/react-native-im-wrapper

导入 RTC SDK

方法

TypeScript
import { RCRTCEngine } from '@rongcloud/react-native-rtc';
import { RCIMIWEngine } from '@rongcloud/react-native-im-wrapper';

示例代码

TypeScript
// 导入 RTC 引擎
import { RCRTCEngine } from '@rongcloud/react-native-rtc';
import { RCIMIWEngine } from '@rongcloud/react-native-im-wrapper';

导入其他数据结构

方法

TypeScript
import {
RCRTCMediaType, RCRTCRole, RCRTCRoomSetup
} from '@rongcloud/react-native-rtc';

示例代码

TypeScript
// 导入 RTC 数据结构
import {
RCRTCMediaType, RCRTCRole, RCRTCRoomSetup
} from '@rongcloud/react-native-rtc';

版本依赖说明

依赖 SDK版本
IMLib5.2.4
RTCLib5.1.17