quickvo-sdk-js 1.0.8 → 1.3.0
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 +0 -4
- package/dist/enums/eventName.d.ts +2 -1
- package/dist/index.js +17756 -17641
- package/dist/index.umd.cjs +4 -4
- package/dist/protos/compiled.d.ts +5468 -5009
- package/dist/room/CallsWebSocket.d.ts +3 -5
- package/dist/room/P2P.d.ts +20 -0
- package/dist/room/RoomBase.d.ts +3 -0
- package/dist/room/RoomCalls.d.ts +9 -2
- package/dist/room/RoomPeer.d.ts +1 -0
- package/dist/room/RoomUsers.d.ts +1 -0
- package/dist/types.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PrWebSocket } from 'pr-ws';
|
|
1
2
|
import { Message, Notify, SendMessageRevolve } from '../types';
|
|
2
3
|
import { K_notifyName } from '../enums/notifyName';
|
|
3
4
|
export interface CallsWebSocketOptions {
|
|
@@ -16,18 +17,15 @@ export interface CallsWebSocketOptions {
|
|
|
16
17
|
}
|
|
17
18
|
export declare class CallsWebSocket {
|
|
18
19
|
#private;
|
|
20
|
+
prws: PrWebSocket;
|
|
19
21
|
state: 'connecting' | 'connected' | 'closed';
|
|
20
22
|
constructor(_options?: CallsWebSocketOptions);
|
|
21
|
-
sendMessageBefore: () => Promise<void>;
|
|
22
|
-
onReconnectSuccess: (_e: any) => void;
|
|
23
|
-
onReconnectStop: (_e: any) => void;
|
|
24
23
|
clearEvents: (sns?: string[]) => void;
|
|
25
24
|
/**
|
|
26
25
|
* 连接
|
|
27
|
-
* @param session
|
|
28
26
|
* @returns
|
|
29
27
|
*/
|
|
30
|
-
connect: (
|
|
28
|
+
connect: () => Promise<unknown>;
|
|
31
29
|
/**
|
|
32
30
|
* 关闭
|
|
33
31
|
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class P2P {
|
|
2
|
+
peerIns: RTCPeerConnection;
|
|
3
|
+
constructor();
|
|
4
|
+
/**
|
|
5
|
+
* initOffer
|
|
6
|
+
*/
|
|
7
|
+
initOffer: () => Promise<unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* initAnswer
|
|
10
|
+
*/
|
|
11
|
+
initAnswer: (offer: RTCSessionDescriptionInit, offer_candidates: RTCIceCandidateInit[]) => Promise<unknown>;
|
|
12
|
+
/**
|
|
13
|
+
* setAnswer
|
|
14
|
+
*/
|
|
15
|
+
setAnswer: (answer: RTCSessionDescriptionInit, answer_candidates: RTCIceCandidateInit[]) => Promise<unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* close
|
|
18
|
+
*/
|
|
19
|
+
close: () => void;
|
|
20
|
+
}
|
package/dist/room/RoomBase.d.ts
CHANGED
|
@@ -5,12 +5,14 @@ import { K_mediaType } from '../enums/mediaType';
|
|
|
5
5
|
import { NetworkQualityTester } from './NetworkQualityTester';
|
|
6
6
|
import { StreamRecorder } from './StreamRecorder';
|
|
7
7
|
import { PrAsyncQueue } from 'pr-async-queue';
|
|
8
|
+
import { P2P } from './P2P';
|
|
8
9
|
type Options = QuickOptions & RoomOptions & CallsWebSocketOptions & {
|
|
9
10
|
earlyId?: string;
|
|
10
11
|
};
|
|
11
12
|
export declare class RoomBase {
|
|
12
13
|
options: Options;
|
|
13
14
|
sdk_service_version: string;
|
|
15
|
+
sdk_session: string;
|
|
14
16
|
prohibitNotify: boolean;
|
|
15
17
|
isEarly: boolean;
|
|
16
18
|
isInRoom: boolean;
|
|
@@ -23,6 +25,7 @@ export declare class RoomBase {
|
|
|
23
25
|
sendChannel: RTCDataChannel;
|
|
24
26
|
receiveChannel: RTCDataChannel;
|
|
25
27
|
userMap: Map<string, RoomUser>;
|
|
28
|
+
p2pMap: Map<string, P2P>;
|
|
26
29
|
setLocalStreamActiveMap: Map<K_mediaType, Boolean>;
|
|
27
30
|
phoneyStreams: Map<K_mediaType, MediaStream>;
|
|
28
31
|
recorder: StreamRecorder;
|
package/dist/room/RoomCalls.d.ts
CHANGED
|
@@ -25,13 +25,12 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
25
25
|
* @param deviceId string
|
|
26
26
|
*/
|
|
27
27
|
changeScreenSharing: (mediaTypes: ("screenSharing_video" | "screenSharing_audio")[]) => Promise<void>;
|
|
28
|
-
createSession: () => Promise<unknown>;
|
|
29
28
|
/**
|
|
30
29
|
* earlyConnect
|
|
31
30
|
* @param mediaTypes MediaType[]
|
|
32
31
|
* @example quickvo.earlyConnect(['microphoneCamera_audio', 'microphoneCamera_video'])
|
|
33
32
|
*/
|
|
34
|
-
earlyConnect: (mediaTypes?: K_mediaType[]) => Promise<
|
|
33
|
+
earlyConnect: (mediaTypes?: K_mediaType[]) => Promise<unknown>;
|
|
35
34
|
/**
|
|
36
35
|
* joinRoom
|
|
37
36
|
* @param roomOptions RoomOptions
|
|
@@ -117,6 +116,14 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
117
116
|
subChannel: (userChannels?: any[]) => Promise<Boolean>;
|
|
118
117
|
debugger: () => Promise<any>;
|
|
119
118
|
shutdown: () => Promise<any>;
|
|
119
|
+
/**
|
|
120
|
+
* reconstruct
|
|
121
|
+
*/
|
|
122
|
+
reconstruct: () => Promise<void>;
|
|
120
123
|
initHeartbeat: () => void;
|
|
121
124
|
stopHeartbeat: () => void;
|
|
125
|
+
/**
|
|
126
|
+
* setSession
|
|
127
|
+
*/
|
|
128
|
+
setSession: () => void;
|
|
122
129
|
}
|
package/dist/room/RoomPeer.d.ts
CHANGED
package/dist/room/RoomUsers.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export interface SendMessageRevolve<T = any> {
|
|
|
35
35
|
code: number;
|
|
36
36
|
data: T;
|
|
37
37
|
desc: string;
|
|
38
|
+
sn?: string;
|
|
38
39
|
}
|
|
39
40
|
export interface Message extends protos.com.quick.voice.proto.ICommonReq {
|
|
40
41
|
/**
|
|
@@ -99,6 +100,10 @@ export interface UserTrack {
|
|
|
99
100
|
* 当前轨道的具体设置参数
|
|
100
101
|
*/
|
|
101
102
|
settings?: MediaTrackSettings;
|
|
103
|
+
/**
|
|
104
|
+
* 唯一key 每次轨道变化均会改变
|
|
105
|
+
*/
|
|
106
|
+
key: string;
|
|
102
107
|
}
|
|
103
108
|
/**
|
|
104
109
|
* 数据通道
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickvo-sdk-js",
|
|
3
3
|
"description": "提供快捷接入单对单、单对多、群体会议、舞台会议等音视频功能。",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"pako": "^2.1.0",
|
|
23
|
-
"pr-async-queue": "^0.1.
|
|
23
|
+
"pr-async-queue": "^0.1.3",
|
|
24
24
|
"pr-audio-stream": "^0.1.1",
|
|
25
25
|
"pr-tools": "^1.5.7",
|
|
26
|
-
"pr-ws": "^0.2
|
|
26
|
+
"pr-ws": "^0.3.2",
|
|
27
27
|
"sdp-transform": "^2.15.0",
|
|
28
28
|
"webm-duration-fix": "^1.0.4"
|
|
29
29
|
},
|