@rongcloud/plugin-rtc 5.4.6 → 5.4.7-alpha.3
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/dist/core/command/LocalTrackMuteCommand.d.ts +9 -1
- package/dist/core/enums/RCLoggerTag.d.ts +4 -4
- package/dist/core/enums/RCRTCCode.d.ts +3 -1
- package/dist/core/enums/RCRTCResolution.d.ts +34 -4
- package/dist/core/enums/RCResolution.d.ts +6 -1
- package/dist/core/tracks/RCLocalTrack.d.ts +10 -2
- package/dist/core/tracks/RCTrack.d.ts +3 -3
- package/dist/index.d.ts +25 -10
- package/dist/index.esm.js +19373 -15
- package/dist/index.js +19405 -15
- package/dist/index.umd.js +19409 -15
- package/package.json +3 -3
|
@@ -4,7 +4,15 @@ import { RCLocalTrack } from '../tracks/RCLocalTrack';
|
|
|
4
4
|
import { BaseCommand } from './BaseCommand';
|
|
5
5
|
export declare class LocalTrackMuteCommand extends BaseCommand<void> {
|
|
6
6
|
private localTrack;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 接收 signal 扩散状态变更的结果
|
|
9
|
+
*/
|
|
10
|
+
private readonly _recvSignalResultFn;
|
|
11
|
+
constructor(localTrack: RCLocalTrack,
|
|
12
|
+
/**
|
|
13
|
+
* 接收 signal 扩散状态变更的结果
|
|
14
|
+
*/
|
|
15
|
+
_recvSignalResultFn: Function);
|
|
8
16
|
execute(store: Store, invoker: Invoker): Promise<void>;
|
|
9
17
|
}
|
|
10
18
|
//# sourceMappingURL=LocalTrackMuteCommand.d.ts.map
|
|
@@ -168,19 +168,19 @@ export declare enum RCLoggerTag {
|
|
|
168
168
|
*/
|
|
169
169
|
L_ABSTRACT_ROOM_DELETE_ROOM_ATTRIBUTE_R = "L-abstract_room_delete_room_attribute_R",
|
|
170
170
|
/**
|
|
171
|
-
*
|
|
171
|
+
* 房间发布资源的任务
|
|
172
172
|
*/
|
|
173
173
|
L_ABSTRACT_ROOM_PUBLISH_T = "L-abstract_room_publish-T",
|
|
174
174
|
/**
|
|
175
|
-
*
|
|
175
|
+
* 房间发布资源结果
|
|
176
176
|
*/
|
|
177
177
|
L_ABSTRACT_ROOM_PUBLISH_R = "L-abstract_room_publish-R",
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* 房间取消发布资源的任务
|
|
180
180
|
*/
|
|
181
181
|
L_ABSTRACT_ROOM_UNPUBLISH_T = "L-abstract_room_unpublish-T",
|
|
182
182
|
/**
|
|
183
|
-
*
|
|
183
|
+
* 房间取消发布资源结果
|
|
184
184
|
*/
|
|
185
185
|
L_ABSTRACT_ROOM_UNPUBLISH_R = "L-abstract_room_unpublish-R",
|
|
186
186
|
/**
|
|
@@ -83,6 +83,8 @@ export declare enum RCRTCCode {
|
|
|
83
83
|
/** electron 中 mac 系统暂不支持屏幕共享采集声音 */
|
|
84
84
|
MAC_IN_ELECTRON_NOT_SUPPORT_SCREEN_SHARE_WITH_AUDIO = 53032,
|
|
85
85
|
/** 获取媒体资源时,无系统权限 */
|
|
86
|
-
SYSTEM_PERMISSION_DENIED = 53033
|
|
86
|
+
SYSTEM_PERMISSION_DENIED = 53033,
|
|
87
|
+
/** 发布时无有效资源,如 track 已被销毁 */
|
|
88
|
+
PUBLISH_TRACKS_IS_INVALID = 53034
|
|
87
89
|
}
|
|
88
90
|
//# sourceMappingURL=RCRTCCode.d.ts.map
|
|
@@ -17,13 +17,13 @@ export declare const RongRTCVideoBitrate: {
|
|
|
17
17
|
maxBitrate: number;
|
|
18
18
|
minBitrate: number;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
W180_H180: {
|
|
21
21
|
width: number;
|
|
22
22
|
height: number;
|
|
23
23
|
maxBitrate: number;
|
|
24
24
|
minBitrate: number;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
W240_H180: {
|
|
27
27
|
width: number;
|
|
28
28
|
height: number;
|
|
29
29
|
maxBitrate: number;
|
|
@@ -35,19 +35,31 @@ export declare const RongRTCVideoBitrate: {
|
|
|
35
35
|
maxBitrate: number;
|
|
36
36
|
minBitrate: number;
|
|
37
37
|
};
|
|
38
|
+
W256_H144: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
maxBitrate: number;
|
|
42
|
+
minBitrate: number;
|
|
43
|
+
};
|
|
44
|
+
W320_H180: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
maxBitrate: number;
|
|
48
|
+
minBitrate: number;
|
|
49
|
+
};
|
|
38
50
|
W320_H240: {
|
|
39
51
|
width: number;
|
|
40
52
|
height: number;
|
|
41
53
|
maxBitrate: number;
|
|
42
54
|
minBitrate: number;
|
|
43
55
|
};
|
|
44
|
-
|
|
56
|
+
W360_H360: {
|
|
45
57
|
width: number;
|
|
46
58
|
height: number;
|
|
47
59
|
maxBitrate: number;
|
|
48
60
|
minBitrate: number;
|
|
49
61
|
};
|
|
50
|
-
|
|
62
|
+
W480_H360: {
|
|
51
63
|
width: number;
|
|
52
64
|
height: number;
|
|
53
65
|
maxBitrate: number;
|
|
@@ -59,6 +71,12 @@ export declare const RongRTCVideoBitrate: {
|
|
|
59
71
|
maxBitrate: number;
|
|
60
72
|
minBitrate: number;
|
|
61
73
|
};
|
|
74
|
+
W640_H360: {
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
maxBitrate: number;
|
|
78
|
+
minBitrate: number;
|
|
79
|
+
};
|
|
62
80
|
W640_H480: {
|
|
63
81
|
width: number;
|
|
64
82
|
height: number;
|
|
@@ -71,6 +89,18 @@ export declare const RongRTCVideoBitrate: {
|
|
|
71
89
|
maxBitrate: number;
|
|
72
90
|
minBitrate: number;
|
|
73
91
|
};
|
|
92
|
+
W848_H480: {
|
|
93
|
+
width: number;
|
|
94
|
+
height: number;
|
|
95
|
+
maxBitrate: number;
|
|
96
|
+
minBitrate: number;
|
|
97
|
+
};
|
|
98
|
+
W960_H720: {
|
|
99
|
+
width: number;
|
|
100
|
+
height: number;
|
|
101
|
+
maxBitrate: number;
|
|
102
|
+
minBitrate: number;
|
|
103
|
+
};
|
|
74
104
|
W1280_H720: {
|
|
75
105
|
width: number;
|
|
76
106
|
height: number;
|
|
@@ -11,6 +11,11 @@ export declare enum RCResolution {
|
|
|
11
11
|
W640_H480 = "W640_H480",
|
|
12
12
|
W720_H480 = "W720_H480",
|
|
13
13
|
W1280_H720 = "W1280_H720",
|
|
14
|
-
W1920_H1080 = "W1920_H1080"
|
|
14
|
+
W1920_H1080 = "W1920_H1080",
|
|
15
|
+
W180_H180 = "W180_H180",
|
|
16
|
+
W240_H180 = "W240_H180",
|
|
17
|
+
W360_H360 = "W360_H360",
|
|
18
|
+
W848_H480 = "W848_H480",
|
|
19
|
+
W960_H720 = "W960_H720"
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=RCResolution.d.ts.map
|
|
@@ -17,12 +17,16 @@ export declare abstract class RCLocalTrack extends RCTrack {
|
|
|
17
17
|
* 本地流已销毁
|
|
18
18
|
*/
|
|
19
19
|
static __INNER_EVENT_DESTROY__: string;
|
|
20
|
+
/**
|
|
21
|
+
* track 是否被销毁
|
|
22
|
+
*/
|
|
23
|
+
private _isDestroyed;
|
|
20
24
|
constructor(tag: string, userId: string, kind: 'audio' | 'video', track: MediaStreamTrack);
|
|
21
25
|
/**
|
|
22
26
|
* @override 重写 RCTrack 父类方法
|
|
23
27
|
* @param bool
|
|
24
28
|
*/
|
|
25
|
-
_setLocalMuted(bool: boolean):
|
|
29
|
+
_setLocalMuted(bool: boolean): Promise<RCRTCCode>;
|
|
26
30
|
private _isPublished;
|
|
27
31
|
__innerSetPublished(bool: boolean): void;
|
|
28
32
|
/**
|
|
@@ -33,6 +37,10 @@ export declare abstract class RCLocalTrack extends RCTrack {
|
|
|
33
37
|
* 销毁本地流
|
|
34
38
|
*/
|
|
35
39
|
destroy(): void;
|
|
40
|
+
/**
|
|
41
|
+
* 判断 track 是否被销毁
|
|
42
|
+
*/
|
|
43
|
+
isDestroyed(): boolean;
|
|
36
44
|
private _bitrateInfo?;
|
|
37
45
|
/**
|
|
38
46
|
* 为本地流设定上行码率,仅视频流有效,音频默认 15 kbps,不支持修改
|
|
@@ -112,7 +120,7 @@ export declare class RCLocalFileVideoTrack extends RCLocalFileTrack {
|
|
|
112
120
|
}
|
|
113
121
|
export declare class RCLocalFileAudioTrack extends RCLocalFileTrack {
|
|
114
122
|
constructor(tag: string, userId: string, track: MediaStreamTrack, element: HTMLVideoElement);
|
|
115
|
-
_setLocalMuted(bool: boolean):
|
|
123
|
+
_setLocalMuted(bool: boolean): Promise<RCRTCCode>;
|
|
116
124
|
play(): Promise<{
|
|
117
125
|
code: RCRTCCode;
|
|
118
126
|
}>;
|
|
@@ -47,15 +47,15 @@ export declare abstract class RCTrack extends EventEmitter {
|
|
|
47
47
|
*/
|
|
48
48
|
isReady(): boolean;
|
|
49
49
|
__innerSetMediaStreamTrack(track: MediaStreamTrack | undefined): void;
|
|
50
|
-
protected _setLocalMuted(bool: boolean): void
|
|
50
|
+
protected _setLocalMuted(bool: boolean): void | Promise<RCRTCCode>;
|
|
51
51
|
/**
|
|
52
52
|
* 禁用
|
|
53
53
|
*/
|
|
54
|
-
mute(): void
|
|
54
|
+
mute(): void | Promise<RCRTCCode>;
|
|
55
55
|
/**
|
|
56
56
|
* 启用
|
|
57
57
|
*/
|
|
58
|
-
unmute(): void
|
|
58
|
+
unmute(): void | Promise<RCRTCCode>;
|
|
59
59
|
/**
|
|
60
60
|
* 本端是否已禁用该轨道数据
|
|
61
61
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.4.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.4.7-alpha.3
|
|
3
|
+
* CommitId - 851c4005fa6dfee3d966699f4bc260b0b6cbd7ea
|
|
4
|
+
* Fri Sep 02 2022 09:48:41 GMT+0800 (China Standard Time)
|
|
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';
|
|
@@ -92,7 +92,9 @@ declare enum RCRTCCode {
|
|
|
92
92
|
/** electron 中 mac 系统暂不支持屏幕共享采集声音 */
|
|
93
93
|
MAC_IN_ELECTRON_NOT_SUPPORT_SCREEN_SHARE_WITH_AUDIO = 53032,
|
|
94
94
|
/** 获取媒体资源时,无系统权限 */
|
|
95
|
-
SYSTEM_PERMISSION_DENIED = 53033
|
|
95
|
+
SYSTEM_PERMISSION_DENIED = 53033,
|
|
96
|
+
/** 发布时无有效资源,如 track 已被销毁 */
|
|
97
|
+
PUBLISH_TRACKS_IS_INVALID = 53034
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
/**
|
|
@@ -133,7 +135,12 @@ declare enum RCResolution {
|
|
|
133
135
|
W640_H480 = "W640_H480",
|
|
134
136
|
W720_H480 = "W720_H480",
|
|
135
137
|
W1280_H720 = "W1280_H720",
|
|
136
|
-
W1920_H1080 = "W1920_H1080"
|
|
138
|
+
W1920_H1080 = "W1920_H1080",
|
|
139
|
+
W180_H180 = "W180_H180",
|
|
140
|
+
W240_H180 = "W240_H180",
|
|
141
|
+
W360_H360 = "W360_H360",
|
|
142
|
+
W848_H480 = "W848_H480",
|
|
143
|
+
W960_H720 = "W960_H720"
|
|
137
144
|
}
|
|
138
145
|
|
|
139
146
|
/**
|
|
@@ -193,15 +200,15 @@ declare abstract class RCTrack extends EventEmitter {
|
|
|
193
200
|
*/
|
|
194
201
|
isReady(): boolean;
|
|
195
202
|
__innerSetMediaStreamTrack(track: MediaStreamTrack | undefined): void;
|
|
196
|
-
protected _setLocalMuted(bool: boolean): void
|
|
203
|
+
protected _setLocalMuted(bool: boolean): void | Promise<RCRTCCode>;
|
|
197
204
|
/**
|
|
198
205
|
* 禁用
|
|
199
206
|
*/
|
|
200
|
-
mute(): void
|
|
207
|
+
mute(): void | Promise<RCRTCCode>;
|
|
201
208
|
/**
|
|
202
209
|
* 启用
|
|
203
210
|
*/
|
|
204
|
-
unmute(): void
|
|
211
|
+
unmute(): void | Promise<RCRTCCode>;
|
|
205
212
|
/**
|
|
206
213
|
* 本端是否已禁用该轨道数据
|
|
207
214
|
*/
|
|
@@ -295,12 +302,16 @@ declare abstract class RCLocalTrack extends RCTrack {
|
|
|
295
302
|
* 本地流已销毁
|
|
296
303
|
*/
|
|
297
304
|
static __INNER_EVENT_DESTROY__: string;
|
|
305
|
+
/**
|
|
306
|
+
* track 是否被销毁
|
|
307
|
+
*/
|
|
308
|
+
private _isDestroyed;
|
|
298
309
|
constructor(tag: string, userId: string, kind: 'audio' | 'video', track: MediaStreamTrack);
|
|
299
310
|
/**
|
|
300
311
|
* @override 重写 RCTrack 父类方法
|
|
301
312
|
* @param bool
|
|
302
313
|
*/
|
|
303
|
-
_setLocalMuted(bool: boolean):
|
|
314
|
+
_setLocalMuted(bool: boolean): Promise<RCRTCCode>;
|
|
304
315
|
private _isPublished;
|
|
305
316
|
__innerSetPublished(bool: boolean): void;
|
|
306
317
|
/**
|
|
@@ -311,6 +322,10 @@ declare abstract class RCLocalTrack extends RCTrack {
|
|
|
311
322
|
* 销毁本地流
|
|
312
323
|
*/
|
|
313
324
|
destroy(): void;
|
|
325
|
+
/**
|
|
326
|
+
* 判断 track 是否被销毁
|
|
327
|
+
*/
|
|
328
|
+
isDestroyed(): boolean;
|
|
314
329
|
private _bitrateInfo?;
|
|
315
330
|
/**
|
|
316
331
|
* 为本地流设定上行码率,仅视频流有效,音频默认 15 kbps,不支持修改
|
|
@@ -390,7 +405,7 @@ declare class RCLocalFileVideoTrack extends RCLocalFileTrack {
|
|
|
390
405
|
}
|
|
391
406
|
declare class RCLocalFileAudioTrack extends RCLocalFileTrack {
|
|
392
407
|
constructor(tag: string, userId: string, track: MediaStreamTrack, element: HTMLVideoElement);
|
|
393
|
-
_setLocalMuted(bool: boolean):
|
|
408
|
+
_setLocalMuted(bool: boolean): Promise<RCRTCCode>;
|
|
394
409
|
play(): Promise<{
|
|
395
410
|
code: RCRTCCode;
|
|
396
411
|
}>;
|