quickvo-sdk-js 1.6.72 → 1.6.73
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/chunk-BXUcB7os.js +58 -0
- package/dist/index.js +16592 -17151
- package/dist/index.umd.cjs +4 -4
- package/dist/lib-9TnBQie8.js +11083 -0
- package/dist/src/action/ActionSFU.d.ts +7 -31
- package/dist/src/action/Task.d.ts +3 -27
- package/dist/src/base/Base.d.ts +1 -1
- package/dist/src/base/modules/Notifys.d.ts +15 -5
- package/dist/src/base/modules/Peer.d.ts +12 -8
- package/dist/src/base/modules/cws/CallsWebSocket.d.ts +34 -22
- package/dist/src/base/modules/cws/CallsWebSocketEvent.d.ts +7 -8
- package/dist/src/base/modules/cws/PrWebSocket.d.ts +2 -0
- package/dist/src/base/modules/users/Users.d.ts +3 -3
- package/dist/src/base/modules/users/modules/RemoteUser.d.ts +1 -1
- package/dist/src/base/modules/users/modules/RemoteUserP2P.d.ts +3 -5
- package/dist/src/base/modules/users/modules/UserBase.d.ts +14 -2
- package/dist/src/base/modules/webmDurationFixWorkerMain.d.ts +2 -0
- package/dist/src/enums/eventName.d.ts +4 -4
- package/dist/src/enums/mediaType.d.ts +1 -1
- package/dist/src/enums/notifyName.d.ts +2 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/protos/gen/{modules/BaseData_pb.d.ts → BaseData_pb.d.ts} +2 -2
- package/dist/src/protos/gen/{modules/Room_pb.d.ts → Room_pb.d.ts} +16 -22
- package/dist/src/protos/gen/{modules/Rtc_pb.d.ts → Rtc_pb.d.ts} +20 -4
- package/dist/src/protos/index.d.ts +3 -4
- package/dist/src/protos/protoEvent.d.ts +72 -150
- package/dist/src/tools.d.ts +1 -1
- package/dist/src/types.d.ts +0 -12
- package/dist/src/workers/protos/WorkerCore.d.ts +8 -0
- package/dist/src/workers/protos/index.d.ts +10 -0
- package/dist/src/workers/protos/types.d.ts +8 -0
- package/package.json +6 -5
- package/dist/chunk-763Ozoio.js +0 -57
- package/dist/index.d.ts +0 -2
- package/dist/lib-BMLdj_6t.js +0 -11058
- package/dist/src/QuickVO.d.ts +0 -85
- package/dist/src/base/modules/cws/quickvoCodecWorkerMain.d.ts +0 -6
- package/dist/src/base/modules/notifyPayloadMap.d.ts +0 -119
- package/dist/src/protos/protoCodec.d.ts +0 -19
- package/dist/src/workers/cwsCodec/CwsCodecCore.d.ts +0 -7
- package/dist/src/workers/cwsCodec/CwsCodecWorker.d.ts +0 -15
- package/dist/src/workers/cwsCodec/type.d.ts +0 -33
- /package/dist/src/workers/{cwsCodec/cwsCodec.worker.d.ts → protos/protos.worker.d.ts} +0 -0
|
@@ -2,9 +2,9 @@ import { GenEnum, GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
|
2
2
|
import { TrackType } from './Room_pb';
|
|
3
3
|
import { Message } from '@bufbuild/protobuf';
|
|
4
4
|
/**
|
|
5
|
-
* Describes the file
|
|
5
|
+
* Describes the file Rtc.proto.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const file_Rtc: GenFile;
|
|
8
8
|
/**
|
|
9
9
|
* @generated from message com.quick.voice.proto.RtcTrack
|
|
10
10
|
*/
|
|
@@ -22,8 +22,6 @@ export type RtcTrack = Message<"com.quick.voice.proto.RtcTrack"> & {
|
|
|
22
22
|
*/
|
|
23
23
|
trackName: string;
|
|
24
24
|
/**
|
|
25
|
-
* 与 Room.proto `TrackType` 共用,避免同 package 下重复枚举符号(C++ 作用域规则)
|
|
26
|
-
*
|
|
27
25
|
* @generated from field: com.quick.voice.proto.TrackType type = 4;
|
|
28
26
|
*/
|
|
29
27
|
type: TrackType;
|
|
@@ -119,6 +117,24 @@ export type TrackStatsData = Message<"com.quick.voice.proto.TrackStatsData"> & {
|
|
|
119
117
|
* Use `create(TrackStatsDataSchema)` to create a new message.
|
|
120
118
|
*/
|
|
121
119
|
export declare const TrackStatsDataSchema: GenMessage<TrackStatsData>;
|
|
120
|
+
/**
|
|
121
|
+
* @generated from message com.quick.voice.proto.RtcStatsNotify
|
|
122
|
+
*/
|
|
123
|
+
export type RtcStatsNotify = Message<"com.quick.voice.proto.RtcStatsNotify"> & {
|
|
124
|
+
/**
|
|
125
|
+
* @generated from field: string roomId = 1;
|
|
126
|
+
*/
|
|
127
|
+
roomId: string;
|
|
128
|
+
/**
|
|
129
|
+
* @generated from field: repeated com.quick.voice.proto.RtcStatsData stats = 2;
|
|
130
|
+
*/
|
|
131
|
+
stats: RtcStatsData[];
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Describes the message com.quick.voice.proto.RtcStatsNotify.
|
|
135
|
+
* Use `create(RtcStatsNotifySchema)` to create a new message.
|
|
136
|
+
*/
|
|
137
|
+
export declare const RtcStatsNotifySchema: GenMessage<RtcStatsNotify>;
|
|
122
138
|
/**
|
|
123
139
|
* @generated from enum com.quick.voice.proto.RtcEvent
|
|
124
140
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './gen/
|
|
2
|
-
export * from './gen/
|
|
3
|
-
export * from './gen/
|
|
4
|
-
export * from './protoCodec';
|
|
1
|
+
export * from './gen/BaseData_pb';
|
|
2
|
+
export * from './gen/Room_pb';
|
|
3
|
+
export * from './gen/Rtc_pb';
|
|
@@ -1,24 +1,58 @@
|
|
|
1
1
|
import { MessageInitShape } from '@bufbuild/protobuf';
|
|
2
|
-
import { K_eventName } from '../enums
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { K_eventName, K_notifyName } from '../enums';
|
|
3
|
+
import * as Room from './gen/Room_pb';
|
|
4
|
+
import * as Rtc from './gen/Rtc_pb';
|
|
5
|
+
type SendMessageDataMap = {
|
|
6
|
+
heartbeat: MessageInitShape<typeof Room.ReportTrafficUsageSchema>;
|
|
7
|
+
heartbeatEx: MessageInitShape<typeof Room.ReportTrafficUsageSchema>;
|
|
8
|
+
ackMsg: MessageInitShape<typeof Room.AckMsgReqSchema>;
|
|
9
|
+
reportNetwork: MessageInitShape<typeof Room.ReportNetInfoSchema>;
|
|
10
|
+
connectCF: MessageInitShape<typeof Room.ConnectCFReqSchema>;
|
|
11
|
+
genTurnAddress: MessageInitShape<typeof Room.TurnUrlsResponseSchema>;
|
|
12
|
+
publish: MessageInitShape<typeof Room.PublishReqSchema>;
|
|
13
|
+
joinRoom: MessageInitShape<typeof Room.JoinReqSchema>;
|
|
14
|
+
joinRoomEx: MessageInitShape<typeof Room.JoinReqSchema>;
|
|
15
|
+
pubNotify: MessageInitShape<typeof Room.PublishNotifySchema>;
|
|
16
|
+
subscribe: MessageInitShape<typeof Room.SubscribeReqSchema>;
|
|
17
|
+
pubChannel: MessageInitShape<typeof Room.ChannelPublishReqSchema>;
|
|
18
|
+
closeChannel: MessageInitShape<typeof Room.ChannelSubscribeReqSchema>;
|
|
19
|
+
subChannel: MessageInitShape<typeof Room.ChannelSubscribeReqSchema>;
|
|
20
|
+
renegotiate: MessageInitShape<typeof Room.RenegotiateReqSchema>;
|
|
21
|
+
closeTrack: MessageInitShape<typeof Room.CloseTrackReqSchema>;
|
|
22
|
+
preventUsersBehavior: MessageInitShape<typeof Room.PreventUsersBehaviorReqSchema>;
|
|
23
|
+
networkQualityChange: MessageInitShape<typeof Room.NetQualityChangeSchema>;
|
|
24
|
+
updateCall: MessageInitShape<typeof Room.UpdateCallSchema>;
|
|
25
|
+
toggleRoomSpeechLang: MessageInitShape<typeof Room.AiLangSettingSchema>;
|
|
26
|
+
syncRoomInfo: MessageInitShape<typeof Room.SyncRoomInfoReqSchema>;
|
|
27
|
+
updateSimulcast: MessageInitShape<typeof Room.SubscribeReqSchema>;
|
|
28
|
+
updateRoomToken: MessageInitShape<typeof Room.UpdateTokenReqSchema>;
|
|
29
|
+
offer: MessageInitShape<typeof Room.SdpConsultSchema>;
|
|
30
|
+
answer: MessageInitShape<typeof Room.SdpConsultSchema>;
|
|
31
|
+
candidate: MessageInitShape<typeof Room.CandidatesSchema>;
|
|
32
|
+
reportP2PConnectEx: MessageInitShape<typeof Room.ReportP2PExReqSchema>;
|
|
33
|
+
quitRoom: MessageInitShape<typeof Room.QuitReqSchema>;
|
|
34
|
+
quitRoomEx: MessageInitShape<typeof Room.QuitReqSchema>;
|
|
35
|
+
debugger: Record<string, never>;
|
|
36
|
+
ai: Record<string, never>;
|
|
37
|
+
UpdateTrackActive: MessageInitShape<typeof Rtc.UpdateTrackStateSchema>;
|
|
38
|
+
RtcStats: MessageInitShape<typeof Rtc.RtcStatsDataSchema>;
|
|
39
|
+
rtcStats: MessageInitShape<typeof Rtc.RtcStatsDataSchema>;
|
|
40
|
+
};
|
|
41
|
+
type EventDataReqs = {
|
|
42
|
+
[K in K_eventName]: K extends keyof SendMessageDataMap ? SendMessageDataMap[K] : unknown;
|
|
43
|
+
};
|
|
44
|
+
type OnMessageDataMap = {
|
|
11
45
|
connectCF: Room.ConnectCFRsp;
|
|
12
46
|
genTurnAddress: Room.TurnUrlsResponse;
|
|
13
47
|
publish: Room.PublishRsp;
|
|
14
48
|
pubChannel: Room.ChannelPublishRsq;
|
|
49
|
+
closeChannel: Room.ChannelSubscribeRsq;
|
|
15
50
|
subChannel: Room.ChannelSubscribeRsq;
|
|
16
51
|
joinRoom: Room.JoinRsp;
|
|
17
52
|
joinRoomEx: Room.JoinRsp;
|
|
18
53
|
subscribe: Room.SubscribeRsp;
|
|
19
54
|
closeTrack: Room.CloseTrackRsp;
|
|
20
55
|
syncRoomInfo: Room.SyncRoomInfoRsp;
|
|
21
|
-
/** 负载与 JoinNotify 同构(roomId + user);服务端 event 为 onDataChannelPublish */
|
|
22
56
|
onDataChannelPublish: Room.UserChannel;
|
|
23
57
|
onJoinRoom: Room.JoinNotify;
|
|
24
58
|
onJoinRoomBatch: Room.JoinBatchNotify;
|
|
@@ -42,100 +76,22 @@ export type OnMessageDataMap = {
|
|
|
42
76
|
onQuitRoom: Room.QuitNotify;
|
|
43
77
|
onQuitRoomBatch: Room.QuitBatchNotify;
|
|
44
78
|
onDestroyRoom: Room.QuitNotify;
|
|
45
|
-
/** JSON.parse,结构由服务端约定 */
|
|
46
79
|
debugger: unknown;
|
|
47
80
|
ai: unknown;
|
|
48
81
|
UpdateTrackActive: Rtc.UpdateTrackState;
|
|
49
82
|
RtcStatsData: Rtc.RtcStatsData;
|
|
83
|
+
rtcStatsData: Rtc.RtcStatsData;
|
|
84
|
+
onRtcStats: Rtc.RtcStatsNotify;
|
|
50
85
|
};
|
|
51
|
-
|
|
52
|
-
* 请求事件对应的响应 data(与 onMessageFormat 中可解析的 event 对齐;未单独解析的为 unknown)
|
|
53
|
-
*/
|
|
54
|
-
export type EventDataRsp = {
|
|
86
|
+
type EventDataRsps = {
|
|
55
87
|
[K in K_eventName]: K extends keyof OnMessageDataMap ? OnMessageDataMap[K] : unknown;
|
|
56
88
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/** 广播通知:与 cws 内 filterKeys(result, ['code','data','desc']) 一致;data 为联合类型,可按 event 自行收窄 */
|
|
60
|
-
export type CwsNotifyPayloadUnion = {
|
|
61
|
-
code: number;
|
|
62
|
-
desc: string;
|
|
63
|
-
data: OnMessageDataUnion | undefined;
|
|
89
|
+
type EventDataNotifys = {
|
|
90
|
+
[K in K_notifyName]: K extends keyof OnMessageDataMap ? OnMessageDataMap[K] : unknown;
|
|
64
91
|
};
|
|
65
|
-
|
|
66
|
-
export type CwsNotifyPayloadFor<K extends K_notifyName> = {
|
|
92
|
+
export interface MessageNotifys<T extends K_notifyName> {
|
|
67
93
|
code: number;
|
|
68
94
|
desc: string;
|
|
69
|
-
data: K extends keyof OnMessageDataMap ? OnMessageDataMap[K] : undefined;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* cws 广播回调:按事件名推断 payload,例如 `on.onJoinRoom = (e) => e.data` 中 `data` 为 `JoinNotify`
|
|
73
|
-
*/
|
|
74
|
-
export type CallsWebSocketOn = {
|
|
75
|
-
[K in K_notifyName]?: (payload: CwsNotifyPayloadFor<K>) => void;
|
|
76
|
-
} & {
|
|
77
|
-
state?: (state: 'connecting' | 'reconnecting' | 'connected' | 'closed') => void;
|
|
78
|
-
log?: (e: unknown) => void;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* 仅用于类型推断:传入部分 on 回调,获得与事件名对齐的 payload 类型(无需写 `as`)
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* const handlers = defineCwsOn({
|
|
85
|
-
* onJoinRoom: (e) => e.data.roomId,
|
|
86
|
-
* onPublish: (e) => e.data.user,
|
|
87
|
-
* })
|
|
88
|
-
* cws.on = { ...cws.on, ...handlers }
|
|
89
|
-
* ```
|
|
90
|
-
*/
|
|
91
|
-
export declare function defineCwsOn<const T extends Partial<CallsWebSocketOn>>(handlers: T): T;
|
|
92
|
-
/** 解析后 data 为业务消息体,不再与 CommonRsp 的 bytes data 共用字段 */
|
|
93
|
-
export type OnMessageFormatResult<E extends string = string> = Omit<CommonRspDecoded, 'data'> & {
|
|
94
|
-
timeStr: string;
|
|
95
|
-
data_remote: Uint8Array;
|
|
96
|
-
data: E extends keyof OnMessageDataMap ? OnMessageDataMap[E] : undefined;
|
|
97
|
-
remoteTime: number;
|
|
98
|
-
remoteTimeStr: string;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* 各 event 的 send({ data }) 类型:与对应 Req 的 MessageInitShape 一致;sendMessageFormat 内 enc(schema, create(...))
|
|
102
|
-
*/
|
|
103
|
-
export type EventDataReqs = {
|
|
104
|
-
heartbeat: MessageInitShape<typeof Room.ReportTrafficUsageSchema>;
|
|
105
|
-
/** 慢心跳可无字段 */
|
|
106
|
-
heartbeatEx: MessageInitShape<typeof Room.ReportTrafficUsageSchema>;
|
|
107
|
-
ackMsg: MessageInitShape<typeof Room.AckMsgReqSchema>;
|
|
108
|
-
reportNetwork: MessageInitShape<typeof Room.ReportNetInfoSchema>;
|
|
109
|
-
connectCF: MessageInitShape<typeof Room.ConnectCFReqSchema>;
|
|
110
|
-
genTurnAddress: MessageInitShape<typeof Room.TurnUrlsResponseSchema>;
|
|
111
|
-
publish: MessageInitShape<typeof Room.PublishReqSchema>;
|
|
112
|
-
joinRoom: MessageInitShape<typeof Room.JoinReqSchema>;
|
|
113
|
-
joinRoomEx: MessageInitShape<typeof Room.JoinReqSchema>;
|
|
114
|
-
pubNotify: MessageInitShape<typeof Room.PublishNotifySchema>;
|
|
115
|
-
subscribe: MessageInitShape<typeof Room.SubscribeReqSchema>;
|
|
116
|
-
pubChannel: MessageInitShape<typeof Room.ChannelPublishReqSchema>;
|
|
117
|
-
subChannel: MessageInitShape<typeof Room.ChannelSubscribeReqSchema>;
|
|
118
|
-
renegotiate: MessageInitShape<typeof Room.RenegotiateReqSchema>;
|
|
119
|
-
closeTrack: MessageInitShape<typeof Room.CloseTrackReqSchema>;
|
|
120
|
-
preventUsersBehavior: MessageInitShape<typeof Room.PreventUsersBehaviorReqSchema>;
|
|
121
|
-
networkQualityChange: MessageInitShape<typeof Room.NetQualityChangeSchema>;
|
|
122
|
-
updateCall: MessageInitShape<typeof Room.UpdateCallSchema>;
|
|
123
|
-
toggleRoomSpeechLang: MessageInitShape<typeof Room.AiLangSettingSchema>;
|
|
124
|
-
syncRoomInfo: MessageInitShape<typeof Room.SyncRoomInfoReqSchema>;
|
|
125
|
-
updateSimulcast: MessageInitShape<typeof Room.SubscribeReqSchema>;
|
|
126
|
-
updateRoomToken: MessageInitShape<typeof Room.UpdateTokenReqSchema>;
|
|
127
|
-
offer: MessageInitShape<typeof Room.SdpConsultSchema>;
|
|
128
|
-
answer: MessageInitShape<typeof Room.SdpConsultSchema>;
|
|
129
|
-
candidate: MessageInitShape<typeof Room.CandidatesSchema>;
|
|
130
|
-
reportP2PConnectEx: MessageInitShape<typeof Room.ReportP2PExReqSchema>;
|
|
131
|
-
quitRoom: MessageInitShape<typeof Room.QuitReqSchema>;
|
|
132
|
-
quitRoomEx: MessageInitShape<typeof Room.QuitReqSchema>;
|
|
133
|
-
debugger: Record<string, never>;
|
|
134
|
-
ai: Record<string, never>;
|
|
135
|
-
UpdateTrackActive: MessageInitShape<typeof Rtc.UpdateTrackStateSchema>;
|
|
136
|
-
RtcStatsData: MessageInitShape<typeof Rtc.RtcStatsDataSchema>;
|
|
137
|
-
};
|
|
138
|
-
export interface MessageReq<T extends K_eventName> {
|
|
139
95
|
/**
|
|
140
96
|
* 事件名称
|
|
141
97
|
*/
|
|
@@ -143,35 +99,29 @@ export interface MessageReq<T extends K_eventName> {
|
|
|
143
99
|
/**
|
|
144
100
|
* 事件数据
|
|
145
101
|
*/
|
|
146
|
-
data:
|
|
102
|
+
data: EventDataNotifys[T];
|
|
147
103
|
/**
|
|
148
104
|
* 请求时间戳
|
|
149
105
|
*/
|
|
150
|
-
time
|
|
151
|
-
/**
|
|
152
|
-
* 格式化时间戳
|
|
153
|
-
*/
|
|
154
|
-
timeStr?: string;
|
|
106
|
+
time: number;
|
|
155
107
|
/**
|
|
156
108
|
* 唯一标识
|
|
157
109
|
*/
|
|
158
|
-
sn
|
|
110
|
+
sn: number;
|
|
159
111
|
/**
|
|
160
112
|
* 是否压缩数据
|
|
161
113
|
*/
|
|
162
|
-
compress
|
|
114
|
+
compress: boolean;
|
|
163
115
|
/**
|
|
164
116
|
* 有效时长
|
|
165
117
|
*/
|
|
166
|
-
valid
|
|
118
|
+
valid: number;
|
|
167
119
|
/**
|
|
168
120
|
* 接口版本
|
|
169
121
|
*/
|
|
170
|
-
version
|
|
122
|
+
version: number;
|
|
171
123
|
}
|
|
172
|
-
export interface
|
|
173
|
-
code: number;
|
|
174
|
-
desc: string;
|
|
124
|
+
export interface MessageReq<T extends K_eventName> {
|
|
175
125
|
/**
|
|
176
126
|
* 事件名称
|
|
177
127
|
*/
|
|
@@ -179,15 +129,11 @@ export interface MessageRsp<T extends K_eventName> {
|
|
|
179
129
|
/**
|
|
180
130
|
* 事件数据
|
|
181
131
|
*/
|
|
182
|
-
data:
|
|
132
|
+
data: EventDataReqs[T];
|
|
183
133
|
/**
|
|
184
134
|
* 请求时间戳
|
|
185
135
|
*/
|
|
186
136
|
time: number;
|
|
187
|
-
/**
|
|
188
|
-
* 格式化时间戳
|
|
189
|
-
*/
|
|
190
|
-
timeStr: string;
|
|
191
137
|
/**
|
|
192
138
|
* 唯一标识
|
|
193
139
|
*/
|
|
@@ -205,25 +151,21 @@ export interface MessageRsp<T extends K_eventName> {
|
|
|
205
151
|
*/
|
|
206
152
|
version: number;
|
|
207
153
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
154
|
+
export interface MessageRsp<T extends K_eventName> {
|
|
155
|
+
code: number;
|
|
156
|
+
desc: string;
|
|
211
157
|
/**
|
|
212
158
|
* 事件名称
|
|
213
159
|
*/
|
|
214
160
|
event: T;
|
|
215
161
|
/**
|
|
216
|
-
*
|
|
162
|
+
* 事件数据
|
|
217
163
|
*/
|
|
218
|
-
data:
|
|
164
|
+
data: EventDataRsps[T];
|
|
219
165
|
/**
|
|
220
166
|
* 请求时间戳
|
|
221
167
|
*/
|
|
222
168
|
time: number;
|
|
223
|
-
/**
|
|
224
|
-
* 格式化时间戳
|
|
225
|
-
*/
|
|
226
|
-
timeStr?: string;
|
|
227
169
|
/**
|
|
228
170
|
* 唯一标识
|
|
229
171
|
*/
|
|
@@ -241,37 +183,17 @@ export interface SendMessageFormat<T extends K_eventName> {
|
|
|
241
183
|
*/
|
|
242
184
|
version: number;
|
|
243
185
|
}
|
|
244
|
-
export declare const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
data:
|
|
248
|
-
/**
|
|
249
|
-
* 事件名称
|
|
250
|
-
*/
|
|
251
|
-
event: T;
|
|
252
|
-
/**
|
|
253
|
-
* 请求时间戳
|
|
254
|
-
*/
|
|
255
|
-
time: number;
|
|
256
|
-
/**
|
|
257
|
-
* 唯一标识
|
|
258
|
-
*/
|
|
186
|
+
export declare const encMsg: <T extends K_eventName>(message: MessageReq<T>) => Uint8Array<ArrayBuffer>;
|
|
187
|
+
export declare const decMsg: (buffer: ArrayBuffer) => {
|
|
188
|
+
event: string;
|
|
189
|
+
data: any;
|
|
259
190
|
sn: number;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
191
|
+
time: number;
|
|
192
|
+
data_remote: Uint8Array<ArrayBufferLike>;
|
|
193
|
+
code: number;
|
|
194
|
+
desc: string;
|
|
263
195
|
compress: boolean;
|
|
264
|
-
/**
|
|
265
|
-
* 有效时长
|
|
266
|
-
*/
|
|
267
196
|
valid: number;
|
|
268
|
-
/**
|
|
269
|
-
* 接口版本
|
|
270
|
-
*/
|
|
271
197
|
version: number;
|
|
272
198
|
};
|
|
273
|
-
export
|
|
274
|
-
event: E;
|
|
275
|
-
}): OnMessageFormatResult<E>;
|
|
276
|
-
export declare const obj2pb: (message: Record<string, unknown>) => Uint8Array<ArrayBufferLike>;
|
|
277
|
-
export declare const pb2obj: (uint8Array: Uint8Array) => CommonRspDecoded;
|
|
199
|
+
export {};
|
package/dist/src/tools.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const isMobile: () => boolean;
|
|
2
|
-
export declare const getNetworkQuality: (lostRate: number, roundTripTime: number, jitter: number) =>
|
|
2
|
+
export declare const getNetworkQuality: (lostRate: number, roundTripTime: number, jitter: number, isLocal?: boolean) => number;
|
|
3
3
|
export declare const availableWeight: number[];
|
|
4
4
|
export declare const estimateDataByResolution: (width: number, height: number) => number;
|
|
5
5
|
export declare const sortByMimeTypes: (codecs: RTCRtpCodec[], preferredOrder: string[]) => RTCRtpCodec[];
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NotifyEmitPayloadUnion, QuickvoNotify } from './base/modules/notifyPayloadMap';
|
|
2
1
|
import { K_mediaType } from './enums/mediaType';
|
|
3
2
|
import { K_callStrategy } from './enums/callStrategy';
|
|
4
3
|
export interface QuickOptions {
|
|
@@ -121,17 +120,6 @@ export interface UserTrack {
|
|
|
121
120
|
*/
|
|
122
121
|
enabled: boolean;
|
|
123
122
|
}
|
|
124
|
-
/**
|
|
125
|
-
* notifys.emit 派发至 callback 的载荷联合(按 event 收窄请用 `NotifyEmitPayloadFor<E>`)
|
|
126
|
-
*/
|
|
127
|
-
export type NotifyEmitPayload = NotifyEmitPayloadUnion;
|
|
128
|
-
/**
|
|
129
|
-
* 广播(event 与 callback 参数类型联动,见 QuickvoNotify)
|
|
130
|
-
*/
|
|
131
|
-
export type Notify = QuickvoNotify;
|
|
132
|
-
/** QuickVO 通知事件名(`enum_notifyName` + SDK 内部如 onLog、onRoomState) */
|
|
133
|
-
export type { K_quickvoNotifyName, NotifyEmitPayloadFor, NotifyPayloadMap } from './base/modules/notifyPayloadMap';
|
|
134
|
-
export { defineQuickvoNotify } from './base/modules/notifyPayloadMap';
|
|
135
123
|
/**
|
|
136
124
|
* 房间用户
|
|
137
125
|
*/
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickvo-sdk-js",
|
|
3
3
|
"description": "提供快捷接入单对单、单对多、群体会议、舞台会议等音视频功能。",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.73",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"main": "./dist/index.umd.cjs",
|
|
10
10
|
"module": "./dist/index.js",
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
11
|
+
"types": "./dist/src/index.d.ts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/index.js",
|
|
15
|
-
"require": "./dist/index.umd.cjs"
|
|
15
|
+
"require": "./dist/index.umd.cjs",
|
|
16
|
+
"types": "./dist/src/index.d.ts"
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"@bufbuild/protobuf": "^2.11.0",
|
|
24
25
|
"pako": "^2.1.0",
|
|
25
26
|
"pr-async-queue": "^0.1.3",
|
|
26
|
-
"pr-audio-stream": "^0.2.
|
|
27
|
+
"pr-audio-stream": "^0.2.12",
|
|
27
28
|
"pr-interval-queue": "^1.1.7",
|
|
28
29
|
"pr-nat-type": "^0.1.2",
|
|
29
30
|
"pr-tools": "^1.7.2",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"@bufbuild/buf": "^1.66.1",
|
|
37
38
|
"@bufbuild/protoc-gen-es": "^2.11.0",
|
|
38
39
|
"typescript": "~6.0.2",
|
|
39
|
-
"vite": "^8.0.
|
|
40
|
+
"vite": "^8.0.7",
|
|
40
41
|
"vite-plugin-dts": "^4.5.4"
|
|
41
42
|
},
|
|
42
43
|
"private": false,
|
package/dist/chunk-763Ozoio.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
var e = f;
|
|
2
|
-
(function(e, t) {
|
|
3
|
-
for (var n = f, r = e();;) try {
|
|
4
|
-
if (parseInt(n(512)) / 1 * (parseInt(n(506)) / 2) + parseInt(n(499)) / 3 * (-parseInt(n(503)) / 4) + -parseInt(n(485)) / 5 * (-parseInt(n(498)) / 6) + parseInt(n(509)) / 7 + parseInt(n(510)) / 8 + -parseInt(n(489)) / 9 * (parseInt(n(514)) / 10) + -parseInt(n(483)) / 11 * (parseInt(n(484)) / 12) === t) break;
|
|
5
|
-
r.push(r.shift());
|
|
6
|
-
} catch {
|
|
7
|
-
r.push(r.shift());
|
|
8
|
-
}
|
|
9
|
-
})(d, 462977);
|
|
10
|
-
var t = Object[e(497)], n = Object.defineProperty, r = Object[e(491)], i = Object.getOwnPropertyNames, a = Object[e(494)], o = Object[e(493)].hasOwnProperty, s = (t, n) => () => (n || t((n = { exports: {} })[e(513)], n), n.exports), c = (t, r) => {
|
|
11
|
-
var i = e, a = {
|
|
12
|
-
ogIaw: function(e, t, n, r) {
|
|
13
|
-
return e(t, n, r);
|
|
14
|
-
},
|
|
15
|
-
npgif: i(511)
|
|
16
|
-
};
|
|
17
|
-
let o = {};
|
|
18
|
-
for (var s in t) a[i(500)](n, o, s, {
|
|
19
|
-
get: t[s],
|
|
20
|
-
enumerable: !0
|
|
21
|
-
});
|
|
22
|
-
return !r && n(o, Symbol[i(492)], { value: a[i(515)] }), o;
|
|
23
|
-
}, l = (t, a, s, c) => {
|
|
24
|
-
var l = e, u = {
|
|
25
|
-
DCsbI: l(490),
|
|
26
|
-
cNXvN: function(e, t) {
|
|
27
|
-
return e === t;
|
|
28
|
-
},
|
|
29
|
-
HTVfg: function(e, t) {
|
|
30
|
-
return e(t);
|
|
31
|
-
},
|
|
32
|
-
lwCpx: function(e, t) {
|
|
33
|
-
return e !== t;
|
|
34
|
-
},
|
|
35
|
-
vpywt: function(e, t, n, r) {
|
|
36
|
-
return e(t, n, r);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
if (a && typeof a === u[l(504)] || u[l(502)](typeof a, l(495))) for (var d = u[l(501)](i, a), f = 0, p = d[l(482)], m; f < p; f++) m = d[f], !o[l(507)](t, m) && u[l(486)](m, s) && u[l(488)](n, t, m, {
|
|
40
|
-
get: ((e) => a[e])[l(505)](null, m),
|
|
41
|
-
enumerable: !(c = r(a, m)) || c[l(487)]
|
|
42
|
-
});
|
|
43
|
-
return t;
|
|
44
|
-
}, u = (r, i, o) => (o = r == null ? {} : t(a(r)), l(i || !r || !r[e(508)] ? n(o, e(496), {
|
|
45
|
-
value: r,
|
|
46
|
-
enumerable: !0
|
|
47
|
-
}) : o, r));
|
|
48
|
-
function d() {
|
|
49
|
-
var e = /* @__PURE__ */ "getPrototypeOf.function.default.create.42NjVZRo.825hGbqbt.ogIaw.HTVfg.cNXvN.1356VIlzZh.DCsbI.bind.2ACDAhE.call.__esModule.3449299FMEGSt.6358968ldgHQs.Module.338018MDotBs.exports.50QLQKze.npgif.length.338811VOQOnD.408lqsHyF.319075RhtFhn.lwCpx.enumerable.vpywt.844047HqObWV.object.getOwnPropertyDescriptor.toStringTag.prototype".split(".");
|
|
50
|
-
return d = function() {
|
|
51
|
-
return e;
|
|
52
|
-
}, d();
|
|
53
|
-
}
|
|
54
|
-
function f(e, t) {
|
|
55
|
-
return e -= 482, d()[e];
|
|
56
|
-
}
|
|
57
|
-
export { c as n, u as r, s as t };
|
package/dist/index.d.ts
DELETED