@rongcloud/plugin-rtc 5.4.5 → 5.4.6-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -1
- package/dist/core/webrtc/sdp/ASdpBuilder.d.ts +3 -1
- package/dist/core/webrtc/sdp/ASdpStrategy.d.ts +5 -0
- package/dist/core/webrtc/sdp/UnifiedPlanStrategy.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +19143 -15
- package/dist/index.js +19175 -15
- package/dist/index.umd.js +19179 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 使用说明
|
|
2
|
+
## 安装依赖 @rongcloud/plugin-rtc
|
|
3
|
+
|
|
4
|
+
> RTC 消息通信需要依赖 IMLib 进行消息收发,所以需要先安装 IMLib
|
|
5
|
+
### 一、 安装消息通信依赖 IMLib
|
|
6
|
+
|
|
7
|
+
1. 查看最新包所依赖模块
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm info "@rongcloud/imlib-next@latest" peerDependencies
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. 安装所依赖的模块
|
|
14
|
+
|
|
15
|
+
> npm version > 5.0
|
|
16
|
+
>
|
|
17
|
+
> 将所有依赖安装到 `dependencies` 的位置
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npx install-peerdeps -x "--save-prod" @rongcloud/imlib-next@latest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### 二、 安装音视频通信 RTCLib
|
|
25
|
+
1. 查看最新包所依赖模块
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
npm info "@rongcloud/plugin-rtc@latest" peerDependencies
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. 安装所依赖的模块
|
|
32
|
+
|
|
33
|
+
> npm version > 5.0
|
|
34
|
+
>
|
|
35
|
+
> 将所有依赖安装到 `dependencies` 的位置
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
npx install-peerdeps -x "--save-prod" @rongcloud/plugin-rtc@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## RTC 使用
|
|
42
|
+
|
|
43
|
+
1. 融云开发者文档 [^快速开始](https://doc.rongcloud.cn/live/Web/5.X/quickstart/init)
|
|
44
|
+
|
|
45
|
+
2. demo 体验 [rongcloud-rtc-web-demo](https://github.com/rongcloud/rongcloud-rtc-web-demo)
|
|
46
|
+
2. 流程说明
|
|
47
|
+
- [初始化](https://doc.rongcloud.cn/live/Web/5.X/quickstart/init)
|
|
48
|
+
- 创建房间并加入
|
|
49
|
+
- 在房间内发布资源
|
|
50
|
+
- 订阅房间内已经发布的资源
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRCTrackBitrate } from '../../interfaces';
|
|
2
|
-
import { ISdpSemantics } from './ASdpStrategy';
|
|
2
|
+
import { ISdpSemantics, RtpTransceiverDirection } from './ASdpStrategy';
|
|
3
3
|
/**
|
|
4
4
|
* 以字符串的形式 硬处理 SDP 信息
|
|
5
5
|
* 对于 plan-b | unified-plan 数据的处理 方式是相同的。
|
|
@@ -108,5 +108,7 @@ export default abstract class ASdpBuilder {
|
|
|
108
108
|
* @returns 正在返回 sdpVideoBlock。
|
|
109
109
|
*/
|
|
110
110
|
private addVideoBlineAS;
|
|
111
|
+
clearnSsrcWithMid(mid: string, direction: RtpTransceiverDirection): ASdpBuilder;
|
|
112
|
+
private clearSSRC;
|
|
111
113
|
}
|
|
112
114
|
//# sourceMappingURL=ASdpBuilder.d.ts.map
|
|
@@ -8,6 +8,11 @@ export declare enum SdpSemantics {
|
|
|
8
8
|
PLANB = "plan-b",
|
|
9
9
|
UNIFIEDPLAN = "unified-plan"
|
|
10
10
|
}
|
|
11
|
+
export declare enum RtpTransceiverDirection {
|
|
12
|
+
SENDONLY = "sendonly",
|
|
13
|
+
RECVONLY = "recvonly",
|
|
14
|
+
INACTIVE = "inactive"
|
|
15
|
+
}
|
|
11
16
|
export interface IOfferInfo {
|
|
12
17
|
type: 'offer';
|
|
13
18
|
sdp: string;
|
|
@@ -19,7 +19,7 @@ export declare class UnifiedPlanStrategy extends ASdpStrategy {
|
|
|
19
19
|
};
|
|
20
20
|
createOffer(iceRestart: boolean): Promise<IOfferInfo>;
|
|
21
21
|
setRemoteAnswer(sdp: string): Promise<RCRTCCode>;
|
|
22
|
-
protected
|
|
22
|
+
protected resetOfferSdp(sdp: string): string;
|
|
23
23
|
protected resetAnswerSdp(sdp: string): string;
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=UnifiedPlanStrategy.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.4.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.4.6-alpha.1
|
|
3
|
+
* CommitId - d109ea1eb1987a80bf3299b86d39859d331d65b8
|
|
4
|
+
* Fri Aug 19 2022 11:59:39 GMT+0800 (中国标准时间)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { EventEmitter, RTCMode, IRuntime, RTCPluginContext, IJoinRTCRoomData, IReceivedMessage, ErrorCode, RTCJoinType, IRTCUserData, KVString, IServerRTCRoomEntry, LogLevel, IRTCJoinedInfo, IPluginGenerator } from '@rongcloud/engine';
|