quickvo-sdk-js 1.4.0 → 1.4.2
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/README.md +33 -0
- package/dist/enums/notifyName.d.ts +3 -1
- package/dist/index.js +20377 -20022
- package/dist/index.umd.cjs +4 -4
- package/dist/protos/compiled.d.ts +2 -7
- package/dist/room/CallsWebSocket.d.ts +0 -3
- package/dist/room/P2P.d.ts +9 -15
- package/dist/room/PeerAnalyzeStats.d.ts +40 -0
- package/dist/room/PrResolves.d.ts +13 -3
- package/dist/room/RoomBase.d.ts +12 -3
- package/dist/room/RoomCalls.d.ts +46 -34
- package/dist/room/RoomMedias.d.ts +1 -1
- package/dist/room/RoomPeer.d.ts +26 -31
- package/dist/room/RoomUsers.d.ts +20 -7
- package/dist/types.d.ts +19 -5
- package/package.json +4 -4
|
@@ -1769,9 +1769,6 @@ export namespace com {
|
|
|
1769
1769
|
|
|
1770
1770
|
/** SubscribeReq session */
|
|
1771
1771
|
session?: (string|null);
|
|
1772
|
-
|
|
1773
|
-
/** SubscribeReq isLastSub */
|
|
1774
|
-
isLastSub?: (boolean|null);
|
|
1775
1772
|
}
|
|
1776
1773
|
|
|
1777
1774
|
/** Represents a SubscribeReq. */
|
|
@@ -1789,9 +1786,6 @@ export namespace com {
|
|
|
1789
1786
|
/** SubscribeReq session. */
|
|
1790
1787
|
public session?: (string|null);
|
|
1791
1788
|
|
|
1792
|
-
/** SubscribeReq isLastSub. */
|
|
1793
|
-
public isLastSub?: (boolean|null);
|
|
1794
|
-
|
|
1795
1789
|
/**
|
|
1796
1790
|
* Creates a new SubscribeReq instance using the specified properties.
|
|
1797
1791
|
* @param [properties] Properties to set
|
|
@@ -5623,7 +5617,8 @@ export namespace com {
|
|
|
5623
5617
|
Success = 0,
|
|
5624
5618
|
Failed = 1,
|
|
5625
5619
|
Ignore = 2,
|
|
5626
|
-
Disconnected = 3
|
|
5620
|
+
Disconnected = 3,
|
|
5621
|
+
LowQuality = 4
|
|
5627
5622
|
}
|
|
5628
5623
|
|
|
5629
5624
|
/** Properties of a ReportP2PReq. */
|
package/dist/room/P2P.d.ts
CHANGED
|
@@ -1,36 +1,26 @@
|
|
|
1
1
|
import { K_mediaType } from '../enums/mediaType';
|
|
2
2
|
import { PrResolves } from './PrResolves';
|
|
3
3
|
import { UserTrack } from '../types';
|
|
4
|
+
import { PeerAnalyzeStats } from './PeerAnalyzeStats';
|
|
4
5
|
export declare class P2P {
|
|
5
|
-
#private;
|
|
6
6
|
prResolves: PrResolves;
|
|
7
7
|
phoneyStreams: Map<K_mediaType, MediaStream>;
|
|
8
8
|
recv_peer_ins: RTCPeerConnection;
|
|
9
9
|
recv_icecandidates: RTCIceCandidate[];
|
|
10
10
|
recv_candidate_collected: boolean;
|
|
11
11
|
recv_transceiverMap: Map<"microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio", RTCRtpTransceiver>;
|
|
12
|
-
|
|
13
|
-
inboundBytes: number;
|
|
14
|
-
outboundBytes: number;
|
|
15
|
-
lostRate: string;
|
|
16
|
-
roundTripTime: string;
|
|
17
|
-
jitter: string;
|
|
18
|
-
};
|
|
12
|
+
recvPeerAnalyzeStatsIns: PeerAnalyzeStats;
|
|
19
13
|
send_peer_ins: RTCPeerConnection;
|
|
20
14
|
send_icecandidates: RTCIceCandidate[];
|
|
21
15
|
send_candidate_collected: boolean;
|
|
22
16
|
send_transceiverMap: Map<"microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio", RTCRtpTransceiver>;
|
|
23
|
-
|
|
24
|
-
inboundBytes: number;
|
|
25
|
-
outboundBytes: number;
|
|
26
|
-
lostRate: string;
|
|
27
|
-
roundTripTime: string;
|
|
28
|
-
jitter: string;
|
|
29
|
-
};
|
|
17
|
+
sendPeerAnalyzeStatsIns: PeerAnalyzeStats;
|
|
30
18
|
tracks: MediaStreamTrack[];
|
|
31
19
|
reports: any[];
|
|
32
20
|
getPeerStatsTimer: number;
|
|
33
21
|
constructor(phoneyStreams: Map<K_mediaType, MediaStream>);
|
|
22
|
+
onSendPeerNetwork: (_e: any) => void;
|
|
23
|
+
onRecvPeerNetwork: (_e: any) => void;
|
|
34
24
|
getPhoneyStreams: (mediaType: K_mediaType) => MediaStream;
|
|
35
25
|
/**
|
|
36
26
|
* sendIceConnected
|
|
@@ -139,6 +129,8 @@ export declare class P2P {
|
|
|
139
129
|
lostRate: string;
|
|
140
130
|
roundTripTime: string;
|
|
141
131
|
jitter: string;
|
|
132
|
+
quality: number;
|
|
133
|
+
averageQuality: number;
|
|
142
134
|
};
|
|
143
135
|
/**
|
|
144
136
|
* getRecvPeerNetwork
|
|
@@ -149,5 +141,7 @@ export declare class P2P {
|
|
|
149
141
|
lostRate: string;
|
|
150
142
|
roundTripTime: string;
|
|
151
143
|
jitter: string;
|
|
144
|
+
quality: number;
|
|
145
|
+
averageQuality: number;
|
|
152
146
|
};
|
|
153
147
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare class PeerAnalyzeStats {
|
|
2
|
+
pc: RTCPeerConnection | undefined;
|
|
3
|
+
network: {
|
|
4
|
+
inboundBytes: number;
|
|
5
|
+
outboundBytes: number;
|
|
6
|
+
lostRate: string;
|
|
7
|
+
roundTripTime: string;
|
|
8
|
+
jitter: string;
|
|
9
|
+
quality: number;
|
|
10
|
+
averageQuality: number;
|
|
11
|
+
};
|
|
12
|
+
reports: any[];
|
|
13
|
+
averageQualitys: number[];
|
|
14
|
+
timer: number;
|
|
15
|
+
constructor();
|
|
16
|
+
onNetwork: (_e: typeof this.network) => void;
|
|
17
|
+
getNetwork: () => {
|
|
18
|
+
inboundBytes: number;
|
|
19
|
+
outboundBytes: number;
|
|
20
|
+
lostRate: string;
|
|
21
|
+
roundTripTime: string;
|
|
22
|
+
jitter: string;
|
|
23
|
+
quality: number;
|
|
24
|
+
averageQuality: number;
|
|
25
|
+
};
|
|
26
|
+
getAverageQuality: () => number;
|
|
27
|
+
/**
|
|
28
|
+
* start
|
|
29
|
+
*/
|
|
30
|
+
start: (pc: RTCPeerConnection) => void;
|
|
31
|
+
analyzeStats: () => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* getReports
|
|
34
|
+
*/
|
|
35
|
+
getReports: (mids?: string[]) => Promise<any[]>;
|
|
36
|
+
/**
|
|
37
|
+
* stop
|
|
38
|
+
*/
|
|
39
|
+
stop: () => void;
|
|
40
|
+
}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
type
|
|
1
|
+
type ResolveInfo = Map<string, {
|
|
2
|
+
resolve: Function;
|
|
3
|
+
timer: number;
|
|
4
|
+
}>;
|
|
2
5
|
export declare class PrResolves {
|
|
3
|
-
resolvesMap: Map<string,
|
|
6
|
+
resolvesMap: Map<string, ResolveInfo>;
|
|
4
7
|
index: number;
|
|
5
8
|
constructor();
|
|
6
|
-
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param eventKey 唯一key
|
|
12
|
+
* @param checkFun 检测函数
|
|
13
|
+
* @param timeout 超时时间 ms
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
add: (eventKey: string, checkFun?: Function, timeout?: number) => Promise<unknown>;
|
|
7
17
|
emit: (eventKey: string) => Promise<void>;
|
|
8
18
|
}
|
|
9
19
|
export {};
|
package/dist/room/RoomBase.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K_roomState } from '../enums/roomState';
|
|
2
|
-
import { QuickOptions, Report_Log_Type, RoomOptions, RoomUser, UserTrack } from '../types';
|
|
2
|
+
import { QuickOptions, Report_Log_Type, RoomOptions, RoomUser, UserTrack, UserTracks } from '../types';
|
|
3
3
|
import { CallsWebSocket, CallsWebSocketOptions } from './CallsWebSocket';
|
|
4
4
|
import { K_mediaType } from '../enums/mediaType';
|
|
5
5
|
import { NetworkQualityTester } from './NetworkQualityTester';
|
|
@@ -13,19 +13,25 @@ type Options = QuickOptions & RoomOptions & CallsWebSocketOptions & {
|
|
|
13
13
|
};
|
|
14
14
|
export declare class RoomBase {
|
|
15
15
|
options: Options;
|
|
16
|
+
sfuPush: number;
|
|
17
|
+
sfuPull: number;
|
|
18
|
+
p2pPush: number;
|
|
19
|
+
p2pPull: number;
|
|
16
20
|
prResolves: PrResolves;
|
|
17
21
|
sdk_service_version: string;
|
|
18
22
|
sdk_session: string;
|
|
19
|
-
prohibitNotify: boolean;
|
|
20
23
|
isEarly: boolean;
|
|
21
24
|
isInRoom: boolean;
|
|
22
25
|
asyncQueue: PrAsyncQueue;
|
|
26
|
+
await_remote_publish_users: UserTracks[];
|
|
23
27
|
roomState: K_roomState;
|
|
24
28
|
iceState: K_iceState;
|
|
25
29
|
createAt: number;
|
|
26
30
|
cwsIns: CallsWebSocket;
|
|
27
31
|
peerIns: RTCPeerConnection;
|
|
32
|
+
sfuOffsetAverageQuality: number;
|
|
28
33
|
transceiverMap: Map<"microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio", RTCRtpTransceiver>;
|
|
34
|
+
transceiverTrackMap: Map<"microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio", UserTrack>;
|
|
29
35
|
sendChannel: RTCDataChannel;
|
|
30
36
|
receiveChannel: RTCDataChannel;
|
|
31
37
|
userMap: Map<string, RoomUser>;
|
|
@@ -41,6 +47,8 @@ export declare class RoomBase {
|
|
|
41
47
|
screenSharing_audio: string;
|
|
42
48
|
};
|
|
43
49
|
constructor(options: QuickOptions);
|
|
50
|
+
hasAsyncTask: (key: string) => boolean;
|
|
51
|
+
createUserUpdateStreams: (mediaTypes?: K_mediaType[]) => any;
|
|
44
52
|
/**
|
|
45
53
|
* reportLogs
|
|
46
54
|
*/
|
|
@@ -78,7 +86,8 @@ export declare class RoomBase {
|
|
|
78
86
|
/**
|
|
79
87
|
* setOptions
|
|
80
88
|
*/
|
|
81
|
-
setOptions: (options: Partial<Options>) =>
|
|
89
|
+
setOptions: (options: Partial<Options>) => Options;
|
|
90
|
+
getOptions: () => Options;
|
|
82
91
|
/**
|
|
83
92
|
* stopStream
|
|
84
93
|
*/
|
package/dist/room/RoomCalls.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K_mediaType } from '../enums/mediaType';
|
|
2
|
-
import { QuickOptions, RoomOptions, RoomUser, Streams } from '../types';
|
|
2
|
+
import { QuickOptions, RoomOptions, RoomUser, Streams, UserMediaTypes } from '../types';
|
|
3
3
|
import { RoomPeer } from './RoomPeer';
|
|
4
4
|
export declare class RoomCalls extends RoomPeer {
|
|
5
5
|
#private;
|
|
@@ -60,38 +60,24 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
60
60
|
* @example quickvo.checkInRoom()
|
|
61
61
|
*/
|
|
62
62
|
checkInRoom: () => Promise<Boolean>;
|
|
63
|
+
/**
|
|
64
|
+
* senderActived
|
|
65
|
+
*/
|
|
66
|
+
senderActived: (timeout: number) => Promise<void>;
|
|
63
67
|
/**
|
|
64
68
|
* 发布流
|
|
65
69
|
* @param mediaTypes MediaType[]
|
|
66
70
|
* @example quickvo.publish(['microphoneCamera_audio', 'microphoneCamera_video'], 3)
|
|
67
|
-
* @returns Promise<
|
|
71
|
+
* @returns Promise<boolean>
|
|
68
72
|
*/
|
|
69
|
-
publish: (mediaTypes: K_mediaType[]) => Promise<
|
|
73
|
+
publish: (mediaTypes: K_mediaType[]) => Promise<boolean>;
|
|
70
74
|
/**
|
|
71
75
|
* stopPublish
|
|
72
76
|
* @param trackNames string[] = []
|
|
73
77
|
* @example quickvo.stopPublish(['microphoneCamera_audio'])
|
|
74
|
-
* @returns Promise<
|
|
75
|
-
*/
|
|
76
|
-
stopPublish: (mediaTypes?: K_mediaType[]) => Promise<unknown>;
|
|
77
|
-
/**
|
|
78
|
-
* subscribe
|
|
79
|
-
* @param trackNames strig[]
|
|
80
|
-
* @param count number
|
|
81
|
-
* @example quickvo.subscribe(['trackName1','trackName2'])
|
|
82
|
-
* @returns Promise<RoomUser[]>
|
|
83
|
-
*/
|
|
84
|
-
subscribe: (trackNames?: string[], count?: number) => Promise<unknown>;
|
|
85
|
-
/**
|
|
86
|
-
* renegotiate
|
|
87
|
-
*/
|
|
88
|
-
renegotiate: () => Promise<unknown>;
|
|
89
|
-
/**
|
|
90
|
-
* stopSubscribe
|
|
91
|
-
* @param trackNames string[] = []
|
|
92
|
-
* @example quickvo.subscribe(['trackName1'])
|
|
78
|
+
* @returns Promise<boolean>
|
|
93
79
|
*/
|
|
94
|
-
|
|
80
|
+
stopPublish: (mediaTypes?: K_mediaType[]) => Promise<boolean>;
|
|
95
81
|
/**
|
|
96
82
|
* inactiveTracks
|
|
97
83
|
* @param mediaTypes MediaType[]
|
|
@@ -99,6 +85,20 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
99
85
|
* @example quickvo.inactiveTracks(['microphoneCamera_audio'], false)
|
|
100
86
|
*/
|
|
101
87
|
inactiveTracks: (mediaTypes: K_mediaType[], enabled: boolean) => Promise<boolean>;
|
|
88
|
+
/**
|
|
89
|
+
* subscribe
|
|
90
|
+
* @param userMediaTypes: UserMediaTypes[] = []
|
|
91
|
+
* @example quickvo.subscribe([{ userId: '123', mediaTypes: ['microphoneCamera_audio', 'microphoneCamera_video'] }])
|
|
92
|
+
* @returns Promise<boolean>
|
|
93
|
+
*/
|
|
94
|
+
subscribe: (userMediaTypes?: UserMediaTypes[]) => Promise<unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* stopSubscribe
|
|
97
|
+
* @param userMediaTypes: UserMediaTypes[] = []
|
|
98
|
+
* @example quickvo.stopSubscribe([{ userId: '123', mediaTypes: ['mediaTypes', 'microphoneCamera_video'] }])
|
|
99
|
+
* @returns Promise<boolean>
|
|
100
|
+
*/
|
|
101
|
+
stopSubscribe: (userMediaTypes?: UserMediaTypes[]) => Promise<boolean>;
|
|
102
102
|
/**
|
|
103
103
|
* setBanBehaviors
|
|
104
104
|
*/
|
|
@@ -107,20 +107,28 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
107
107
|
banBehaviors: { [key in K_mediaType]?: boolean; };
|
|
108
108
|
}>) => Promise<unknown>;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* debugger
|
|
111
|
+
*/
|
|
112
|
+
debugger: () => Promise<import('..').SendMessageRevolve<any>>;
|
|
113
|
+
/**
|
|
114
|
+
* shutdown
|
|
115
|
+
*/
|
|
116
|
+
shutdown: () => Promise<import('..').SendMessageRevolve<any>>;
|
|
117
|
+
/**
|
|
118
|
+
* restoreRoom
|
|
111
119
|
*/
|
|
112
|
-
|
|
120
|
+
restoreRoom: () => Promise<void>;
|
|
113
121
|
/**
|
|
114
|
-
*
|
|
122
|
+
* restoreICE
|
|
115
123
|
*/
|
|
116
|
-
|
|
117
|
-
debugger: () => Promise<any>;
|
|
118
|
-
shutdown: () => Promise<any>;
|
|
124
|
+
restoreICE: () => Promise<void>;
|
|
119
125
|
/**
|
|
120
|
-
*
|
|
126
|
+
* initHeartbeat
|
|
121
127
|
*/
|
|
122
|
-
reconstruct: () => Promise<void>;
|
|
123
128
|
initHeartbeat: () => void;
|
|
129
|
+
/**
|
|
130
|
+
* stopHeartbeat
|
|
131
|
+
*/
|
|
124
132
|
stopHeartbeat: () => void;
|
|
125
133
|
/**
|
|
126
134
|
* setSession
|
|
@@ -146,10 +154,14 @@ export declare class RoomCalls extends RoomPeer {
|
|
|
146
154
|
/**
|
|
147
155
|
* reportP2PConnect
|
|
148
156
|
*/
|
|
149
|
-
reportP2PConnect: (
|
|
157
|
+
reportP2PConnect: (recvUserId: string, sendUserId: string, state: "success" | "fail" | "ignore" | "disconnect" | "poor_network", reason?: string, pushUserIds?: string[], connectedTime?: number) => Promise<import('..').SendMessageRevolve<any>>;
|
|
158
|
+
/**
|
|
159
|
+
* closeSend
|
|
160
|
+
*/
|
|
161
|
+
closeSend: (userIds?: string[], mediaTypes?: K_mediaType[]) => Promise<void>;
|
|
150
162
|
/**
|
|
151
|
-
*
|
|
163
|
+
* closeRecv
|
|
152
164
|
*/
|
|
153
|
-
|
|
165
|
+
closeRecv: (userIds?: string[], mediaTypes?: K_mediaType[]) => Promise<void>;
|
|
154
166
|
};
|
|
155
167
|
}
|
|
@@ -22,7 +22,7 @@ export declare class RoomMedias extends RoomBase {
|
|
|
22
22
|
*/
|
|
23
23
|
emitNotifyUpdateUsersStreams: (notifys: Array<{
|
|
24
24
|
userId: string;
|
|
25
|
-
updateStreams: { [key in K_mediaType]?:
|
|
25
|
+
updateStreams: { [key in K_mediaType]?: string; };
|
|
26
26
|
}>) => Promise<void>;
|
|
27
27
|
/**
|
|
28
28
|
* initUserMediaStreamContext
|
package/dist/room/RoomPeer.d.ts
CHANGED
|
@@ -2,30 +2,27 @@ import { K_callStrategy } from '../enums/callStrategy';
|
|
|
2
2
|
import { K_mediaType } from '../enums/mediaType';
|
|
3
3
|
import { QuickOptions, UserTrack } from '../types';
|
|
4
4
|
import { RoomUsers } from './RoomUsers';
|
|
5
|
+
import { PeerAnalyzeStats } from './PeerAnalyzeStats';
|
|
5
6
|
export declare class RoomPeer extends RoomUsers {
|
|
6
7
|
#private;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
inboundBytes: number;
|
|
11
|
-
outboundBytes: number;
|
|
12
|
-
lostRate: string;
|
|
13
|
-
roundTripTime: string;
|
|
14
|
-
jitter: string;
|
|
15
|
-
};
|
|
8
|
+
peerAnalyzeStatsIns: PeerAnalyzeStats;
|
|
9
|
+
offset_inboundBytes: number;
|
|
10
|
+
offset_outboundBytes: number;
|
|
16
11
|
constructor(options: QuickOptions);
|
|
17
12
|
/**
|
|
18
|
-
*
|
|
13
|
+
* saveBoundBytes
|
|
19
14
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
saveBoundBytes: (type: "superfluous" | "missing") => void;
|
|
16
|
+
getTrafficUse: () => {
|
|
17
|
+
sfuPush: number;
|
|
18
|
+
sfuPull: number;
|
|
19
|
+
p2pPush: number;
|
|
20
|
+
p2pPull: number;
|
|
21
|
+
};
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
23
|
+
* initPeer
|
|
27
24
|
*/
|
|
28
|
-
|
|
25
|
+
initPeer: () => void;
|
|
29
26
|
/**
|
|
30
27
|
* replaceSenderStream
|
|
31
28
|
*/
|
|
@@ -46,10 +43,6 @@ export declare class RoomPeer extends RoomUsers {
|
|
|
46
43
|
* stopSenders
|
|
47
44
|
*/
|
|
48
45
|
stopSenders: (mediaTypes?: K_mediaType[]) => void;
|
|
49
|
-
/**
|
|
50
|
-
* onSubscribeUserTracks
|
|
51
|
-
*/
|
|
52
|
-
onSubscribeUserTracks: (users: any[]) => Promise<unknown>;
|
|
53
46
|
/**
|
|
54
47
|
* iceConnected
|
|
55
48
|
*/
|
|
@@ -57,7 +50,7 @@ export declare class RoomPeer extends RoomUsers {
|
|
|
57
50
|
/**
|
|
58
51
|
* closeUserTracks
|
|
59
52
|
*/
|
|
60
|
-
|
|
53
|
+
stopTransceivers: (mids: string[]) => Promise<void>;
|
|
61
54
|
createOffer: () => Promise<void>;
|
|
62
55
|
createAnswer: () => Promise<void>;
|
|
63
56
|
getSdp: () => string | undefined;
|
|
@@ -75,31 +68,33 @@ export declare class RoomPeer extends RoomUsers {
|
|
|
75
68
|
*/
|
|
76
69
|
setRTCRtpSenderParameters: (parameters: RTCRtpSendParameters) => void;
|
|
77
70
|
/**
|
|
78
|
-
*
|
|
79
|
-
*/
|
|
80
|
-
getReportsByMid: (mids?: string[]) => Promise<any[]>;
|
|
81
|
-
/**
|
|
82
|
-
* getRoomNetwork
|
|
71
|
+
* getPeerNetwork
|
|
83
72
|
*/
|
|
84
|
-
|
|
73
|
+
getPeerNetwork: () => {
|
|
85
74
|
inboundBytes: number;
|
|
86
75
|
outboundBytes: number;
|
|
87
76
|
lostRate: string;
|
|
88
77
|
roundTripTime: string;
|
|
89
78
|
jitter: string;
|
|
79
|
+
quality: number;
|
|
80
|
+
averageQuality: number;
|
|
90
81
|
};
|
|
91
82
|
/**
|
|
92
|
-
*
|
|
83
|
+
* getRoomNetwork
|
|
93
84
|
*/
|
|
94
|
-
|
|
85
|
+
getRoomNetwork: () => {
|
|
95
86
|
inboundBytes: number;
|
|
96
87
|
outboundBytes: number;
|
|
97
88
|
lostRate: string;
|
|
98
89
|
roundTripTime: string;
|
|
99
90
|
jitter: string;
|
|
91
|
+
quality: number;
|
|
92
|
+
averageQuality: number;
|
|
100
93
|
};
|
|
101
94
|
/**
|
|
102
|
-
*
|
|
95
|
+
* getReportsByMid
|
|
103
96
|
*/
|
|
97
|
+
getReportsByMid: (mids?: string[]) => Promise<any[]>;
|
|
98
|
+
startGetPeerStats: () => void;
|
|
104
99
|
stopGetPeerStats: () => void;
|
|
105
100
|
}
|
package/dist/room/RoomUsers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K_mediaType } from '../enums/mediaType';
|
|
2
|
-
import { QuickOptions, RoomUser, UserTrack } from '../types';
|
|
2
|
+
import { QuickOptions, RoomUser, UserMediaTypes, UserTrack, UserTracks } from '../types';
|
|
3
3
|
import { RoomMedias } from './RoomMedias';
|
|
4
4
|
import { P2P } from './P2P';
|
|
5
5
|
export declare class RoomUsers extends RoomMedias {
|
|
@@ -101,9 +101,26 @@ export declare class RoomUsers extends RoomMedias {
|
|
|
101
101
|
*/
|
|
102
102
|
getUserTrackByTrackName: (trackNames: string[]) => Promise<UserTrack[]>;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* getUserTrackByMid
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
getUserTrackByMid: (mid: string) => Promise<UserTrack | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* getUsersMediaTypeBytrackNames
|
|
109
|
+
* @param trackNames string[]
|
|
110
|
+
* @returns [{ userId: '123', mediaTypes: ['mediaTypes', 'microphoneCamera_video'] }]
|
|
111
|
+
*/
|
|
112
|
+
getUsersMediaTypeBytrackNames: (trackNames: string[]) => Promise<{
|
|
113
|
+
userId: string;
|
|
114
|
+
mediaTypes: ("microphoneCamera_audio" | "microphoneCamera_video" | "screenSharing_video" | "screenSharing_audio")[];
|
|
115
|
+
}[]>;
|
|
116
|
+
/**
|
|
117
|
+
* getUserTrackByUserMediaTypes
|
|
118
|
+
*/
|
|
119
|
+
getUserTrackByUserMediaTypes: (usersMediaTypes?: UserMediaTypes[], lastRetry?: boolean) => Promise<UserTracks[]>;
|
|
120
|
+
/**
|
|
121
|
+
* getAllUserMediaTypes
|
|
122
|
+
*/
|
|
123
|
+
getAllUserMediaTypes: () => Promise<UserMediaTypes[]>;
|
|
107
124
|
/**
|
|
108
125
|
* checkUserInRoom
|
|
109
126
|
*/
|
|
@@ -121,10 +138,6 @@ export declare class RoomUsers extends RoomMedias {
|
|
|
121
138
|
* setUserUpdateStreams
|
|
122
139
|
*/
|
|
123
140
|
setUserUpdateStreams: (userId: string, mediaType: K_mediaType, state?: boolean) => Promise<void>;
|
|
124
|
-
/**
|
|
125
|
-
* updateUserChannels
|
|
126
|
-
*/
|
|
127
|
-
updateUserChannels: (userId: string, channels: any[] | undefined, merge: Boolean) => Promise<void>;
|
|
128
141
|
/**
|
|
129
142
|
* updateUsertracks
|
|
130
143
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export interface UserTrack {
|
|
|
87
87
|
/**
|
|
88
88
|
* 媒体类型
|
|
89
89
|
*/
|
|
90
|
-
mediaType
|
|
90
|
+
mediaType: K_mediaType;
|
|
91
91
|
/**
|
|
92
92
|
* 相对媒体音量
|
|
93
93
|
*/
|
|
@@ -105,6 +105,7 @@ export interface UserTrack {
|
|
|
105
105
|
*/
|
|
106
106
|
key: string;
|
|
107
107
|
origin: 'sfu' | 'p2p';
|
|
108
|
+
lastRetry?: boolean;
|
|
108
109
|
}
|
|
109
110
|
/**
|
|
110
111
|
* 数据通道
|
|
@@ -240,10 +241,6 @@ export interface RoomUser {
|
|
|
240
241
|
* 用户轨道
|
|
241
242
|
*/
|
|
242
243
|
tracks: UserTrack[];
|
|
243
|
-
/**
|
|
244
|
-
* 用户数据通道
|
|
245
|
-
*/
|
|
246
|
-
channels: Channel[];
|
|
247
244
|
/**
|
|
248
245
|
* 是否更新了流
|
|
249
246
|
*/
|
|
@@ -291,3 +288,20 @@ export interface UserAudioFilterOptions {
|
|
|
291
288
|
echoCancellation: boolean;
|
|
292
289
|
}
|
|
293
290
|
export type Report_Log_Type = 'ws_c_timeout' | 'webrtc_c_timeout' | 'join_room_error' | 'publish_error' | 'subscribe_error' | 'close_track_error' | 'heartbeat_e_timeout' | 'heartbeat_i_timeout' | 'quit_room_error';
|
|
291
|
+
export interface UserMediaTypes {
|
|
292
|
+
userId: string;
|
|
293
|
+
mediaTypes: K_mediaType[];
|
|
294
|
+
}
|
|
295
|
+
export interface UserTracks {
|
|
296
|
+
id: string;
|
|
297
|
+
tracks: UserTrack[];
|
|
298
|
+
}
|
|
299
|
+
export interface SubscribeRes {
|
|
300
|
+
code: number;
|
|
301
|
+
msg: string;
|
|
302
|
+
expectation_num: number;
|
|
303
|
+
success_num: number;
|
|
304
|
+
success_users: UserTracks[];
|
|
305
|
+
fail_users: UserTracks[];
|
|
306
|
+
retry_users: UserTracks[];
|
|
307
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickvo-sdk-js",
|
|
3
3
|
"description": "提供快捷接入单对单、单对多、群体会议、舞台会议等音视频功能。",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"pr-async-queue": "^0.1.3",
|
|
24
24
|
"pr-audio-stream": "^0.1.1",
|
|
25
25
|
"pr-nat-type": "^0.1.2",
|
|
26
|
-
"pr-tools": "^1.6.
|
|
27
|
-
"pr-ws": "^0.3.
|
|
26
|
+
"pr-tools": "^1.6.1",
|
|
27
|
+
"pr-ws": "^0.3.3",
|
|
28
28
|
"sdp-transform": "^2.15.0",
|
|
29
29
|
"webm-duration-fix": "^1.0.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"protobufjs": "^7.4.0",
|
|
33
33
|
"typescript": "^5.8.2",
|
|
34
|
-
"vite": "^
|
|
34
|
+
"vite": "^7.1.4",
|
|
35
35
|
"vite-plugin-bundle-obfuscator": "^1.6.0",
|
|
36
36
|
"vite-plugin-dts": "^4.5.3"
|
|
37
37
|
},
|