quickvo-sdk-js 0.5.8 → 0.5.9
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/QuickVO.d.ts +7 -1
- package/dist/index.js +262 -216
- package/dist/index.umd.cjs +2 -2
- package/dist/room/RoomBase.d.ts +9 -2
- package/dist/room/RoomCalls.d.ts +11 -29
- package/dist/room/RoomUsers.d.ts +2 -2
- package/dist/room/mediaStreams/AudioMediaContext.d.ts +8 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/room/RoomBase.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { K_roomState } from '../enums/roomState';
|
|
2
|
-
import { QuickOptions, RoomOptions, RoomUser, UserTrack } from '../types';
|
|
2
|
+
import { QuickOptions, Report_Log_Type, RoomOptions, RoomUser, UserTrack } from '../types';
|
|
3
3
|
import { CallsWebSocket, CallsWebSocketOptions } from './CallsWebSocket';
|
|
4
4
|
import { K_mediaType } from '../enums/mediaType';
|
|
5
5
|
import { PrTaskQueue } from 'pr-task-queue';
|
|
6
|
-
type Options = QuickOptions & RoomOptions & CallsWebSocketOptions
|
|
6
|
+
type Options = QuickOptions & RoomOptions & CallsWebSocketOptions & {
|
|
7
|
+
earlyId?: string;
|
|
8
|
+
};
|
|
7
9
|
export declare class RoomBase {
|
|
8
10
|
#private;
|
|
9
11
|
options: Options;
|
|
@@ -25,6 +27,10 @@ export declare class RoomBase {
|
|
|
25
27
|
screenSharing_audio: string;
|
|
26
28
|
};
|
|
27
29
|
constructor(options: QuickOptions);
|
|
30
|
+
/**
|
|
31
|
+
* 提交日志
|
|
32
|
+
*/
|
|
33
|
+
reportLogs: (type: Report_Log_Type, describe?: string) => void;
|
|
28
34
|
/**
|
|
29
35
|
* 获取房间信息
|
|
30
36
|
*/
|
|
@@ -41,6 +47,7 @@ export declare class RoomBase {
|
|
|
41
47
|
callType: number;
|
|
42
48
|
newPublishAutoSubscribe?: boolean;
|
|
43
49
|
timeout?: number;
|
|
50
|
+
earlyId?: string;
|
|
44
51
|
};
|
|
45
52
|
/**
|
|
46
53
|
* 设置房间状态
|
package/dist/room/RoomCalls.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { K_mediaType } from '../enums/mediaType';
|
|
2
|
-
import {
|
|
2
|
+
import { QuickOptions, RoomOptions, RoomUser, Streams } from '../types';
|
|
3
3
|
import { RoomPeer } from './RoomPeer';
|
|
4
4
|
export declare class RoomCalls extends RoomPeer {
|
|
5
5
|
#private;
|
|
6
6
|
sdk_service_version: string;
|
|
7
7
|
constructor(options: QuickOptions);
|
|
8
|
+
/**
|
|
9
|
+
* 预连接
|
|
10
|
+
* @param mediaTypes MediaType[]
|
|
11
|
+
* @example quickvo.earlyConnect(['microphoneCamera_audio', 'microphoneCamera_video'])
|
|
12
|
+
*/
|
|
13
|
+
earlyConnect: (mediaTypes?: K_mediaType[]) => void;
|
|
8
14
|
/**
|
|
9
15
|
* 设置本地流
|
|
10
16
|
* @param mediaType MediaType
|
|
@@ -26,12 +32,6 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
26
32
|
* @param deviceId 设备ID
|
|
27
33
|
*/
|
|
28
34
|
changeScreenSharing: (mediaTypes: ("screenSharing_video" | "screenSharing_audio")[]) => Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* 添加广播事件
|
|
31
|
-
* @param notify Notify
|
|
32
|
-
* @returns sn
|
|
33
|
-
*/
|
|
34
|
-
addNotify: (notify: Notify) => string;
|
|
35
35
|
/**
|
|
36
36
|
* 加入房间
|
|
37
37
|
* @param roomOptions RoomOptions
|
|
@@ -78,6 +78,10 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
78
78
|
* @returns Promise<RoomUser[]>
|
|
79
79
|
*/
|
|
80
80
|
subscribe: (trackNames?: string[], count?: number) => Promise<RoomUser[]>;
|
|
81
|
+
/**
|
|
82
|
+
* 协商流
|
|
83
|
+
*/
|
|
84
|
+
renegotiate: () => Promise<unknown>;
|
|
81
85
|
/**
|
|
82
86
|
* 停止订阅流
|
|
83
87
|
* @param trackNames string[] = []
|
|
@@ -95,26 +99,4 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
95
99
|
* 远端调试
|
|
96
100
|
*/
|
|
97
101
|
debugger: () => Promise<any>;
|
|
98
|
-
/**
|
|
99
|
-
* 协商流
|
|
100
|
-
*/
|
|
101
|
-
renegotiate: () => Promise<unknown>;
|
|
102
|
-
/**
|
|
103
|
-
* 创建连接
|
|
104
|
-
*/
|
|
105
|
-
createWs: () => Promise<unknown>;
|
|
106
|
-
/**
|
|
107
|
-
* 创建cf会话
|
|
108
|
-
*/
|
|
109
|
-
createSession: () => Promise<unknown> | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* 创建媒体轨道
|
|
112
|
-
*/
|
|
113
|
-
createTrack: (mediaTypes: K_mediaType[]) => Promise<unknown>;
|
|
114
|
-
/**
|
|
115
|
-
* 预连接
|
|
116
|
-
* @param mediaTypes MediaType[]
|
|
117
|
-
* @example quickvo.earlyConnect(['microphoneCamera_audio', 'microphoneCamera_video'])
|
|
118
|
-
*/
|
|
119
|
-
earlyConnect: (mediaTypes?: K_mediaType[]) => void;
|
|
120
102
|
}
|
package/dist/room/RoomUsers.d.ts
CHANGED
|
@@ -19,14 +19,14 @@ export declare class RoomUsers extends RoomMedias {
|
|
|
19
19
|
* 设置增强音量
|
|
20
20
|
* @param userId
|
|
21
21
|
* @param mediaType
|
|
22
|
-
* @param gain
|
|
22
|
+
* @param gain 0-100
|
|
23
23
|
*/
|
|
24
24
|
setEnhanceGain: (userId: string, mediaType: K_mediaType, gain: number) => Promise<void>;
|
|
25
25
|
/**
|
|
26
26
|
* 设置音量
|
|
27
27
|
* @param userId
|
|
28
28
|
* @param mediaType
|
|
29
|
-
* @param gain
|
|
29
|
+
* @param gain 0-1
|
|
30
30
|
*/
|
|
31
31
|
setVolume: (userId: string, mediaType: K_mediaType, gain: number) => void;
|
|
32
32
|
/**
|
|
@@ -7,9 +7,12 @@ export declare class AudioMediaContext {
|
|
|
7
7
|
options: UserAudioFilterOptions;
|
|
8
8
|
kind: "audio";
|
|
9
9
|
stream: MediaStream;
|
|
10
|
+
gain: number;
|
|
11
|
+
enhanceGain: number;
|
|
10
12
|
audio: HTMLAudioElement;
|
|
11
13
|
audioContext: AudioContext;
|
|
12
14
|
mediaStreamAudioSourceNode: MediaStreamAudioSourceNode;
|
|
15
|
+
destination: MediaStreamAudioDestinationNode;
|
|
13
16
|
autoGainNode: GainNode;
|
|
14
17
|
biquadFilterNode: BiquadFilterNode;
|
|
15
18
|
delayNode: DelayNode;
|
|
@@ -33,12 +36,16 @@ export declare class AudioMediaContext {
|
|
|
33
36
|
* 静音
|
|
34
37
|
*/
|
|
35
38
|
setMute: (state?: boolean) => void;
|
|
39
|
+
/**
|
|
40
|
+
* 设置音量
|
|
41
|
+
*/
|
|
42
|
+
setGain: () => void;
|
|
36
43
|
/**
|
|
37
44
|
* 设置增强音量
|
|
38
45
|
*/
|
|
39
46
|
setEnhanceGain: (gain: number) => Promise<void>;
|
|
40
47
|
/**
|
|
41
|
-
*
|
|
48
|
+
* 设置基础音量
|
|
42
49
|
*/
|
|
43
50
|
setVolumeGain: (gain: number) => void;
|
|
44
51
|
/**
|
package/dist/types.d.ts
CHANGED
|
@@ -237,3 +237,4 @@ export interface RoomOptions {
|
|
|
237
237
|
*/
|
|
238
238
|
newPublishAutoSubscribe?: boolean;
|
|
239
239
|
}
|
|
240
|
+
export type Report_Log_Type = 'ws_c_timeout' | 'webrtc_c_timeout' | 'webrtc_c_error' | 'join_room_error' | 'publish_error' | 'subscribe_error' | 'close_track_error' | 'heartbeat_e_timeout' | 'heartbeat_i_timeout' | 'quit_room_error';
|