quickvo-sdk-js 1.6.71 → 1.6.72
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-763Ozoio.js +57 -0
- package/dist/index.js +21371 -20951
- package/dist/index.umd.cjs +4 -4
- package/dist/lib-BMLdj_6t.js +11058 -0
- package/dist/src/action/ActionSFU.d.ts +13 -0
- package/dist/src/base/modules/Peer.d.ts +13 -1
- package/dist/src/base/modules/users/Users.d.ts +0 -4
- package/dist/src/base/modules/users/modules/RemotePeerTrackAnalysis.d.ts +5 -0
- package/dist/src/base/modules/users/modules/RemoteUser.d.ts +6 -0
- package/dist/src/enums/eventName.d.ts +6 -1
- package/dist/src/enums/mediaType.d.ts +3 -0
- package/dist/src/enums/notifyName.d.ts +2 -1
- package/dist/src/protos/gen/modules/Room_pb.d.ts +11 -79
- package/dist/src/protos/gen/modules/Rtc_pb.d.ts +70 -2
- package/dist/src/protos/protoEvent.d.ts +9 -1
- package/package.json +1 -1
- package/dist/chunk-C3ZmwZ-K.js +0 -57
- package/dist/lib-Cen0reYH.js +0 -11194
|
@@ -9,6 +9,8 @@ export declare class ActionSFU {
|
|
|
9
9
|
private _networkCalculating;
|
|
10
10
|
/** 上次打印 generateTrackAnalysis 超时告警的时间,用于限流(每 30 秒最多一次) */
|
|
11
11
|
private _lastTrackAnalysisWarnTime;
|
|
12
|
+
/** `genTurnAddress.expiresAt` 到期前 1 分钟:`_fetchGenTurnAddress` + `peer.setTurnConfiguration`(不 init PC) */
|
|
13
|
+
private _turnRefreshTimerId?;
|
|
12
14
|
/** 避免 Math.max(...arr) 在极大数组上触达引擎参数长度限制 */
|
|
13
15
|
private static _maxInNumberArray;
|
|
14
16
|
private static _minInNumberArray;
|
|
@@ -146,6 +148,13 @@ export declare class ActionSFU {
|
|
|
146
148
|
private _initHeartbeat;
|
|
147
149
|
/** 向服务端拉取 TURN/STUN 配置;失败或未返回有效 iceServers 时返回 undefined,由 Peer 回退默认 STUN */
|
|
148
150
|
private _fetchGenTurnAddress;
|
|
151
|
+
private _cancelTurnRefreshSchedule;
|
|
152
|
+
/**
|
|
153
|
+
* 按 `peer.turnExpiresAtMs` 在过期前 60s 触发:拉新 TURN 并通过 `RTCPeerConnection.setConfiguration` 更新(不重建 PC)。
|
|
154
|
+
* 无有效过期时间(仅 STUN 等)时不调度。
|
|
155
|
+
*/
|
|
156
|
+
private _scheduleTurnRefreshBeforeExpiry;
|
|
157
|
+
private _refreshTurnViaSetConfiguration;
|
|
149
158
|
private _connectCF;
|
|
150
159
|
private _reportNetwork;
|
|
151
160
|
private _createTracks;
|
|
@@ -163,5 +172,9 @@ export declare class ActionSFU {
|
|
|
163
172
|
private _hasAsyncTask;
|
|
164
173
|
private _syncRoomInfo;
|
|
165
174
|
private _restorePeer;
|
|
175
|
+
private _pubChannel;
|
|
176
|
+
private _subChannel;
|
|
177
|
+
private _initChannel;
|
|
178
|
+
private _emitSelfNetworkQualityChange;
|
|
166
179
|
_restoreRoom: () => Promise<void>;
|
|
167
180
|
}
|
|
@@ -3,13 +3,15 @@ import { TurnUrlsResponse } from '../../protos/gen/modules/Room_pb';
|
|
|
3
3
|
import { Config } from './Config';
|
|
4
4
|
import { Users } from './users/Users';
|
|
5
5
|
import { PrResolves } from './PrResolves';
|
|
6
|
+
import { K_eventName } from '../../enums';
|
|
7
|
+
import { SendMessageFormat } from '../../protos/protoEvent';
|
|
6
8
|
interface On {
|
|
7
9
|
state?: (_state: RTCPeerConnectionState) => void;
|
|
8
10
|
}
|
|
9
11
|
export declare class Peer {
|
|
10
12
|
config: Config;
|
|
11
13
|
users: Users;
|
|
12
|
-
prResolves: PrResolves<"peerConnected">;
|
|
14
|
+
prResolves: PrResolves<"peerConnected" | "isOpenlocalChannel">;
|
|
13
15
|
pc: RTCPeerConnection;
|
|
14
16
|
initTime: number;
|
|
15
17
|
transceiverMap: Map<"mc_audio" | "mc_video" | "ss_video" | "ss_audio", RTCRtpTransceiver>;
|
|
@@ -23,9 +25,12 @@ export declare class Peer {
|
|
|
23
25
|
simulcast: 'f' | 'h' | 'q';
|
|
24
26
|
/** 当前 SFU 连接使用的 TURN 配置过期时间(毫秒,来自 genTurnAddress.expiresAt) */
|
|
25
27
|
turnExpiresAtMs?: number;
|
|
28
|
+
localChannel?: RTCDataChannel;
|
|
29
|
+
remoteChannels: Map<string, RTCDataChannel>;
|
|
26
30
|
on: On;
|
|
27
31
|
waitings: {
|
|
28
32
|
peerConnected: () => Promise<unknown>;
|
|
33
|
+
isOpenlocalChannel: () => Promise<unknown>;
|
|
29
34
|
};
|
|
30
35
|
constructor({ config, users }: {
|
|
31
36
|
config: Config;
|
|
@@ -42,6 +47,13 @@ export declare class Peer {
|
|
|
42
47
|
*/
|
|
43
48
|
setRTCRtpSenderParameters: (parameters: Partial<RTCRtpSendParameters>, mediaTypes?: K_mediaType[]) => Promise<void>;
|
|
44
49
|
init: (turnRsp?: TurnUrlsResponse) => Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* TURN 凭证将过期时:不销毁 PC,仅 `setConfiguration` 更新 ICE(与 init 同源),并尽量 `restartIce` 以用新 relay。
|
|
52
|
+
*/
|
|
53
|
+
setTurnConfiguration: (turnRsp?: TurnUrlsResponse) => void;
|
|
54
|
+
localChannelSend: <T extends K_eventName>(message: Pick<SendMessageFormat<T>, "event" | "data"> & Partial<Omit<SendMessageFormat<T>, "event" | "data">>) => Promise<void>;
|
|
55
|
+
addLocalUserChannel: (id?: number) => void;
|
|
56
|
+
addRemoteUserChannel: (userId: string, id?: number) => void;
|
|
45
57
|
close: () => void;
|
|
46
58
|
addSenders: (mediaTypes: K_mediaType[]) => Promise<("mc_audio" | "mc_video" | "ss_video" | "ss_audio")[]>;
|
|
47
59
|
syncSenderStreamTrack: (mediaTypes: K_mediaType[]) => Promise<void>;
|
|
@@ -205,10 +205,6 @@ export declare class Users {
|
|
|
205
205
|
createRemoteUser: (userId: string) => RemoteUser;
|
|
206
206
|
checkRemoteUser: (userId: string) => boolean;
|
|
207
207
|
removeRemoteUser: (userId: string) => void;
|
|
208
|
-
/**
|
|
209
|
-
* onPublish:更新已存在的远端用户轨道与通话状态(列表外用户返回 false,由上层忽略)
|
|
210
|
-
*/
|
|
211
|
-
applyRemoteUserPublishNotify: (user: Pick<ProtoUser, "id"> & Partial<Pick<ProtoUser, "callAction" | "tracks">>) => boolean;
|
|
212
208
|
/**
|
|
213
209
|
* 远端退出房间:剥离用户并汇总需 SFU 侧 stopReceivers / closeTrack 的 mid 与轨道
|
|
214
210
|
*/
|
|
@@ -13,6 +13,11 @@ export declare class RemotePeerTrackAnalysis {
|
|
|
13
13
|
* 使用已筛选的 stats 子集更新网络信息
|
|
14
14
|
*/
|
|
15
15
|
applyFromReports: (reports: ReportInfo[]) => TrackReport;
|
|
16
|
+
/**
|
|
17
|
+
* 本端 SFU inbound 丢包与对端 DataChannel 上报的上行丢包(RtcStatsData)取较小值,再重算 quality,
|
|
18
|
+
* 用于弱化「他端→SFU」问题对本端下行判定的影响。
|
|
19
|
+
*/
|
|
20
|
+
blendDownlinkLostWithPeerUplink: (peerPacketsLostRate: number | undefined) => void;
|
|
16
21
|
/**
|
|
17
22
|
* 生成网络信息(单轨 getStats,兼容旧调用)
|
|
18
23
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UserBase } from './UserBase';
|
|
2
2
|
import { K_mediaType } from '../../../../enums/mediaType';
|
|
3
|
+
import { RtcStatsData } from '../../../../protos/gen/modules/Rtc_pb';
|
|
3
4
|
import { LocalMedias } from '../../LocalMedias';
|
|
4
5
|
import { RemoteUserP2P } from './RemoteUserP2P';
|
|
5
6
|
import { Config } from '../../Config';
|
|
@@ -36,6 +37,8 @@ export declare class RemoteUser extends UserBase {
|
|
|
36
37
|
[key in K_mediaType]?: HTMLAudioElement;
|
|
37
38
|
};
|
|
38
39
|
p2p?: RemoteUserP2P;
|
|
40
|
+
/** 对端经 SFU DataChannel 广播的 RtcStatsData(上行轨统计),用于本端计算其 SFU 下行时与 inbound 丢包取 min */
|
|
41
|
+
peerRtcStats?: RtcStatsData;
|
|
39
42
|
constructor({ config, localMedias }: {
|
|
40
43
|
config: Config;
|
|
41
44
|
localMedias: LocalMedias;
|
|
@@ -45,6 +48,9 @@ export declare class RemoteUser extends UserBase {
|
|
|
45
48
|
subscribed_mediaTypes: ("mc_audio" | "mc_video" | "ss_video" | "ss_audio")[];
|
|
46
49
|
};
|
|
47
50
|
setSubscribed: (mediaTypes: K_mediaType[], subscribed: boolean) => void;
|
|
51
|
+
/** 缓存对端 `localChannelSend(RtcStatsData)` 载荷;`userId` 须与本 RemoteUser.id 一致 */
|
|
52
|
+
setPeerRtcStats: (data: RtcStatsData) => void;
|
|
53
|
+
private getPeerUplinkLostRateForMediaType;
|
|
48
54
|
getTrackReports: (origin: "sfu" | "p2p", direction: "sends" | "recvs", mediaType: K_mediaType) => import('../../../..').TrackReport | undefined;
|
|
49
55
|
generateTrackAnalysis: (peer: Peer, sfuStats: RTCStatsReport, p2pStats: RTCStatsReport | null) => Promise<void>;
|
|
50
56
|
useRemoteStream: (mediaTypes: K_mediaType[], peer: Peer) => void;
|
|
@@ -11,6 +11,10 @@ export declare const enum_eventName: {
|
|
|
11
11
|
readonly joinRoomEx: "加入房间(提前建连)";
|
|
12
12
|
readonly pubNotify: "广播已发布的轨道";
|
|
13
13
|
readonly subscribe: "订阅流";
|
|
14
|
+
/** Room.proto ChannelPublishReq / ChannelPublishRsq:发布房间 DataChannel */
|
|
15
|
+
readonly pubChannel: "发布DataChannel";
|
|
16
|
+
/** Room.proto ChannelSubscribeReq / ChannelSubscribeRsq:订阅他人 DataChannel */
|
|
17
|
+
readonly subChannel: "订阅DataChannel";
|
|
14
18
|
readonly renegotiate: "协商流";
|
|
15
19
|
readonly closeTrack: "关闭轨道";
|
|
16
20
|
readonly preventUsersBehavior: "阻止用户行为";
|
|
@@ -29,6 +33,7 @@ export declare const enum_eventName: {
|
|
|
29
33
|
readonly debugger: "调试";
|
|
30
34
|
readonly ai: "WorkerAi调试";
|
|
31
35
|
readonly UpdateTrackActive: "p2p轨道状态";
|
|
36
|
+
readonly RtcStatsData: "客户端rtc网络质量";
|
|
32
37
|
};
|
|
33
38
|
export type T_eventName = typeof enum_eventName;
|
|
34
39
|
export type K_eventName = keyof T_eventName;
|
|
@@ -38,4 +43,4 @@ export declare const eventName_options: {
|
|
|
38
43
|
label: any;
|
|
39
44
|
}[];
|
|
40
45
|
export declare const eventName_keys: (keyof typeof enum_eventName)[];
|
|
41
|
-
export declare const eventName_vals: ("关闭轨道" | "心跳" | "慢心跳" | "确认收到消息" | "上报网络类型" | "连接CF" | "获取TURN地址" | "发布流" | "加入房间" | "加入房间(提前建连)" | "广播已发布的轨道" | "订阅流" | "协商流" | "阻止用户行为" | "更新网络状态" | "更新通话状态" | "切换大小流" | "切换房间语音识别" | "同步房间" | "更新房间SDKTOKEN" | "发送P2P-offer" | "回应P2P-answer" | "发送P2P候选信息-candidate" | "上报P2P连接结果" | "退出房间" | "退出房间不断开连接" | "调试" | "WorkerAi调试" | "p2p轨道状态")[];
|
|
46
|
+
export declare const eventName_vals: ("关闭轨道" | "心跳" | "慢心跳" | "确认收到消息" | "上报网络类型" | "连接CF" | "获取TURN地址" | "发布流" | "加入房间" | "加入房间(提前建连)" | "广播已发布的轨道" | "订阅流" | "发布DataChannel" | "订阅DataChannel" | "协商流" | "阻止用户行为" | "更新网络状态" | "更新通话状态" | "切换大小流" | "切换房间语音识别" | "同步房间" | "更新房间SDKTOKEN" | "发送P2P-offer" | "回应P2P-answer" | "发送P2P候选信息-candidate" | "上报P2P连接结果" | "退出房间" | "退出房间不断开连接" | "调试" | "WorkerAi调试" | "p2p轨道状态" | "客户端rtc网络质量")[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TrackType } from '../protos/gen/modules/Room_pb';
|
|
1
2
|
export declare const enum_mediaType: {
|
|
2
3
|
readonly mc_audio: "麦克风-默认轨道";
|
|
3
4
|
readonly mc_video: "摄像头-默认轨道";
|
|
@@ -13,3 +14,5 @@ export declare const mediaType_options: {
|
|
|
13
14
|
}[];
|
|
14
15
|
export declare const mediaType_keys: (keyof typeof enum_mediaType)[];
|
|
15
16
|
export declare const mediaType_vals: ("麦克风-默认轨道" | "摄像头-默认轨道" | "屏幕共享-视频轨道" | "屏幕共享-音频轨道")[];
|
|
17
|
+
/** 与 Room.proto `TrackType` 一致,供 RtcStatsData / protobuf 使用 */
|
|
18
|
+
export declare function mediaTypeToProtoTrackType(mediaType: K_mediaType): TrackType;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const enum_notifyName: {
|
|
2
2
|
readonly onNetQuality: "网络质量回调";
|
|
3
3
|
readonly updateSeverTime: "服务端时间更新";
|
|
4
|
+
readonly onDataChannelPublish: "用户房间DataChannel发布或变更";
|
|
4
5
|
readonly onJoinRoom: "加入房间回调";
|
|
5
6
|
readonly onJoinRoomBatch: "加入房间批量回调";
|
|
6
7
|
readonly onQuitRoom: "退出房间回调";
|
|
@@ -33,4 +34,4 @@ export declare const notifyName_options: {
|
|
|
33
34
|
label: any;
|
|
34
35
|
}[];
|
|
35
36
|
export declare const notifyName_keys: (keyof typeof enum_notifyName)[];
|
|
36
|
-
export declare const notifyName_vals: ("网络质量回调" | "服务端时间更新" | "加入房间回调" | "加入房间批量回调" | "退出房间回调" | "退出房间批量回调" | "监听到流发布" | "关闭轨道" | "更新通讯状态" | "通知轨道失效" | "房间内的全体禁言状态发生变化" | "房间内的管理员发生变化" | "建立P2P连接" | "收到P2P-offer" | "收到P2P-answer" | "收到P2P候选信息-candidate" | "断开P2P" | "更新推流权限通知" | "批量更新推流权限通知" | "Token即将过期" | "Token已过期" | "销毁房间" | "行为允许权限变更" | "cdn播放地址变化" | "用户讲话")[];
|
|
37
|
+
export declare const notifyName_vals: ("网络质量回调" | "服务端时间更新" | "用户房间DataChannel发布或变更" | "加入房间回调" | "加入房间批量回调" | "退出房间回调" | "退出房间批量回调" | "监听到流发布" | "关闭轨道" | "更新通讯状态" | "通知轨道失效" | "房间内的全体禁言状态发生变化" | "房间内的管理员发生变化" | "建立P2P连接" | "收到P2P-offer" | "收到P2P-answer" | "收到P2P候选信息-candidate" | "断开P2P" | "更新推流权限通知" | "批量更新推流权限通知" | "Token即将过期" | "Token已过期" | "销毁房间" | "行为允许权限变更" | "cdn播放地址变化" | "用户讲话")[];
|
|
@@ -1074,69 +1074,25 @@ export type ChannelSubscribeRsq = Message<"com.quick.voice.proto.ChannelSubscrib
|
|
|
1074
1074
|
*/
|
|
1075
1075
|
export declare const ChannelSubscribeRsqSchema: GenMessage<ChannelSubscribeRsq>;
|
|
1076
1076
|
/**
|
|
1077
|
-
*
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* @generated from field: string userId = 1;
|
|
1082
|
-
*/
|
|
1083
|
-
userId: string;
|
|
1084
|
-
/**
|
|
1085
|
-
* @generated from field: com.quick.voice.proto.DataChannelType type = 2;
|
|
1086
|
-
*/
|
|
1087
|
-
type: DataChannelType;
|
|
1088
|
-
/**
|
|
1089
|
-
* backAuido
|
|
1090
|
-
*
|
|
1091
|
-
* @generated from field: optional com.quick.voice.proto.DataChannelAudioData audioData = 3;
|
|
1092
|
-
*/
|
|
1093
|
-
audioData?: DataChannelAudioData;
|
|
1094
|
-
};
|
|
1095
|
-
/**
|
|
1096
|
-
* Describes the message com.quick.voice.proto.DataChannelData.
|
|
1097
|
-
* Use `create(DataChannelDataSchema)` to create a new message.
|
|
1098
|
-
*/
|
|
1099
|
-
export declare const DataChannelDataSchema: GenMessage<DataChannelData>;
|
|
1100
|
-
/**
|
|
1101
|
-
* @generated from message com.quick.voice.proto.DataChannelAudioData
|
|
1102
|
-
*/
|
|
1103
|
-
export type DataChannelAudioData = Message<"com.quick.voice.proto.DataChannelAudioData"> & {
|
|
1104
|
-
/**
|
|
1105
|
-
* @generated from field: bytes data = 1;
|
|
1106
|
-
*/
|
|
1107
|
-
data: Uint8Array;
|
|
1108
|
-
/**
|
|
1109
|
-
* @generated from field: com.quick.voice.proto.DataChannelAudioFormat format = 2;
|
|
1110
|
-
*/
|
|
1111
|
-
format?: DataChannelAudioFormat;
|
|
1112
|
-
/**
|
|
1113
|
-
* @generated from field: optional int64 time = 3;
|
|
1114
|
-
*/
|
|
1115
|
-
time?: bigint;
|
|
1116
|
-
};
|
|
1117
|
-
/**
|
|
1118
|
-
* Describes the message com.quick.voice.proto.DataChannelAudioData.
|
|
1119
|
-
* Use `create(DataChannelAudioDataSchema)` to create a new message.
|
|
1120
|
-
*/
|
|
1121
|
-
export declare const DataChannelAudioDataSchema: GenMessage<DataChannelAudioData>;
|
|
1122
|
-
/**
|
|
1123
|
-
* @generated from message com.quick.voice.proto.DataChannelAudioFormat
|
|
1077
|
+
* notify: 用户 DataChannel 发布或变更(WebSocket event: onDataChannelPublish)
|
|
1078
|
+
*
|
|
1079
|
+
* @generated from message com.quick.voice.proto.DataChannelPublishNotify
|
|
1124
1080
|
*/
|
|
1125
|
-
export type
|
|
1081
|
+
export type DataChannelPublishNotify = Message<"com.quick.voice.proto.DataChannelPublishNotify"> & {
|
|
1126
1082
|
/**
|
|
1127
|
-
* @generated from field:
|
|
1083
|
+
* @generated from field: string roomId = 1;
|
|
1128
1084
|
*/
|
|
1129
|
-
|
|
1085
|
+
roomId: string;
|
|
1130
1086
|
/**
|
|
1131
|
-
* @generated from field:
|
|
1087
|
+
* @generated from field: com.quick.voice.proto.User user = 2;
|
|
1132
1088
|
*/
|
|
1133
|
-
|
|
1089
|
+
user?: User;
|
|
1134
1090
|
};
|
|
1135
1091
|
/**
|
|
1136
|
-
* Describes the message com.quick.voice.proto.
|
|
1137
|
-
* Use `create(
|
|
1092
|
+
* Describes the message com.quick.voice.proto.DataChannelPublishNotify.
|
|
1093
|
+
* Use `create(DataChannelPublishNotifySchema)` to create a new message.
|
|
1138
1094
|
*/
|
|
1139
|
-
export declare const
|
|
1095
|
+
export declare const DataChannelPublishNotifySchema: GenMessage<DataChannelPublishNotify>;
|
|
1140
1096
|
/**
|
|
1141
1097
|
* confirm consumer msg
|
|
1142
1098
|
*
|
|
@@ -1770,17 +1726,6 @@ export type IceServer = Message<"com.quick.voice.proto.IceServer"> & {
|
|
|
1770
1726
|
* Use `create(IceServerSchema)` to create a new message.
|
|
1771
1727
|
*/
|
|
1772
1728
|
export declare const IceServerSchema: GenMessage<IceServer>;
|
|
1773
|
-
/**
|
|
1774
|
-
* event: genTurnAddress request
|
|
1775
|
-
*
|
|
1776
|
-
* @generated from message com.quick.voice.proto.TurnUrlsReq
|
|
1777
|
-
*/
|
|
1778
|
-
export type TurnUrlsReq = Message<"com.quick.voice.proto.TurnUrlsReq"> & {};
|
|
1779
|
-
/**
|
|
1780
|
-
* Describes the message com.quick.voice.proto.TurnUrlsReq.
|
|
1781
|
-
* Use `create(TurnUrlsReqSchema)` to create a new message.
|
|
1782
|
-
*/
|
|
1783
|
-
export declare const TurnUrlsReqSchema: GenMessage<TurnUrlsReq>;
|
|
1784
1729
|
/**
|
|
1785
1730
|
* @generated from message com.quick.voice.proto.TurnUrlsResponse
|
|
1786
1731
|
*/
|
|
@@ -1964,19 +1909,6 @@ export declare enum CountMethods {
|
|
|
1964
1909
|
* Describes the enum com.quick.voice.proto.CountMethods.
|
|
1965
1910
|
*/
|
|
1966
1911
|
export declare const CountMethodsSchema: GenEnum<CountMethods>;
|
|
1967
|
-
/**
|
|
1968
|
-
* @generated from enum com.quick.voice.proto.DataChannelType
|
|
1969
|
-
*/
|
|
1970
|
-
export declare enum DataChannelType {
|
|
1971
|
-
/**
|
|
1972
|
-
* @generated from enum value: backAuido = 0;
|
|
1973
|
-
*/
|
|
1974
|
-
backAuido = 0
|
|
1975
|
-
}
|
|
1976
|
-
/**
|
|
1977
|
-
* Describes the enum com.quick.voice.proto.DataChannelType.
|
|
1978
|
-
*/
|
|
1979
|
-
export declare const DataChannelTypeSchema: GenEnum<DataChannelType>;
|
|
1980
1912
|
/**
|
|
1981
1913
|
* @generated from enum com.quick.voice.proto.NatType
|
|
1982
1914
|
*/
|
|
@@ -22,7 +22,7 @@ export type RtcTrack = Message<"com.quick.voice.proto.RtcTrack"> & {
|
|
|
22
22
|
*/
|
|
23
23
|
trackName: string;
|
|
24
24
|
/**
|
|
25
|
-
* 与 Room.proto
|
|
25
|
+
* 与 Room.proto `TrackType` 共用,避免同 package 下重复枚举符号(C++ 作用域规则)
|
|
26
26
|
*
|
|
27
27
|
* @generated from field: com.quick.voice.proto.TrackType type = 4;
|
|
28
28
|
*/
|
|
@@ -55,6 +55,70 @@ export type UpdateTrackState = Message<"com.quick.voice.proto.UpdateTrackState">
|
|
|
55
55
|
* Use `create(UpdateTrackStateSchema)` to create a new message.
|
|
56
56
|
*/
|
|
57
57
|
export declare const UpdateTrackStateSchema: GenMessage<UpdateTrackState>;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from message com.quick.voice.proto.RtcStatsData
|
|
60
|
+
*/
|
|
61
|
+
export type RtcStatsData = Message<"com.quick.voice.proto.RtcStatsData"> & {
|
|
62
|
+
/**
|
|
63
|
+
* @generated from field: string userId = 1;
|
|
64
|
+
*/
|
|
65
|
+
userId: string;
|
|
66
|
+
/**
|
|
67
|
+
* @generated from field: int64 statsTime = 2;
|
|
68
|
+
*/
|
|
69
|
+
statsTime: bigint;
|
|
70
|
+
/**
|
|
71
|
+
* @generated from field: double roundTripTime = 3;
|
|
72
|
+
*/
|
|
73
|
+
roundTripTime: number;
|
|
74
|
+
/**
|
|
75
|
+
* @generated from field: double upQualityScore = 4;
|
|
76
|
+
*/
|
|
77
|
+
upQualityScore: number;
|
|
78
|
+
/**
|
|
79
|
+
* @generated from field: double downQualityScore = 5;
|
|
80
|
+
*/
|
|
81
|
+
downQualityScore: number;
|
|
82
|
+
/**
|
|
83
|
+
* @generated from field: repeated com.quick.voice.proto.TrackStatsData stats = 6;
|
|
84
|
+
*/
|
|
85
|
+
stats: TrackStatsData[];
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Describes the message com.quick.voice.proto.RtcStatsData.
|
|
89
|
+
* Use `create(RtcStatsDataSchema)` to create a new message.
|
|
90
|
+
*/
|
|
91
|
+
export declare const RtcStatsDataSchema: GenMessage<RtcStatsData>;
|
|
92
|
+
/**
|
|
93
|
+
* @generated from message com.quick.voice.proto.TrackStatsData
|
|
94
|
+
*/
|
|
95
|
+
export type TrackStatsData = Message<"com.quick.voice.proto.TrackStatsData"> & {
|
|
96
|
+
/**
|
|
97
|
+
* @generated from field: com.quick.voice.proto.TrackType type = 1;
|
|
98
|
+
*/
|
|
99
|
+
type: TrackType;
|
|
100
|
+
/**
|
|
101
|
+
* @generated from field: double bandwidth = 2;
|
|
102
|
+
*/
|
|
103
|
+
bandwidth: number;
|
|
104
|
+
/**
|
|
105
|
+
* @generated from field: double jitter = 3;
|
|
106
|
+
*/
|
|
107
|
+
jitter: number;
|
|
108
|
+
/**
|
|
109
|
+
* @generated from field: int64 packetsLost = 4;
|
|
110
|
+
*/
|
|
111
|
+
packetsLost: bigint;
|
|
112
|
+
/**
|
|
113
|
+
* @generated from field: double packetsLostRate = 5;
|
|
114
|
+
*/
|
|
115
|
+
packetsLostRate: number;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Describes the message com.quick.voice.proto.TrackStatsData.
|
|
119
|
+
* Use `create(TrackStatsDataSchema)` to create a new message.
|
|
120
|
+
*/
|
|
121
|
+
export declare const TrackStatsDataSchema: GenMessage<TrackStatsData>;
|
|
58
122
|
/**
|
|
59
123
|
* @generated from enum com.quick.voice.proto.RtcEvent
|
|
60
124
|
*/
|
|
@@ -62,7 +126,11 @@ export declare enum RtcEvent {
|
|
|
62
126
|
/**
|
|
63
127
|
* @generated from enum value: UpdateTrackActive = 0;
|
|
64
128
|
*/
|
|
65
|
-
UpdateTrackActive = 0
|
|
129
|
+
UpdateTrackActive = 0,
|
|
130
|
+
/**
|
|
131
|
+
* @generated from enum value: RtcStats = 1;
|
|
132
|
+
*/
|
|
133
|
+
RtcStats = 1
|
|
66
134
|
}
|
|
67
135
|
/**
|
|
68
136
|
* Describes the enum com.quick.voice.proto.RtcEvent.
|
|
@@ -11,11 +11,15 @@ export type OnMessageDataMap = {
|
|
|
11
11
|
connectCF: Room.ConnectCFRsp;
|
|
12
12
|
genTurnAddress: Room.TurnUrlsResponse;
|
|
13
13
|
publish: Room.PublishRsp;
|
|
14
|
+
pubChannel: Room.ChannelPublishRsq;
|
|
15
|
+
subChannel: Room.ChannelSubscribeRsq;
|
|
14
16
|
joinRoom: Room.JoinRsp;
|
|
15
17
|
joinRoomEx: Room.JoinRsp;
|
|
16
18
|
subscribe: Room.SubscribeRsp;
|
|
17
19
|
closeTrack: Room.CloseTrackRsp;
|
|
18
20
|
syncRoomInfo: Room.SyncRoomInfoRsp;
|
|
21
|
+
/** 负载与 JoinNotify 同构(roomId + user);服务端 event 为 onDataChannelPublish */
|
|
22
|
+
onDataChannelPublish: Room.UserChannel;
|
|
19
23
|
onJoinRoom: Room.JoinNotify;
|
|
20
24
|
onJoinRoomBatch: Room.JoinBatchNotify;
|
|
21
25
|
onPublish: Room.PublishNotify;
|
|
@@ -42,6 +46,7 @@ export type OnMessageDataMap = {
|
|
|
42
46
|
debugger: unknown;
|
|
43
47
|
ai: unknown;
|
|
44
48
|
UpdateTrackActive: Rtc.UpdateTrackState;
|
|
49
|
+
RtcStatsData: Rtc.RtcStatsData;
|
|
45
50
|
};
|
|
46
51
|
/**
|
|
47
52
|
* 请求事件对应的响应 data(与 onMessageFormat 中可解析的 event 对齐;未单独解析的为 unknown)
|
|
@@ -102,12 +107,14 @@ export type EventDataReqs = {
|
|
|
102
107
|
ackMsg: MessageInitShape<typeof Room.AckMsgReqSchema>;
|
|
103
108
|
reportNetwork: MessageInitShape<typeof Room.ReportNetInfoSchema>;
|
|
104
109
|
connectCF: MessageInitShape<typeof Room.ConnectCFReqSchema>;
|
|
105
|
-
genTurnAddress: MessageInitShape<typeof Room.
|
|
110
|
+
genTurnAddress: MessageInitShape<typeof Room.TurnUrlsResponseSchema>;
|
|
106
111
|
publish: MessageInitShape<typeof Room.PublishReqSchema>;
|
|
107
112
|
joinRoom: MessageInitShape<typeof Room.JoinReqSchema>;
|
|
108
113
|
joinRoomEx: MessageInitShape<typeof Room.JoinReqSchema>;
|
|
109
114
|
pubNotify: MessageInitShape<typeof Room.PublishNotifySchema>;
|
|
110
115
|
subscribe: MessageInitShape<typeof Room.SubscribeReqSchema>;
|
|
116
|
+
pubChannel: MessageInitShape<typeof Room.ChannelPublishReqSchema>;
|
|
117
|
+
subChannel: MessageInitShape<typeof Room.ChannelSubscribeReqSchema>;
|
|
111
118
|
renegotiate: MessageInitShape<typeof Room.RenegotiateReqSchema>;
|
|
112
119
|
closeTrack: MessageInitShape<typeof Room.CloseTrackReqSchema>;
|
|
113
120
|
preventUsersBehavior: MessageInitShape<typeof Room.PreventUsersBehaviorReqSchema>;
|
|
@@ -126,6 +133,7 @@ export type EventDataReqs = {
|
|
|
126
133
|
debugger: Record<string, never>;
|
|
127
134
|
ai: Record<string, never>;
|
|
128
135
|
UpdateTrackActive: MessageInitShape<typeof Rtc.UpdateTrackStateSchema>;
|
|
136
|
+
RtcStatsData: MessageInitShape<typeof Rtc.RtcStatsDataSchema>;
|
|
129
137
|
};
|
|
130
138
|
export interface MessageReq<T extends K_eventName> {
|
|
131
139
|
/**
|
package/package.json
CHANGED
package/dist/chunk-C3ZmwZ-K.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
function e(e, t) {
|
|
2
|
-
return e -= 298, n()[e];
|
|
3
|
-
}
|
|
4
|
-
var t = e;
|
|
5
|
-
function n() {
|
|
6
|
-
var e = /* @__PURE__ */ "2308388lXGSZb.29845764AGjRKZ.bind.UcVdm.hasOwnProperty.tGkWM.2554647EfTMTm.4255056HaPjHR.777038bpSwJr.defineProperty.JvObn.toStringTag.35utAsFI.3903475YdbIRX.exports.enumerable.getOwnPropertyNames.gqkGJ.create.function.call.Module.YKlim.getPrototypeOf.prototype.2oxqlAf.984056EdTDUe.__esModule.default".split(".");
|
|
7
|
-
return n = function() {
|
|
8
|
-
return e;
|
|
9
|
-
}, n();
|
|
10
|
-
}
|
|
11
|
-
(function(t, n) {
|
|
12
|
-
for (var r = e, i = t();;) try {
|
|
13
|
-
if (-parseInt(r(312)) / 1 + -parseInt(r(300)) / 2 * (parseInt(r(310)) / 3) + -parseInt(r(304)) / 4 + parseInt(r(317)) / 5 + -parseInt(r(311)) / 6 + -parseInt(r(316)) / 7 * (parseInt(r(301)) / 8) + parseInt(r(305)) / 9 === n) break;
|
|
14
|
-
i.push(i.shift());
|
|
15
|
-
} catch {
|
|
16
|
-
i.push(i.shift());
|
|
17
|
-
}
|
|
18
|
-
})(n, 566996);
|
|
19
|
-
var r = Object[t(322)], i = Object[t(313)], a = Object.getOwnPropertyDescriptor, o = Object[t(320)], s = Object[t(298)], c = Object[t(299)][t(308)], l = (e, n) => () => (n || e((n = { exports: {} })[t(318)], n), n[t(318)]), u = (e, n) => {
|
|
20
|
-
var r = t, a = {
|
|
21
|
-
UcVdm: function(e, t, n, r) {
|
|
22
|
-
return e(t, n, r);
|
|
23
|
-
},
|
|
24
|
-
tGkWM: r(325)
|
|
25
|
-
};
|
|
26
|
-
let o = {};
|
|
27
|
-
for (var s in e) a.UcVdm(i, o, s, {
|
|
28
|
-
get: e[s],
|
|
29
|
-
enumerable: !0
|
|
30
|
-
});
|
|
31
|
-
return !n && a[r(307)](i, o, Symbol[r(315)], { value: a[r(309)] }), o;
|
|
32
|
-
}, d = (e, n, r, s) => {
|
|
33
|
-
var l = t, u = {
|
|
34
|
-
gqkGJ: function(e, t) {
|
|
35
|
-
return e === t;
|
|
36
|
-
},
|
|
37
|
-
KkMWB: l(323),
|
|
38
|
-
YKlim: function(e, t) {
|
|
39
|
-
return e(t);
|
|
40
|
-
},
|
|
41
|
-
qKwtb: function(e, t) {
|
|
42
|
-
return e < t;
|
|
43
|
-
},
|
|
44
|
-
JvObn: function(e, t, n) {
|
|
45
|
-
return e(t, n);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
if (n && typeof n == "object" || u[l(321)](typeof n, u.KkMWB)) for (var d = u[l(326)](o, n), f = 0, p = d.length, m; u.qKwtb(f, p); f++) m = d[f], !c[l(324)](e, m) && m !== r && i(e, m, {
|
|
49
|
-
get: ((e) => n[e])[l(306)](null, m),
|
|
50
|
-
enumerable: !(s = u[l(314)](a, n, m)) || s[l(319)]
|
|
51
|
-
});
|
|
52
|
-
return e;
|
|
53
|
-
}, f = (e, n, a) => (a = e == null ? {} : r(s(e)), d(n || !e || !e[t(302)] ? i(a, t(303), {
|
|
54
|
-
value: e,
|
|
55
|
-
enumerable: !0
|
|
56
|
-
}) : a, e));
|
|
57
|
-
export { u as n, f as r, l as t };
|