quickvo-sdk-js 1.6.73 → 1.6.75
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-D-qeoo7L.js +66 -0
- package/dist/index.js +17199 -16680
- package/dist/index.umd.cjs +3 -3
- package/dist/lib-LPJkXkDo.js +11254 -0
- package/dist/src/QuickVO.d.ts +85 -0
- package/dist/src/action/ActionSFU.d.ts +3 -1
- package/dist/src/base/modules/Notifys.d.ts +1 -1
- package/dist/src/base/modules/Peer.d.ts +1 -0
- package/dist/src/base/modules/users/modules/LocalUser.d.ts +1 -0
- package/dist/src/base/modules/users/modules/RemoteUser.d.ts +1 -0
- package/dist/src/base/modules/users/modules/UserBase.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-BXUcB7os.js +0 -58
- package/dist/lib-9TnBQie8.js +0 -11083
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { QuickOptions } from './types';
|
|
2
|
+
export declare class QuickVO {
|
|
3
|
+
static version: string;
|
|
4
|
+
private _base;
|
|
5
|
+
/** 监听注册顺序:Base → ActionBase → ActionSFU → ActionP2P;同名 cws.on.* 以后构造者为准(房间/进房等由 ActionSFU 注册) */
|
|
6
|
+
private _ACTION_BASE;
|
|
7
|
+
private _ACTION_SFU;
|
|
8
|
+
private _ACTION_P2P;
|
|
9
|
+
constructor(options: QuickOptions);
|
|
10
|
+
recorder: import('./base/modules/StreamRecorder').StreamRecorder;
|
|
11
|
+
use: ({ rnnoise }: {
|
|
12
|
+
rnnoise?: import('./base/Base').PrRnnoise;
|
|
13
|
+
}) => void;
|
|
14
|
+
setCallStrategy: (callStrategy: import('./enums').K_callStrategy, mediaTypes?: import('./enums').K_mediaType[]) => Promise<void>;
|
|
15
|
+
addNotify: (notify: import('./base/modules/Notifys').QuickvoNotify) => string;
|
|
16
|
+
setOptions: (options: Partial<QuickOptions & import('./types').RoomOptions>) => void;
|
|
17
|
+
getLocalStream: (mediaType: import('./enums').K_mediaType) => MediaStream;
|
|
18
|
+
getLocalStreams: () => {
|
|
19
|
+
mc_audio: MediaStream;
|
|
20
|
+
mc_video: MediaStream;
|
|
21
|
+
ss_video: MediaStream;
|
|
22
|
+
ss_audio: MediaStream;
|
|
23
|
+
};
|
|
24
|
+
setActiveNoise: (mediaType: import('./enums').K_mediaType, state: boolean) => void;
|
|
25
|
+
hasPermissions: (type: "subscribe" | "publish") => boolean;
|
|
26
|
+
getUserContent: (userId?: string) => import('./base/modules/users/modules/LocalUser').LocalUser | import('./base/modules/users/modules/RemoteUser').RemoteUser | undefined;
|
|
27
|
+
getUserStream: (userId: string, mediaType: import('./enums').K_mediaType) => MediaStream | undefined;
|
|
28
|
+
getVolume: (userId: string, mediaType: import('./enums').K_mediaType) => number | undefined;
|
|
29
|
+
getMaxVolumeUser: () => {
|
|
30
|
+
id: string;
|
|
31
|
+
volume: number;
|
|
32
|
+
} | undefined;
|
|
33
|
+
setInputVolume: (userId: string, mediaType: import('./enums').K_mediaType, gain: number) => void;
|
|
34
|
+
setEnhanceGain: (userId: string, mediaType: import('./enums').K_mediaType, gain: number) => Promise<void>;
|
|
35
|
+
setSpeakerVolume: (userId: string, mediaType: import('./enums').K_mediaType, gain: number) => void;
|
|
36
|
+
getUserAudioMediaStreamContext: (userId: string, mediaType: import('./enums').K_mediaType) => import('pr-audio-stream').PrAudioStream | undefined;
|
|
37
|
+
playBgs: (userId: string, mediaType: import('./enums').K_mediaType, buffer: AudioBuffer | null) => Promise<void>;
|
|
38
|
+
changBgsMix: (userId: string, mediaType: import('./enums').K_mediaType, mix: boolean) => Promise<void>;
|
|
39
|
+
stopBgs: (userId: string, mediaType: import('./enums').K_mediaType) => Promise<void>;
|
|
40
|
+
setBgsGain: (userId: string, mediaType: import('./enums').K_mediaType, gain: number) => Promise<void>;
|
|
41
|
+
playBgm: (userId: string, mediaType: import('./enums').K_mediaType, buffer: AudioBuffer | null) => Promise<void>;
|
|
42
|
+
changBgmMix: (userId: string, mediaType: import('./enums').K_mediaType, mix: boolean) => Promise<void>;
|
|
43
|
+
stopBgm: (userId: string, mediaType: import('./enums').K_mediaType) => Promise<void>;
|
|
44
|
+
setBgmGain: (userId: string, mediaType: import('./enums').K_mediaType, gain: number) => Promise<void>;
|
|
45
|
+
getEnumerateDevices: (mediaDeviceKind: MediaDeviceKind) => Promise<import('./types').DeviceInfo[]>;
|
|
46
|
+
getMediaDeviceKind: (mediaDeviceKind: MediaDeviceKind) => string | undefined;
|
|
47
|
+
getMediaDevicesErrInfo: () => Promise<{
|
|
48
|
+
mc_audio: string;
|
|
49
|
+
mc_video: string;
|
|
50
|
+
}>;
|
|
51
|
+
setLocalStream: (mediaTypes: import('./enums').K_mediaType[], active: boolean) => Promise<void>;
|
|
52
|
+
setMediaDeviceKind: (mediaDeviceKind: MediaDeviceKind, deviceId: string | undefined) => Promise<void>;
|
|
53
|
+
setMediaTrackConstraints: (mediaType: import('./enums').K_mediaType, constraints: MediaTrackConstraints) => Promise<void>;
|
|
54
|
+
earlyConnect: (entirely?: boolean) => Promise<true | undefined>;
|
|
55
|
+
joinRoom: (roomOptions: import('./types').RoomOptions) => Promise<string>;
|
|
56
|
+
publish: (mediaTypes: import('./enums').K_mediaType[]) => Promise<true>;
|
|
57
|
+
stopPublish: (mediaTypes: import('./enums').K_mediaType[]) => Promise<true>;
|
|
58
|
+
subscribe: (usersMediaTypes?: import('./types').UserMediaTypes[]) => Promise<true | undefined>;
|
|
59
|
+
stopSubscribe: (usersMediaTypes?: import('./types').UserMediaTypes[]) => Promise<true | undefined>;
|
|
60
|
+
setBehaviors: (usersBehaviors: Array<{
|
|
61
|
+
id: string;
|
|
62
|
+
behaviors: { [key in import('./enums').K_mediaType]?: boolean; };
|
|
63
|
+
}>) => Promise<import('./protos/protoEvent').MessageRsp<"preventUsersBehavior">>;
|
|
64
|
+
updateSimulcast: (simulcast: "f" | "h" | "q") => Promise<void>;
|
|
65
|
+
toggleRoomSpeechLang: (data: {
|
|
66
|
+
input: string;
|
|
67
|
+
output: string;
|
|
68
|
+
translateEnable?: boolean;
|
|
69
|
+
}) => void;
|
|
70
|
+
updateToken: (sdkToken: string) => void;
|
|
71
|
+
quitRoom: () => Promise<string>;
|
|
72
|
+
quitRoomEx: () => Promise<string>;
|
|
73
|
+
destroy: () => Promise<void>;
|
|
74
|
+
addRequestAnimationFrame: (key: string, func: FrameRequestCallback, options?: {
|
|
75
|
+
fps?: number;
|
|
76
|
+
}) => void;
|
|
77
|
+
clearRequestAnimationFrame: (keys?: string[]) => void;
|
|
78
|
+
getLocalUserTrackReports: (mediaType: import('./enums').K_mediaType) => import('./types').TrackReport;
|
|
79
|
+
getRemoteUserTrackReports: (userId: string, origin: "sfu" | "p2p", direction: "sends" | "recvs", mediaType: import('./enums').K_mediaType) => import('./types').TrackReport | undefined;
|
|
80
|
+
getRoomAction: () => number;
|
|
81
|
+
_openP2P: (remoteUserId: string, mediaTypes: import('./enums').K_mediaType[], isRemotePush: boolean) => Promise<void>;
|
|
82
|
+
_restoreRoom: () => Promise<void>;
|
|
83
|
+
_debugger: () => Promise<void>;
|
|
84
|
+
_ai: () => Promise<void>;
|
|
85
|
+
}
|
|
@@ -4,6 +4,7 @@ import { Base } from '../base/Base';
|
|
|
4
4
|
export declare class ActionSFU {
|
|
5
5
|
base: Base;
|
|
6
6
|
private _onOnline?;
|
|
7
|
+
private _entirely;
|
|
7
8
|
private _reconnectTimerId?;
|
|
8
9
|
/** 网络计算是否进行中,用于避免与 interval 重叠执行 */
|
|
9
10
|
private _networkCalculating;
|
|
@@ -50,7 +51,7 @@ export declare class ActionSFU {
|
|
|
50
51
|
* earlyConnect
|
|
51
52
|
* @param mediaTypes ("mc_audio" | "mc_video" | "ss_video" | "ss_audio")[]
|
|
52
53
|
*/
|
|
53
|
-
earlyConnect: () => Promise<true | undefined>;
|
|
54
|
+
earlyConnect: (entirely?: boolean) => Promise<true | undefined>;
|
|
54
55
|
/**
|
|
55
56
|
* joinRoom
|
|
56
57
|
* @param roomOptions RoomOptions
|
|
@@ -136,6 +137,7 @@ export declare class ActionSFU {
|
|
|
136
137
|
private _reportNetwork;
|
|
137
138
|
private _createTracks;
|
|
138
139
|
private _closeTrack;
|
|
140
|
+
private _restorePublish;
|
|
139
141
|
private _pubNotify;
|
|
140
142
|
private _submitRtcStats;
|
|
141
143
|
private _renegotiate;
|
|
@@ -37,6 +37,7 @@ export declare class Peer {
|
|
|
37
37
|
private static rtcConfigurationFromTurnRsp;
|
|
38
38
|
setBroadcasted: (mediaTypes: K_mediaType[], active: boolean) => void;
|
|
39
39
|
getNoBroadcasted: (mediaTypes: K_mediaType[]) => ("mc_audio" | "mc_video" | "ss_video" | "ss_audio")[];
|
|
40
|
+
getBroadcasted: (mediaTypes: K_mediaType[]) => ("mc_audio" | "mc_video" | "ss_video" | "ss_audio")[];
|
|
40
41
|
checkValid: () => boolean;
|
|
41
42
|
/**
|
|
42
43
|
* setRTCRtpSenderParameters
|
|
@@ -102,6 +102,7 @@ export declare class UserBase {
|
|
|
102
102
|
getTrack: (mediaType: K_mediaType) => UserTrack | undefined;
|
|
103
103
|
getTracks: (mediaTypes: K_mediaType[]) => UserTrack[];
|
|
104
104
|
removeTracks: (mediaTypes: K_mediaType[]) => UserTrack[];
|
|
105
|
+
getTracksMid: (mediaTypes: K_mediaType[]) => string[];
|
|
105
106
|
replaceMediaStreamTrack: (mediaType: K_mediaType, track: MediaStreamTrack) => void;
|
|
106
107
|
getStream: (mediaType: K_mediaType) => MediaStream;
|
|
107
108
|
getStreams: () => {
|
package/package.json
CHANGED
package/dist/chunk-BXUcB7os.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var e = t;
|
|
2
|
-
(function(e, n) {
|
|
3
|
-
for (var r = t, i = e();;) try {
|
|
4
|
-
if (parseInt(r(504)) / 1 * (parseInt(r(495)) / 2) + parseInt(r(492)) / 3 + -parseInt(r(502)) / 4 + -parseInt(r(494)) / 5 * (parseInt(r(501)) / 6) + parseInt(r(490)) / 7 * (-parseInt(r(493)) / 8) + parseInt(r(505)) / 9 * (parseInt(r(487)) / 10) + -parseInt(r(514)) / 11 * (parseInt(r(499)) / 12) === n) break;
|
|
5
|
-
i.push(i.shift());
|
|
6
|
-
} catch {
|
|
7
|
-
i.push(i.shift());
|
|
8
|
-
}
|
|
9
|
-
})(f, 700518);
|
|
10
|
-
function t(e, t) {
|
|
11
|
-
return e -= 487, f()[e];
|
|
12
|
-
}
|
|
13
|
-
var n = Object[e(512)], r = Object.defineProperty, i = Object[e(511)], a = Object.getOwnPropertyNames, o = Object[e(510)], s = Object[e(491)][e(500)], c = (t, n) => () => (n || t((n = { exports: {} })[e(508)], n), n[e(508)]), l = (t, n) => {
|
|
14
|
-
var i = e, a = { PNuLI: function(e, t, n, r) {
|
|
15
|
-
return e(t, n, r);
|
|
16
|
-
} };
|
|
17
|
-
let o = {};
|
|
18
|
-
for (var s in t) a.PNuLI(r, o, s, {
|
|
19
|
-
get: t[s],
|
|
20
|
-
enumerable: !0
|
|
21
|
-
});
|
|
22
|
-
return !n && r(o, Symbol[i(488)], { value: i(515) }), o;
|
|
23
|
-
}, u = (t, n, o, c) => {
|
|
24
|
-
var l = e, u = {
|
|
25
|
-
dXyrC: function(e, t) {
|
|
26
|
-
return e === t;
|
|
27
|
-
},
|
|
28
|
-
okvMu: l(516),
|
|
29
|
-
jllgt: l(496),
|
|
30
|
-
ugpXy: function(e, t) {
|
|
31
|
-
return e < t;
|
|
32
|
-
},
|
|
33
|
-
hfZUc: function(e, t) {
|
|
34
|
-
return e !== t;
|
|
35
|
-
},
|
|
36
|
-
rPOIK: function(e, t, n, r) {
|
|
37
|
-
return e(t, n, r);
|
|
38
|
-
},
|
|
39
|
-
dKEfw: function(e, t, n) {
|
|
40
|
-
return e(t, n);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
if (n && u[l(503)](typeof n, u[l(517)]) || u[l(503)](typeof n, u[l(506)])) for (var d = a(n), f = 0, p = d.length, m; u[l(513)](f, p); f++) m = d[f], !s[l(509)](t, m) && u[l(489)](m, o) && u[l(497)](r, t, m, {
|
|
44
|
-
get: ((e) => n[e])[l(507)](null, m),
|
|
45
|
-
enumerable: !(c = u.dKEfw(i, n, m)) || c[l(498)]
|
|
46
|
-
});
|
|
47
|
-
return t;
|
|
48
|
-
}, d = (e, t, i) => (i = e == null ? {} : n(o(e)), u(t || !e || !e.__esModule ? r(i, "default", {
|
|
49
|
-
value: e,
|
|
50
|
-
enumerable: !0
|
|
51
|
-
}) : i, e));
|
|
52
|
-
export { l as n, d as r, c as t };
|
|
53
|
-
function f() {
|
|
54
|
-
var e = /* @__PURE__ */ "2819540AADJFa.dXyrC.4LJgLhz.9uryspy.jllgt.bind.exports.call.getPrototypeOf.getOwnPropertyDescriptor.create.ugpXy.1569326SJzxFD.Module.object.okvMu.10654470NJCMQq.toStringTag.hfZUc.16562mGFzzt.prototype.3892716AUcQjM.16TRkdFV.852570OrQULR.393478wpNwsT.function.rPOIK.enumerable.132rpINHX.hasOwnProperty.6vHVPbx".split(".");
|
|
55
|
-
return f = function() {
|
|
56
|
-
return e;
|
|
57
|
-
}, f();
|
|
58
|
-
}
|