@rongcloud/plugin-rtc 5.6.3-alpha.2 → 5.6.3-alpha.5
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/LICENSE +0 -0
- package/dist/index.d.ts +97 -19
- package/dist/index.esm.js +850 -669
- package/dist/index.js +850 -669
- package/dist/index.umd.js +850 -669
- package/package.json +2 -2
package/LICENSE
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCRTC - v5.6.3-alpha.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCRTC - v5.6.3-alpha.5
|
|
3
|
+
* CommitId - 48fe4c6914037db2dfd263f31aba741834041487
|
|
4
|
+
* Wed Nov 16 2022 17:24:53 GMT+0800 (中国标准时间)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
import { EventEmitter, BasicLogger, INaviInfo, RTCPluginContext, AbsCodec, IPromiseResult, ErrorCode, KVString, IRuntime, IAsyncRes, ConnectionStatus, ConversationType, ISendMsgOptions, IReceivedMessage, EnableLogL, IPluginGenerator } from '@rongcloud/engine';
|
|
@@ -1466,10 +1466,10 @@ declare class RTCContext {
|
|
|
1466
1466
|
* @param valueInfo 全量资源数据
|
|
1467
1467
|
* @param objectName 全量 URI 消息名
|
|
1468
1468
|
*/
|
|
1469
|
-
setRTCTotalRes(roomId: string,
|
|
1469
|
+
setRTCTotalRes(roomId: string, messageList: {
|
|
1470
1470
|
name: string;
|
|
1471
1471
|
content: string;
|
|
1472
|
-
}, valueInfo: string, objectName: string, mcuValInfo?: string, cdnValInfo?: string): Promise<ErrorCode>;
|
|
1472
|
+
}[], valueInfo: string, objectName: string, mcuValInfo?: string, cdnValInfo?: string): Promise<ErrorCode>;
|
|
1473
1473
|
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
1474
1474
|
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
|
|
1475
1475
|
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
@@ -1655,7 +1655,7 @@ declare class RCMediaService {
|
|
|
1655
1655
|
/**
|
|
1656
1656
|
* 房间内观众获取 CDN 资源信息、拉流地址
|
|
1657
1657
|
*/
|
|
1658
|
-
getCDNResourceInfo(headers: ICDNPlayUrlReqHeaders, url: string): Promise<{
|
|
1658
|
+
getCDNResourceInfo(headers: ICDNPlayUrlReqHeaders, url: string, traceId: string): Promise<{
|
|
1659
1659
|
code: RCRTCCode;
|
|
1660
1660
|
res?: ICDNPlayUrlResponse;
|
|
1661
1661
|
}>;
|
|
@@ -1859,15 +1859,83 @@ declare enum RCLivingType {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
|
|
1861
1861
|
declare enum RCCommandKind {
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1862
|
+
/**
|
|
1863
|
+
* 发信令取消加入房间之前的资源
|
|
1864
|
+
*/
|
|
1865
|
+
UNPUBLISH_PREV = "UnpublishPrevCommand",
|
|
1866
|
+
/**
|
|
1867
|
+
* 拉取房间内数据
|
|
1868
|
+
*/
|
|
1869
|
+
PULL_RTCROOM_STATUS = "PullRTCRoomStatusCommand",
|
|
1870
|
+
/**
|
|
1871
|
+
* 加入房间
|
|
1872
|
+
*/
|
|
1873
|
+
JOINROOM = "JoinRoomCommand",
|
|
1874
|
+
/**
|
|
1875
|
+
* 解析远端资源数据
|
|
1876
|
+
*/
|
|
1877
|
+
PARSE_REMOTERES = "ParseRemoteResCommand",
|
|
1878
|
+
/**
|
|
1879
|
+
* 解析远端人员数据
|
|
1880
|
+
*/
|
|
1881
|
+
PARSE_USERSTATE = "ParseUserStateCommand",
|
|
1882
|
+
/**
|
|
1883
|
+
* 本端 track 禁用/启用
|
|
1884
|
+
*/
|
|
1885
|
+
LOCAL_TRACK_MUTE = "LocalTrackMuteCommand",
|
|
1886
|
+
/**
|
|
1887
|
+
* 发布资源
|
|
1888
|
+
*/
|
|
1889
|
+
PUBLISH = "PublishCommand",
|
|
1890
|
+
/**
|
|
1891
|
+
* 恢复 ice 连接
|
|
1892
|
+
*/
|
|
1893
|
+
RETRY_EXCHANGE = "RetryExchangeCommand",
|
|
1894
|
+
/**
|
|
1895
|
+
* 取消发布
|
|
1896
|
+
*/
|
|
1897
|
+
UNPUBLISH = "UnpublishCommand",
|
|
1898
|
+
/**
|
|
1899
|
+
* 订阅
|
|
1900
|
+
*/
|
|
1901
|
+
SUBSCRIBE = "SubscribeCommand",
|
|
1902
|
+
/**
|
|
1903
|
+
* 异步订阅、取消订阅、全量订阅
|
|
1904
|
+
*/
|
|
1905
|
+
ASYNC_COMMAND = "AsyncCommand",
|
|
1906
|
+
/**
|
|
1907
|
+
* 取消订阅
|
|
1908
|
+
*/
|
|
1909
|
+
UNSUBSCRIBE = "UnsubscribeCommand",
|
|
1910
|
+
/**
|
|
1911
|
+
* 全量订阅
|
|
1912
|
+
*/
|
|
1913
|
+
UPDATE_SUBSCRIBE_LIST = "UpdateSubscribeListCommand",
|
|
1914
|
+
/**
|
|
1915
|
+
* im 重连房间内人员、资源处理
|
|
1916
|
+
*/
|
|
1917
|
+
ON_SIGNAL_RECONNECTED = "OnSignalReconnectedCommand",
|
|
1918
|
+
/**
|
|
1919
|
+
* 退出副房间
|
|
1920
|
+
*/
|
|
1921
|
+
LEAVE_OTHER_ROOM = "LeaveOtherRoomCommand",
|
|
1922
|
+
/**
|
|
1923
|
+
* 主播、观众切换身份
|
|
1924
|
+
*/
|
|
1925
|
+
RTC_IDENTITY_CHANGE = "RTCIdentityChangeCommand",
|
|
1926
|
+
/**
|
|
1927
|
+
* 开/关 CDN
|
|
1928
|
+
*/
|
|
1929
|
+
ENABLE_INNER_CDN = "EnableInnerCDNCommand",
|
|
1930
|
+
/**
|
|
1931
|
+
* 携带副房间信息重新发 /exchange 请求
|
|
1932
|
+
*/
|
|
1933
|
+
EXCHANGE_WITH_PUSH_OTHER_ROOM = "ExchangeWithPushOtherRoomCommand",
|
|
1934
|
+
/**
|
|
1935
|
+
* 发送 MCU 请求
|
|
1936
|
+
*/
|
|
1937
|
+
MCUCONFIG_FLUSH = "MCUConfigFlushCommand",
|
|
1938
|
+
UNKNOWN = "Unknown"
|
|
1871
1939
|
}
|
|
1872
1940
|
|
|
1873
1941
|
declare enum CommandPriority {
|
|
@@ -1924,6 +1992,10 @@ declare class RCRTCPeerCManager {
|
|
|
1924
1992
|
* context
|
|
1925
1993
|
*/
|
|
1926
1994
|
protected readonly _initOptions?: IRCRTCInitOptions | undefined;
|
|
1995
|
+
/**
|
|
1996
|
+
* 是否是观众
|
|
1997
|
+
*/
|
|
1998
|
+
private readonly _isAudience?;
|
|
1927
1999
|
/**
|
|
1928
2000
|
* 存储创建的所有 peerC,key 为 pcName,/exchange 请求中 request header 中的 Peer-Connection-Id 值
|
|
1929
2001
|
*/
|
|
@@ -1957,7 +2029,11 @@ declare class RCRTCPeerCManager {
|
|
|
1957
2029
|
/**
|
|
1958
2030
|
* context
|
|
1959
2031
|
*/
|
|
1960
|
-
_initOptions?: IRCRTCInitOptions | undefined
|
|
2032
|
+
_initOptions?: IRCRTCInitOptions | undefined,
|
|
2033
|
+
/**
|
|
2034
|
+
* 是否是观众
|
|
2035
|
+
*/
|
|
2036
|
+
_isAudience?: boolean | undefined);
|
|
1961
2037
|
get useMutilPeerC(): boolean;
|
|
1962
2038
|
/**
|
|
1963
2039
|
* 根据 track 判断是否为上行
|
|
@@ -2076,6 +2152,7 @@ declare class RCRTCPeerCManager {
|
|
|
2076
2152
|
}
|
|
2077
2153
|
|
|
2078
2154
|
declare class BaseInvoker<STORE> {
|
|
2155
|
+
private context;
|
|
2079
2156
|
/**
|
|
2080
2157
|
* 内存数据管理实例
|
|
2081
2158
|
*/
|
|
@@ -2084,7 +2161,7 @@ declare class BaseInvoker<STORE> {
|
|
|
2084
2161
|
* 命令终止时返回的错误码定义
|
|
2085
2162
|
*/
|
|
2086
2163
|
private abortCode;
|
|
2087
|
-
constructor(
|
|
2164
|
+
constructor(context: RTCContext,
|
|
2088
2165
|
/**
|
|
2089
2166
|
* 内存数据管理实例
|
|
2090
2167
|
*/
|
|
@@ -2100,7 +2177,7 @@ declare class BaseInvoker<STORE> {
|
|
|
2100
2177
|
push<R>(command: BaseCommand<R, STORE>): Promise<R>;
|
|
2101
2178
|
private _isDestroyed;
|
|
2102
2179
|
/**
|
|
2103
|
-
* 查找出 RCCommandKind.
|
|
2180
|
+
* 查找出 RCCommandKind.ASYNC_COMMAND 类型的 Command,并将其从队列中删除
|
|
2104
2181
|
* 并使用最新的一次 Command 接管它的 resolve & reject
|
|
2105
2182
|
* @param resolve
|
|
2106
2183
|
* @param reject
|
|
@@ -2183,7 +2260,7 @@ declare class RCLivingPKHandler {
|
|
|
2183
2260
|
/**
|
|
2184
2261
|
* 加入 PK 房间回调
|
|
2185
2262
|
*/
|
|
2186
|
-
_onJoinedPKRoom: (roomId: string,
|
|
2263
|
+
_onJoinedPKRoom: (roomId: string, traceId: string) => void, _clientSessionId?: string | undefined);
|
|
2187
2264
|
private _callAppListener;
|
|
2188
2265
|
/**
|
|
2189
2266
|
* 收到连麦邀请
|
|
@@ -2350,6 +2427,7 @@ declare abstract class RCAbstractRoom extends EventEmitter {
|
|
|
2350
2427
|
* 是否使用多 peerConnection
|
|
2351
2428
|
*/
|
|
2352
2429
|
_useMutilPeerC?: boolean | undefined, _clientSessionId?: string, signalRetryTime?: number);
|
|
2430
|
+
private _pullRTCRoomStatus;
|
|
2353
2431
|
/**
|
|
2354
2432
|
* 拉取房间数据
|
|
2355
2433
|
* @param roomId 房间 id
|