dingrtc 3.9.5 → 3.9.7-4
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/index.d.ts +18 -16
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1751,12 +1751,14 @@ declare class SessionManager extends EventEmitter<SessionManagerEvent> {
|
|
|
1751
1751
|
reporter: Reporter;
|
|
1752
1752
|
logger: ILogger;
|
|
1753
1753
|
mixedLocalAudioTrack: MixedLocalAudioTrack;
|
|
1754
|
+
repubPromise: Promise<void>;
|
|
1754
1755
|
constructor(client: DingRTCClient, serviceManager: ServiceManager);
|
|
1755
1756
|
private getOrCreatePeerConnection;
|
|
1756
1757
|
/**
|
|
1757
1758
|
* TODO: 确认为什么 repub 不需要响应服务端的 reoffer 消息?
|
|
1758
1759
|
*/
|
|
1759
|
-
private
|
|
1760
|
+
private handleRepublish;
|
|
1761
|
+
private _handleRepub;
|
|
1760
1762
|
/**
|
|
1761
1763
|
* @deprecated
|
|
1762
1764
|
* @param sessions
|
|
@@ -2086,10 +2088,17 @@ interface IClientEvents {
|
|
|
2086
2088
|
*/
|
|
2087
2089
|
'media-reconnect-start': (uid: string) => void;
|
|
2088
2090
|
/**
|
|
2091
|
+
* @deprecated 该事件已废弃,请使用 'media-reconnect-succeeded' 或 'media-reconnect-failed' 事件。
|
|
2089
2092
|
* SDK 重新建立媒体连接(用于发布和订阅)结束的回调。
|
|
2090
2093
|
* @param uid 重新建立的媒体连接所对应的用户 ID。如果是本地 uid 说明是重新发布,如果是远端 uid 说明是重新订阅。
|
|
2091
2094
|
*/
|
|
2092
2095
|
'media-reconnect-end': (uid: string) => void;
|
|
2096
|
+
'pub-media-reconnect-started': (trackId: string) => void;
|
|
2097
|
+
'pub-media-reconnect-succeeded': (trackId: string) => void;
|
|
2098
|
+
'pub-media-reconnect-failed': (trackId: string) => void;
|
|
2099
|
+
'sub-media-reconnect-started': (trackId: string) => void;
|
|
2100
|
+
'sub-media-reconnect-succeeded': (trackId: string) => void;
|
|
2101
|
+
'sub-media-reconnect-failed': (trackId: string) => void;
|
|
2093
2102
|
/**
|
|
2094
2103
|
* 订阅的视频流类型发生改变回调。
|
|
2095
2104
|
* 视频流类型改变指视频大流(高码率、高分辨率)变为视频小流(低码率、低分辨率),或视频小流变为视频大流。
|
|
@@ -2236,7 +2245,7 @@ declare class DingRTCClient extends EventEmitter<IClientEvents> {
|
|
|
2236
2245
|
* @param {SubscribeParam[]} batchSubscribeParam
|
|
2237
2246
|
* @returns void
|
|
2238
2247
|
*/
|
|
2239
|
-
batchSubscribe(batchSubscribeParam: SubscribeParam[]): Promise<SubscribeResult[]>;
|
|
2248
|
+
batchSubscribe(batchSubscribeParam: SubscribeParam$1[]): Promise<SubscribeResult[]>;
|
|
2240
2249
|
/**
|
|
2241
2250
|
* 取消订阅远端用户的音视频轨道。
|
|
2242
2251
|
* @param uid 远端用户id。
|
|
@@ -2442,8 +2451,9 @@ declare class ServiceManager extends EventEmitter<ChannelEvens> {
|
|
|
2442
2451
|
handleStreamEvent(action: StreamEventAction, payload: StreamEventPlayload): void;
|
|
2443
2452
|
handleGroupEvent(action: GroupEventAction, group: Group | string, extraPayload?: GroupUser | signal_msg.IGroupProperty | string | signal_msg.IGroupAudioInfo): void;
|
|
2444
2453
|
handleUserEvent(action: UserEventAction, payload: User): void;
|
|
2445
|
-
getStream(param:
|
|
2454
|
+
getStream(param: SubscribeParam): signal_msg.IStream;
|
|
2446
2455
|
private handleSubscribeParam;
|
|
2456
|
+
private checkUnsubParam;
|
|
2447
2457
|
join(joinInfo: JoinParam): Promise<ISignal_msg.IJoinResponse>;
|
|
2448
2458
|
private handleJoinResponse;
|
|
2449
2459
|
private setIceConfig;
|
|
@@ -2456,8 +2466,8 @@ declare class ServiceManager extends EventEmitter<ChannelEvens> {
|
|
|
2456
2466
|
publish(tracks: LocalTrack[]): Promise<void>;
|
|
2457
2467
|
unpublish(tracks: LocalTrack[]): Promise<void>;
|
|
2458
2468
|
private getRemoteTrack;
|
|
2459
|
-
batchSubscribe(batchSubscribeParams:
|
|
2460
|
-
batchUnsubscribe(batchUnsubscribeParam:
|
|
2469
|
+
batchSubscribe(batchSubscribeParams: SubscribeParam[]): Promise<SubscribeResult[]>;
|
|
2470
|
+
batchUnsubscribe(batchUnsubscribeParam: SubscribeParam[]): Promise<void> | Promise<IBatchSubscribeResult[]>;
|
|
2461
2471
|
private updateSubscribedAudioStream;
|
|
2462
2472
|
subscribeGroup(groupId: string): Promise<RemoteAudioTrack>;
|
|
2463
2473
|
unsubscribeGroup(groupId: string): Promise<void>;
|
|
@@ -2999,7 +3009,7 @@ type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
|
|
|
2999
3009
|
* @required mediaType 订阅的轨道媒体类型
|
|
3000
3010
|
* @optional auxiliary 如果订阅视频轨道,是否订阅共享视频流
|
|
3001
3011
|
*/
|
|
3002
|
-
interface SubscribeParam {
|
|
3012
|
+
interface SubscribeParam$1 {
|
|
3003
3013
|
uid: string;
|
|
3004
3014
|
mediaType: TrackMediaType;
|
|
3005
3015
|
auxiliary?: boolean;
|
|
@@ -3440,19 +3450,11 @@ interface SenderEncoding {
|
|
|
3440
3450
|
targetHeight?: number;
|
|
3441
3451
|
priority?: string;
|
|
3442
3452
|
}
|
|
3443
|
-
interface
|
|
3444
|
-
uid?: string;
|
|
3445
|
-
groupId?: string;
|
|
3446
|
-
auxiliary?: boolean;
|
|
3447
|
-
mediaType?: TrackMediaType;
|
|
3448
|
-
action?: 'subscribe' | 'unsubscribe';
|
|
3449
|
-
}
|
|
3450
|
-
interface SubscribeActionParam {
|
|
3453
|
+
interface SubscribeParam {
|
|
3451
3454
|
uid?: string;
|
|
3452
3455
|
groupId?: string;
|
|
3453
3456
|
auxiliary?: boolean;
|
|
3454
3457
|
mediaType?: TrackMediaType;
|
|
3455
|
-
action?: 'subscribe' | 'unsubscribe';
|
|
3456
3458
|
}
|
|
3457
3459
|
type TRACK_EVENT_ACTION = 'replace' | 'mute' | 'unmute' | 'stop' | 'republish' | 'optimizationMode' | 'mirror';
|
|
3458
3460
|
interface InnerPlayConfig {
|
|
@@ -3850,4 +3852,4 @@ declare class DingRTC extends EventEmitter<IGlobalEvent> {
|
|
|
3850
3852
|
declare const _default: DingRTC;
|
|
3851
3853
|
|
|
3852
3854
|
export { AudioSourceInfo, AudioSourceState, CameraVideoTrack, DingRTCClient, FALLBACK_SUB_VIDEO_PROFILE, LocalAudioTrack, LocalTrack, LocalVideoTrack, MicrophoneAudioTrack, RemoteAudioTrack, RemoteTrack, User as RemoteUser, RemoteVideoTrack, Track, VideoSourceInfo, _default as default };
|
|
3853
|
-
export type { BufferSourceAudioTrackConfig, CameraVideoTrackConfig, ChannelEvens, ConnectionState, CustomAudioTrackConfig, CustomVideoTrackConfig, DeviceInfo, DisconnectedReason, GlobalClientConfigInfo, Group, GroupAudioRoute, GroupPropertyUpdateTypes, GroupUser, IClientEvents, ICommonExceptionEvent, IGlobalEvent, ISharedChannelInstance, JoinGroupConfig, JoinParam, LeaveGroupConfig, LocalAudioStates, LocalVideoStates, LocalVideoStatesMap, LogLevel, MicrophoneAudioTrackConfig, NetworkQuality, OptimizationMode, RemoteAudioStates, RemoteStreamType, RemoteVideoStates, RemoteVideoStatesMap, ScreenVideoTrackConfig, SubscribeParam, SubscribeResult, TrackMediaType, UnsubscribeParam, VideoDimension, VideoEncoderConfiguration, VideoPlayerConfig };
|
|
3855
|
+
export type { BufferSourceAudioTrackConfig, CameraVideoTrackConfig, ChannelEvens, ConnectionState, CustomAudioTrackConfig, CustomVideoTrackConfig, DeviceInfo, DisconnectedReason, GlobalClientConfigInfo, Group, GroupAudioRoute, GroupPropertyUpdateTypes, GroupUser, IClientEvents, ICommonExceptionEvent, IGlobalEvent, ISharedChannelInstance, JoinGroupConfig, JoinParam, LeaveGroupConfig, LocalAudioStates, LocalVideoStates, LocalVideoStatesMap, LogLevel, MicrophoneAudioTrackConfig, NetworkQuality, OptimizationMode, RemoteAudioStates, RemoteStreamType, RemoteVideoStates, RemoteVideoStatesMap, ScreenVideoTrackConfig, SubscribeParam$1 as SubscribeParam, SubscribeResult, TrackMediaType, UnsubscribeParam, VideoDimension, VideoEncoderConfiguration, VideoPlayerConfig };
|