aliyun-rtc-sdk 6.11.9-beta.0 → 6.12.0-beta.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/dist/aliyun-rtc-sdk.js +20 -19
- package/dist/types/index.d.ts +105 -12
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -117,6 +117,22 @@ export declare enum AliRtcConnectionStatusChangeReason {
|
|
|
117
117
|
AliRtcConnectionChangedNetworkInterrupted = 12
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
export declare class AliRtcDataChannelMsg {
|
|
121
|
+
data: ArrayBuffer;
|
|
122
|
+
networkTime: number;
|
|
123
|
+
futureOrProgress: number;
|
|
124
|
+
type: AliRtcDataMsgType;
|
|
125
|
+
constructor(data: ArrayBuffer, type?: AliRtcDataMsgType, networkTime?: number, progress?: number);
|
|
126
|
+
toBuffer(): ArrayBuffer;
|
|
127
|
+
static parse(buffer: ArrayBuffer): AliRtcDataChannelMsg | undefined;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare enum AliRtcDataMsgType {
|
|
131
|
+
AliEngineDataMsgNone = 0,
|
|
132
|
+
AliEngineDataMsgMusicProgress = 1,
|
|
133
|
+
AliEngineDataMsgCustom = 2
|
|
134
|
+
}
|
|
135
|
+
|
|
120
136
|
declare type AliRtcDualVideoPluginOptions = VideoScalerOptions;
|
|
121
137
|
|
|
122
138
|
export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
|
|
@@ -194,6 +210,8 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
|
|
|
194
210
|
static AliRtcLiveTranscodingState: typeof AliRtcLiveTranscodingState;
|
|
195
211
|
static AliRtcLiveTranscodingErrorCode: typeof AliRtcLiveTranscodingErrorCode;
|
|
196
212
|
static AliRtcTrascodingPublishTaskStatus: typeof AliRtcTrascodingPublishTaskStatus;
|
|
213
|
+
static AliRtcDataChannelMsg: typeof AliRtcDataChannelMsg;
|
|
214
|
+
static AliRtcDataMsgType: typeof AliRtcDataMsgType;
|
|
197
215
|
/**
|
|
198
216
|
* @brief 销毁 {@link AliRtcEngine}实例
|
|
199
217
|
* @details 调用该方法将会释放所有内部使用的资源,当完成音视频通信之后都建议调用该方法释放实例.调用该方法后,你将不能再使用 {@link AliRtcEngine} 的其他方法和任何回调,如需要再次使用需要重新调用 {@link AliRtcEngine.getInstance} 方法创建一个新的实例。
|
|
@@ -352,8 +370,6 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
|
|
|
352
370
|
* engine.setClientRole(AliRtcSdkClientRole.AliRtcSdkInteractive);
|
|
353
371
|
* ```
|
|
354
372
|
* @param {string} token 单参数认证信息,从App Server获取。
|
|
355
|
-
* @param {string} channelId 频道ID
|
|
356
|
-
* @param {string} userId 用户ID
|
|
357
373
|
* @param {string} userName 任意用于显示的用户名称。不是User ID
|
|
358
374
|
* @note
|
|
359
375
|
* - 异步接口,方法执行成功则为成功入会
|
|
@@ -362,7 +378,7 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
|
|
|
362
378
|
* - 如果已在会中想重新入会,需要先调用 {@link leaveChannel} 离会,且确保方法执行成功
|
|
363
379
|
* - 用户加入频道后,默认订阅频道内所有其他用户的音视频流,默认推送音视频流到远端,因此将会产生计费,如果想要取消默认订阅可以 {@link joinChannel} 前调用 {@link setDefaultSubscribeAllRemoteAudioStreams} 和 {@link setDefaultSubscribeAllRemoteVideoStreams}
|
|
364
380
|
*/
|
|
365
|
-
joinChannel(token: string,
|
|
381
|
+
joinChannel(token: string, userName: string): Promise<void>;
|
|
366
382
|
/**
|
|
367
383
|
* @brief 加入频道(多参数)
|
|
368
384
|
* @details 该方法让用户加入频道,一个频道内可以加入多个用户进行互相通话。
|
|
@@ -458,6 +474,7 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
|
|
|
458
474
|
* 用于在自动播放失败等场景恢复播放
|
|
459
475
|
*/
|
|
460
476
|
resumeRemoteAudioStream(uid: string): void;
|
|
477
|
+
stopRemoteAudioPlay(uid: string): void;
|
|
461
478
|
/**
|
|
462
479
|
* @brief 是否推送本地视频流
|
|
463
480
|
* @param enabled 是否开启/关闭本地视频流推送
|
|
@@ -952,6 +969,11 @@ export declare class AliRtcEngine extends default_2<AliRtcEngineEventListener> {
|
|
|
952
969
|
enableBackgroundBlur(enable: boolean): void;
|
|
953
970
|
setParameter(parameter: string): void;
|
|
954
971
|
getParameter(): string;
|
|
972
|
+
/**
|
|
973
|
+
* @brief 发送 DataChannel 消息
|
|
974
|
+
* @param dataChannelMsg 伴奏控制消息
|
|
975
|
+
*/
|
|
976
|
+
sendDataChannelMessage(dataChannelMsg: AliRtcDataChannelMsg): void;
|
|
955
977
|
}
|
|
956
978
|
|
|
957
979
|
declare interface AliRtcEngineConfig {
|
|
@@ -1110,6 +1132,14 @@ declare interface AliRtcEngineEventListener {
|
|
|
1110
1132
|
* @param channel 当前频道
|
|
1111
1133
|
*/
|
|
1112
1134
|
screenSharePublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number, channel: string) => void;
|
|
1135
|
+
/**
|
|
1136
|
+
* DataChannel 推流变更回调
|
|
1137
|
+
* @param oldState 之前的推流状态
|
|
1138
|
+
* @param newState 当前的推流状态
|
|
1139
|
+
* @param elapseSinceLastState 状态变更时间间隔(毫秒)
|
|
1140
|
+
* @param channel 当前频道
|
|
1141
|
+
*/
|
|
1142
|
+
dataPublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number, channel: string) => void;
|
|
1113
1143
|
/**
|
|
1114
1144
|
* 相机流订阅情况变更回调
|
|
1115
1145
|
* @param uid 用户ID
|
|
@@ -1137,6 +1167,15 @@ declare interface AliRtcEngineEventListener {
|
|
|
1137
1167
|
* @param channel 当前频道
|
|
1138
1168
|
*/
|
|
1139
1169
|
screenShareSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number, channel: string) => void;
|
|
1170
|
+
/**
|
|
1171
|
+
* DataChannel 订阅情况变更回调
|
|
1172
|
+
* @param uid 用户ID
|
|
1173
|
+
* @param oldState 之前的订阅状态
|
|
1174
|
+
* @param newState 当前的订阅状态
|
|
1175
|
+
* @param elapseSinceLastState 状态变更时间间隔(毫秒)
|
|
1176
|
+
* @param channel 当前频道
|
|
1177
|
+
*/
|
|
1178
|
+
dataSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number, channel: string) => void;
|
|
1140
1179
|
/**
|
|
1141
1180
|
* 收到媒体扩展信息回调
|
|
1142
1181
|
* @param uid 用户ID,媒体信息发送用户的ID
|
|
@@ -1211,6 +1250,12 @@ declare interface AliRtcEngineEventListener {
|
|
|
1211
1250
|
* @param message 错误消息
|
|
1212
1251
|
*/
|
|
1213
1252
|
onOccurError: (error: AliRtcError) => void;
|
|
1253
|
+
/**
|
|
1254
|
+
* @brief 收到数据通道消息
|
|
1255
|
+
* @param uid 用户ID
|
|
1256
|
+
* @param message 消息
|
|
1257
|
+
*/
|
|
1258
|
+
dataChannelMsg: (uid: string, message: AliRtcDataChannelMsg) => void;
|
|
1214
1259
|
}
|
|
1215
1260
|
|
|
1216
1261
|
export declare enum AliRtcEngineLocalDeviceExceptionType {
|
|
@@ -1269,6 +1314,7 @@ declare enum AliRtcEnv {
|
|
|
1269
1314
|
declare class AliRtcError extends Error {
|
|
1270
1315
|
_code: number;
|
|
1271
1316
|
_extra?: any;
|
|
1317
|
+
static fromRtsError(error: any): AliRtcError;
|
|
1272
1318
|
static fromError(error: any, code?: number, fallbackMessage?: string): AliRtcError;
|
|
1273
1319
|
constructor(code: number, message: string, extra?: any);
|
|
1274
1320
|
get code(): number;
|
|
@@ -1407,6 +1453,8 @@ export declare enum AliRtcErrorCode {
|
|
|
1407
1453
|
ERR_SDK_SUBSCRIBE_DUAL_STRAM_FAILED = 16844115,
|
|
1408
1454
|
/** 订阅屏幕共享失败 */
|
|
1409
1455
|
ERR_SDK_SUBSCRIBE_SCREEN_SHARE_FAILED = 16844116,
|
|
1456
|
+
/** 订阅 DataChannel 失败 */
|
|
1457
|
+
ERR_SDK_SUBSCRIBE_DATA_FAILED = 16844117,
|
|
1410
1458
|
/****************************************************
|
|
1411
1459
|
* 其他错误码
|
|
1412
1460
|
****************************************************/
|
|
@@ -2268,6 +2316,7 @@ declare class BizControl extends default_2<BizControlListener> {
|
|
|
2268
2316
|
setAudioRedEnabled(enable: boolean): void;
|
|
2269
2317
|
setParameter(parameter: string): void;
|
|
2270
2318
|
getParameter(): string;
|
|
2319
|
+
sendDataChannelMessage(message: AliRtcDataChannelMsg): Promise<void> | undefined;
|
|
2271
2320
|
}
|
|
2272
2321
|
|
|
2273
2322
|
declare interface BizControlConfig {
|
|
@@ -2283,6 +2332,7 @@ declare interface BizControlListener {
|
|
|
2283
2332
|
audioSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number, channel: string) => void;
|
|
2284
2333
|
videoSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number, channel: string) => void;
|
|
2285
2334
|
screenSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number, channel: string) => void;
|
|
2335
|
+
dataSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number, channel: string) => void;
|
|
2286
2336
|
userAudioMuted: (uid: string, isMute: boolean) => void;
|
|
2287
2337
|
userVideoMuted: (uid: string, isMute: boolean) => void;
|
|
2288
2338
|
userScreenMuted: (userId: string, isMute: boolean) => void;
|
|
@@ -2300,6 +2350,7 @@ declare interface BizControlListener {
|
|
|
2300
2350
|
remoteAudioPlayError: (uid: string, reason?: string) => void;
|
|
2301
2351
|
remoteVideoPlayError: (uid: string, reason?: string) => void;
|
|
2302
2352
|
remoteSubscribeError: (error: AliRtcError) => void;
|
|
2353
|
+
remoteDataChannelMessage: (uid: string, message: AliRtcDataChannelMsg) => void;
|
|
2303
2354
|
}
|
|
2304
2355
|
|
|
2305
2356
|
declare enum ClientEventType {
|
|
@@ -2327,7 +2378,7 @@ declare enum CmdType {
|
|
|
2327
2378
|
declare enum CodecType {
|
|
2328
2379
|
OPUS = "opus",
|
|
2329
2380
|
H264 = "H264",
|
|
2330
|
-
|
|
2381
|
+
UNKNOWN = ""
|
|
2331
2382
|
}
|
|
2332
2383
|
|
|
2333
2384
|
declare const _default: typeof AliRtcEngine;
|
|
@@ -2539,6 +2590,7 @@ declare class LocalUser extends User {
|
|
|
2539
2590
|
private previewElements;
|
|
2540
2591
|
private screenPreviewElements;
|
|
2541
2592
|
private streamManager;
|
|
2593
|
+
private dc;
|
|
2542
2594
|
protected streamTracks?: TrackInfo[];
|
|
2543
2595
|
protected publishId: string;
|
|
2544
2596
|
protected signalingManager: SignalingManager;
|
|
@@ -2553,6 +2605,7 @@ declare class LocalUser extends User {
|
|
|
2553
2605
|
private videoPubState;
|
|
2554
2606
|
private videoSmallPubState;
|
|
2555
2607
|
private screenPubState;
|
|
2608
|
+
private dataPubState;
|
|
2556
2609
|
private parameter;
|
|
2557
2610
|
constructor(config: LocalUserConfig);
|
|
2558
2611
|
get joined(): boolean;
|
|
@@ -2724,6 +2777,7 @@ declare class LocalUser extends User {
|
|
|
2724
2777
|
getCurrentMicDeviceId(): string | undefined;
|
|
2725
2778
|
enableAudioVolumeIndication(interval: number): void;
|
|
2726
2779
|
sendSEI(message: ArrayBuffer, repeatCount: number, payloadType: number): Promise<void>;
|
|
2780
|
+
sendDataChannelMessage(message: AliRtcDataChannelMsg): Promise<void>;
|
|
2727
2781
|
getStats(): Promise<{
|
|
2728
2782
|
audio: AliRtcLocalAudioStats[];
|
|
2729
2783
|
video: AliRtcLocalVideoStats[];
|
|
@@ -2801,7 +2855,8 @@ declare enum MsidType {
|
|
|
2801
2855
|
Audio = "sophon_audio",
|
|
2802
2856
|
VideoLarge = "sophon_video_camera_large",
|
|
2803
2857
|
VideoSmall = "sophon_video_camera_small",
|
|
2804
|
-
Screen = "sophon_video_screen_share"
|
|
2858
|
+
Screen = "sophon_video_screen_share",
|
|
2859
|
+
Data = "sophon_data"
|
|
2805
2860
|
}
|
|
2806
2861
|
|
|
2807
2862
|
declare interface OSSSTSToken {
|
|
@@ -2928,7 +2983,7 @@ declare interface RefreshUser {
|
|
|
2928
2983
|
}
|
|
2929
2984
|
|
|
2930
2985
|
declare interface RemoteMediaTrackInfo extends MediaTrackInfo {
|
|
2931
|
-
|
|
2986
|
+
subscribeState?: RemoteTrackSubscribeState;
|
|
2932
2987
|
}
|
|
2933
2988
|
|
|
2934
2989
|
declare class RemoteStreamInfo extends default_2<StreamListener> {
|
|
@@ -2940,6 +2995,7 @@ declare class RemoteStreamInfo extends default_2<StreamListener> {
|
|
|
2940
2995
|
protected videoLargeInfo: RemoteMediaTrackInfo;
|
|
2941
2996
|
protected videoSmallInfo: RemoteMediaTrackInfo;
|
|
2942
2997
|
protected screenInfo: RemoteMediaTrackInfo;
|
|
2998
|
+
protected dataInfo: RemoteMediaTrackInfo;
|
|
2943
2999
|
protected audioVolume: number;
|
|
2944
3000
|
protected audioMuted: boolean;
|
|
2945
3001
|
protected userStatus?: DeviceStatus;
|
|
@@ -2964,7 +3020,9 @@ declare class RemoteStreamInfo extends default_2<StreamListener> {
|
|
|
2964
3020
|
* @returns
|
|
2965
3021
|
*/
|
|
2966
3022
|
getScreenInfo(): RemoteMediaTrackInfo;
|
|
3023
|
+
getDataInfo(): RemoteMediaTrackInfo;
|
|
2967
3024
|
get subscribingInfos(): RemoteMediaTrackInfo[];
|
|
3025
|
+
get hasTrack(): boolean;
|
|
2968
3026
|
/**
|
|
2969
3027
|
* 远端流是否包含音频轨道
|
|
2970
3028
|
* @returns
|
|
@@ -2990,37 +3048,46 @@ declare class RemoteStreamInfo extends default_2<StreamListener> {
|
|
|
2990
3048
|
* @returns
|
|
2991
3049
|
*/
|
|
2992
3050
|
get hasScreen(): boolean;
|
|
3051
|
+
get hasData(): boolean;
|
|
2993
3052
|
/**
|
|
2994
3053
|
* 是否订阅远端流音频轨道
|
|
2995
3054
|
* @returns
|
|
2996
3055
|
*/
|
|
3056
|
+
get isAudioSubscribed(): boolean;
|
|
2997
3057
|
get isAudioSubscribing(): boolean;
|
|
2998
3058
|
/**
|
|
2999
3059
|
* 是否订阅远端流视频轨道
|
|
3000
3060
|
* @returns
|
|
3001
3061
|
*/
|
|
3062
|
+
get isVideoSubscribed(): boolean;
|
|
3002
3063
|
get isVideoSubscribing(): boolean;
|
|
3003
3064
|
/**
|
|
3004
3065
|
* 是否订阅远端流视频大流轨道
|
|
3005
3066
|
* @returns
|
|
3006
3067
|
*/
|
|
3068
|
+
get isVideoLargeSubscribed(): boolean;
|
|
3007
3069
|
get isVideoLargeSubscribing(): boolean;
|
|
3008
3070
|
/**
|
|
3009
3071
|
* 是否订阅远端流视频小流轨道
|
|
3010
3072
|
* @returns
|
|
3011
3073
|
*/
|
|
3074
|
+
get isVideoSmallSubscribed(): boolean;
|
|
3012
3075
|
get isVideoSmallSubscribing(): boolean;
|
|
3013
3076
|
/**
|
|
3014
3077
|
* 是否订阅远端流屏幕共享轨道
|
|
3015
3078
|
* @returns
|
|
3016
3079
|
*/
|
|
3080
|
+
get isScreenSubscribed(): boolean;
|
|
3017
3081
|
get isScreenSubscribing(): boolean;
|
|
3082
|
+
get isDataSubscribed(): boolean;
|
|
3083
|
+
get isDataSubscribing(): boolean;
|
|
3018
3084
|
get audioCodec(): CodecType;
|
|
3019
3085
|
get videoCodec(): CodecType;
|
|
3020
3086
|
get audioTrackInfo(): AliRtcAudioTrack;
|
|
3021
3087
|
get videoTrackInfo(): AliRtcVideoTrack;
|
|
3022
3088
|
updateTracks(tracks?: TrackInfo[]): UpdateTracksResult;
|
|
3023
|
-
protected updateRemoteTrackSsrc(audioSsrc: string, videoLargeSsrc: string, videoSmallSsrc: string, screenSsrc: string): void;
|
|
3089
|
+
protected updateRemoteTrackSsrc(audioSsrc: string, videoLargeSsrc: string, videoSmallSsrc: string, screenSsrc: string, dataSsrc: string): void;
|
|
3090
|
+
markRemoteTrackSubscribing(option: SubscribeOptions): any;
|
|
3024
3091
|
updateRemoteTrackSubState(option: SubscribeOptions): any;
|
|
3025
3092
|
/**
|
|
3026
3093
|
* 更新远端用户设备状态
|
|
@@ -3035,6 +3102,12 @@ declare interface RemoteSubscribeOptions {
|
|
|
3035
3102
|
options: SubscribeOptions;
|
|
3036
3103
|
}
|
|
3037
3104
|
|
|
3105
|
+
declare enum RemoteTrackSubscribeState {
|
|
3106
|
+
NotSubscribe = 0,
|
|
3107
|
+
Subscribing = 1,
|
|
3108
|
+
Subscribed = 2
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3038
3111
|
declare class RemoteUser extends User {
|
|
3039
3112
|
/**
|
|
3040
3113
|
* @ignore
|
|
@@ -3067,6 +3140,9 @@ declare class RemoteUser extends User {
|
|
|
3067
3140
|
private videoLargeSubState;
|
|
3068
3141
|
private videoSmallSubState;
|
|
3069
3142
|
private screenSubState;
|
|
3143
|
+
private dataSubState;
|
|
3144
|
+
private dc;
|
|
3145
|
+
private dcMsgWaitingPieces;
|
|
3070
3146
|
streamInfo: RemoteStreamInfo;
|
|
3071
3147
|
streamUrl: string;
|
|
3072
3148
|
private parameter;
|
|
@@ -3095,6 +3171,7 @@ declare class RemoteUser extends User {
|
|
|
3095
3171
|
get isVideoLargeSubscribing(): boolean;
|
|
3096
3172
|
get isVideoSmallSubscribing(): boolean;
|
|
3097
3173
|
get isScreenSubscribing(): boolean;
|
|
3174
|
+
get isDataSubscribing(): boolean;
|
|
3098
3175
|
get audioEnabled(): boolean;
|
|
3099
3176
|
get videoEnabled(): boolean;
|
|
3100
3177
|
get screenEnabled(): boolean;
|
|
@@ -3150,7 +3227,7 @@ declare class RemoteUser extends User {
|
|
|
3150
3227
|
* 用保存的订阅参数恢复订阅
|
|
3151
3228
|
*/
|
|
3152
3229
|
restore(): void;
|
|
3153
|
-
resumeAudio(): Promise<void
|
|
3230
|
+
resumeAudio(): Promise<void>;
|
|
3154
3231
|
resumeVideo(videoTrack?: AliRtcVideoTrack): Promise<void>;
|
|
3155
3232
|
resumePlay(): void;
|
|
3156
3233
|
/**
|
|
@@ -3170,6 +3247,9 @@ declare class RemoteUser extends User {
|
|
|
3170
3247
|
private updateScreenStream;
|
|
3171
3248
|
private clearStream;
|
|
3172
3249
|
private clearScreenStream;
|
|
3250
|
+
private onDataChannelMessage;
|
|
3251
|
+
private subscribeDataChannel;
|
|
3252
|
+
private subscribeStopDataChannel;
|
|
3173
3253
|
/**
|
|
3174
3254
|
* 尝试更新订阅
|
|
3175
3255
|
* 1. 需要新增订阅的情况:想要订阅 & 没有正在订阅 & 远端有流
|
|
@@ -3182,8 +3262,8 @@ declare class RemoteUser extends User {
|
|
|
3182
3262
|
private handleAudioPaused;
|
|
3183
3263
|
private handleVideoPlayFailded;
|
|
3184
3264
|
private playAudio;
|
|
3185
|
-
|
|
3186
|
-
playAll(isScreen?: boolean): void;
|
|
3265
|
+
stopPlayAudio(): void;
|
|
3266
|
+
playAll(isScreen?: boolean, isReplace?: boolean): void;
|
|
3187
3267
|
/**
|
|
3188
3268
|
* 播放
|
|
3189
3269
|
*/
|
|
@@ -3304,7 +3384,7 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3304
3384
|
set localJoinTime(time: number);
|
|
3305
3385
|
setEncodedInsertableStreams(enable: boolean): void;
|
|
3306
3386
|
setAudioRedEnabled(enable: boolean): void;
|
|
3307
|
-
|
|
3387
|
+
clear(): void;
|
|
3308
3388
|
private startConnect;
|
|
3309
3389
|
private setConnected;
|
|
3310
3390
|
get isConnecting(): boolean;
|
|
@@ -3316,10 +3396,12 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3316
3396
|
private waitPublishSender;
|
|
3317
3397
|
getPublishVideoStats(streamUrl: string, msid?: string): Promise<unknown>;
|
|
3318
3398
|
getPublishAudioStats(streamUrl: string, msid?: string): Promise<unknown>;
|
|
3319
|
-
publishAdd(streamUrl: string, stream: LocalStream, callId: string, extra?: PublishExtraParams, isResume?: boolean,
|
|
3399
|
+
publishAdd(streamUrl: string, stream: LocalStream, callId: string, extra?: PublishExtraParams, isResume?: boolean, waitSender?: boolean, reason?: PublishReason): Promise<string>;
|
|
3320
3400
|
publishDelete(streamUrl: string, options: PublishOptions): Promise<string>;
|
|
3321
3401
|
publishReplace(streamUrl: string, stream: LocalStream, extra?: PublishExtraParams): Promise<any>;
|
|
3322
3402
|
publishStop(streamUrl: string): Promise<string>;
|
|
3403
|
+
publishAddDataChannel(streamUrl: string): Promise<any>;
|
|
3404
|
+
publishStopDataChannel(streamUrl: string, datachannel: any): Promise<void>;
|
|
3323
3405
|
unpublish(): Promise<void>;
|
|
3324
3406
|
/**
|
|
3325
3407
|
* 获取 sub/subAdd config
|
|
@@ -3334,6 +3416,8 @@ declare class RtsManager extends default_2<RtsManagerEventListener> {
|
|
|
3334
3416
|
stream: any;
|
|
3335
3417
|
} | undefined>;
|
|
3336
3418
|
subscibeStop(streamUrl: string): Promise<void>;
|
|
3419
|
+
subscribeAddDataChannel(streamUrl: string): Promise<any>;
|
|
3420
|
+
subscribeStopDatachannel(streamUrl: string, datachannel: any): Promise<any>;
|
|
3337
3421
|
publish(streamUrl: string, callId: string, isResume?: boolean, reason?: PublishReason): Promise<string>;
|
|
3338
3422
|
subscribe(remoteSubscribeOptions: RemoteSubscribeOptions, reason: SubscribeReason, callId: string, remoteCallId: string, startTs: number): Promise<any>;
|
|
3339
3423
|
getSubscribeVideoStats(streamUrl: string, msid?: string): Promise<unknown>;
|
|
@@ -3352,6 +3436,10 @@ declare interface RtsManagerEventListener {
|
|
|
3352
3436
|
}
|
|
3353
3437
|
|
|
3354
3438
|
declare class SignalingManager extends default_2<RoomServerListener> {
|
|
3439
|
+
/**
|
|
3440
|
+
* @ignore
|
|
3441
|
+
*/
|
|
3442
|
+
static logName: string;
|
|
3355
3443
|
protected signaling?: ISignalingInterface;
|
|
3356
3444
|
protected authInfo?: AliRtcAuthInfo;
|
|
3357
3445
|
protected userName?: string;
|
|
@@ -3674,6 +3762,7 @@ declare interface StreamOptions {
|
|
|
3674
3762
|
audio?: boolean;
|
|
3675
3763
|
video?: boolean;
|
|
3676
3764
|
screen?: boolean;
|
|
3765
|
+
data?: boolean;
|
|
3677
3766
|
}
|
|
3678
3767
|
|
|
3679
3768
|
declare class StsManager extends default_2<StsManagerListener> {
|
|
@@ -3781,16 +3870,20 @@ declare interface UserListener {
|
|
|
3781
3870
|
audioSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number) => void;
|
|
3782
3871
|
videoSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number) => void;
|
|
3783
3872
|
screenSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number) => void;
|
|
3873
|
+
dataSubscribeStateChanged: (uid: string, oldState: AliRtcSubscribeState, newState: AliRtcSubscribeState, elapseSinceLastState: number) => void;
|
|
3784
3874
|
audioPublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number) => void;
|
|
3785
3875
|
videoPublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number) => void;
|
|
3786
3876
|
dualStreamPublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number) => void;
|
|
3787
3877
|
screenPublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number) => void;
|
|
3878
|
+
dataPublishStateChanged: (oldState: AliRtcPublishState, newState: AliRtcPublishState, elapseSinceLastState: number) => void;
|
|
3788
3879
|
localDeviceException: (localDeviceType: AliRtcEngineLocalDeviceType, localDeviceExceptionType: AliRtcEngineLocalDeviceExceptionType, description: string) => void;
|
|
3880
|
+
publishDataError: (error: AliRtcError) => void;
|
|
3789
3881
|
remoteAudioAutoPlayFail: (uid: string) => void;
|
|
3790
3882
|
remoteVideoAutoPlayFail: (uid: string, track: AliRtcVideoTrack) => void;
|
|
3791
3883
|
remoteAudioPlayError: (uid: string, reason?: string) => void;
|
|
3792
3884
|
remoteVideoPlayError: (uid: string, reason?: string) => void;
|
|
3793
3885
|
remoteSubscribeError: (error: AliRtcError) => void;
|
|
3886
|
+
remoteDataChannelMessage: (uid: string, message: AliRtcDataChannelMsg) => void;
|
|
3794
3887
|
}
|
|
3795
3888
|
|
|
3796
3889
|
declare interface VideoScaler {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aliyun-rtc-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.12.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "rtc web sdk of aliyun",
|
|
6
6
|
"main": "dist/aliyun-rtc-sdk.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@aliyun-sls/web-sts-plugin": "^0.3.5",
|
|
10
10
|
"@aliyun-sls/web-track-browser": "^0.3.5",
|
|
11
11
|
"aliyun-queen-engine": "^6.3.3",
|
|
12
|
-
"aliyun-rts-sdk": "2.9.
|
|
12
|
+
"aliyun-rts-sdk": "2.9.1-beta.2",
|
|
13
13
|
"crypto-js": "^4.1.1",
|
|
14
14
|
"dateformat": "^5.0.3",
|
|
15
15
|
"eventemitter3": "^5.0.1",
|