@realsee/live 0.6.3 → 0.6.4
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/index.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +342 -310
- package/dist/index.es.js.map +1 -1
- package/dist/rtc/BrowserRTC4Chime.d.ts +6 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BrowserRTC4Chime.html +87 -29
- package/package.json +3 -2
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var At = Object.defineProperty;
|
|
2
2
|
var Dt = (t, s, e) => s in t ? At(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
3
3
|
var o = (t, s, e) => (Dt(t, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
-
import
|
|
4
|
+
import Mt from "@realsee/jsbridge-x";
|
|
5
5
|
import ke from "trtc-js-sdk";
|
|
6
|
-
import { ConsoleLogger as
|
|
6
|
+
import { ConsoleLogger as Vt, LogLevel as $t, DefaultDeviceController as xt, MeetingSessionConfiguration as Ut, DefaultMeetingSession as Bt, DefaultModality as et, MeetingSessionStatusCode as Wt } from "amazon-chime-sdk-js";
|
|
7
7
|
import V, { createContext as Ft } from "react";
|
|
8
8
|
const oe = Symbol("$$REALSEE_LIVE_EVENT$$");
|
|
9
9
|
function ge(t) {
|
|
@@ -80,8 +80,8 @@ class ae {
|
|
|
80
80
|
let n = !1;
|
|
81
81
|
const a = ge(this)[s] || [];
|
|
82
82
|
for (let u of a.slice()) {
|
|
83
|
-
const [f,
|
|
84
|
-
|
|
83
|
+
const [f, _ = !1] = u, g = f(...e);
|
|
84
|
+
_ && this.off(s, f), g === !1 && (n = !0);
|
|
85
85
|
}
|
|
86
86
|
return n;
|
|
87
87
|
}
|
|
@@ -108,7 +108,7 @@ const Kt = () => {
|
|
|
108
108
|
info: Gt,
|
|
109
109
|
error: Ht,
|
|
110
110
|
warn: Jt
|
|
111
|
-
},
|
|
111
|
+
}, T = zt;
|
|
112
112
|
function X() {
|
|
113
113
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
114
114
|
}
|
|
@@ -173,8 +173,8 @@ class tt extends De {
|
|
|
173
173
|
u.id = a, this.$dom.appendChild(u), typeof this._autoPlayConfirm == "function" ? (n.play(a).catch((f) => {
|
|
174
174
|
}), n.on("error", (f) => {
|
|
175
175
|
if (f.getCode() === 16451) {
|
|
176
|
-
const
|
|
177
|
-
this._autoPlayConfirm({ onConfirm:
|
|
176
|
+
const g = () => n.resume();
|
|
177
|
+
this._autoPlayConfirm({ onConfirm: g });
|
|
178
178
|
}
|
|
179
179
|
})) : n.play(a);
|
|
180
180
|
});
|
|
@@ -194,7 +194,7 @@ class tt extends De {
|
|
|
194
194
|
const n = { audio: !0, video: !1 };
|
|
195
195
|
try {
|
|
196
196
|
navigator.mediaDevices.getUserMedia(n).then(() => e(!0)).catch((i) => {
|
|
197
|
-
|
|
197
|
+
T.error(i.message), e(!1);
|
|
198
198
|
});
|
|
199
199
|
} catch (i) {
|
|
200
200
|
console.error(i), e(!1);
|
|
@@ -216,9 +216,9 @@ class tt extends De {
|
|
|
216
216
|
"audio-volume",
|
|
217
217
|
(u) => this.emit(
|
|
218
218
|
"userVolumes",
|
|
219
|
-
u.result.map(({ userId: f, audioVolume:
|
|
219
|
+
u.result.map(({ userId: f, audioVolume: _ }) => ({
|
|
220
220
|
userId: f,
|
|
221
|
-
audioVolume:
|
|
221
|
+
audioVolume: _
|
|
222
222
|
}))
|
|
223
223
|
)
|
|
224
224
|
), (a = this._trtc.client) == null || a.on("error", (u) => this.emit("error", u));
|
|
@@ -239,9 +239,11 @@ class rt extends De {
|
|
|
239
239
|
o(this, "audioOutput");
|
|
240
240
|
o(this, "deviceChangeObserver", {});
|
|
241
241
|
o(this, "audioVideoObserver", {});
|
|
242
|
+
o(this, "audioMixObserver");
|
|
242
243
|
o(this, "_getVoiceSign", () => {
|
|
243
244
|
throw new Error("方法 getVoiceSign 未实现");
|
|
244
245
|
});
|
|
246
|
+
o(this, "_autoPlayConfirm");
|
|
245
247
|
o(this, "$dom", document.createElement("div"));
|
|
246
248
|
o(this, "$audio", document.createElement("audio"));
|
|
247
249
|
/**
|
|
@@ -281,52 +283,67 @@ class rt extends De {
|
|
|
281
283
|
audioVideoDidStartConnecting: (e) => {
|
|
282
284
|
e && this.logger.info("Attempting to reconnect");
|
|
283
285
|
}
|
|
286
|
+
}, this.audioMixObserver = {
|
|
287
|
+
meetingAudioStreamBecameActive: (e) => {
|
|
288
|
+
if (this.$audio.paused) {
|
|
289
|
+
const n = () => this.$audio.play().then(() => {
|
|
290
|
+
}).catch((i) => {
|
|
291
|
+
if (T.error("播放远端流失败!", i), typeof this._autoPlayConfirm == "function") {
|
|
292
|
+
const a = () => n();
|
|
293
|
+
this._autoPlayConfirm({ onConfirm: a });
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
n();
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
meetingAudioStreamBecameInactive: (e) => {
|
|
300
|
+
}
|
|
284
301
|
};
|
|
285
302
|
});
|
|
286
303
|
/**
|
|
287
304
|
* 注册rtc事件
|
|
288
305
|
*/
|
|
289
306
|
o(this, "_registerRtcEvent", () => {
|
|
290
|
-
var n, i, a, u, f,
|
|
307
|
+
var n, i, a, u, f, _;
|
|
291
308
|
const e = ((a = (i = (n = this.meetingSession) == null ? void 0 : n.configuration) == null ? void 0 : i.credentials) == null ? void 0 : a.attendeeId) || "";
|
|
292
309
|
if (e) {
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
return
|
|
296
|
-
|
|
297
|
-
userId:
|
|
298
|
-
volume:
|
|
310
|
+
const g = /* @__PURE__ */ new Map(), v = () => {
|
|
311
|
+
const p = [];
|
|
312
|
+
return g.forEach((S, m) => {
|
|
313
|
+
p.push({
|
|
314
|
+
userId: S.userId,
|
|
315
|
+
volume: S.muted || S.signalStrength === 0 || !Boolean(S.volume) ? 0 : S.volume
|
|
299
316
|
});
|
|
300
|
-
}),
|
|
317
|
+
}), p;
|
|
301
318
|
};
|
|
302
319
|
(u = this.meetingSession) == null || u.audioVideo.realtimeSubscribeToAttendeeIdPresence(
|
|
303
|
-
(
|
|
320
|
+
(p, S, m) => {
|
|
304
321
|
var A;
|
|
305
|
-
if (!
|
|
306
|
-
|
|
322
|
+
if (!S) {
|
|
323
|
+
g.delete(p), this.emit("userVolumes", v());
|
|
307
324
|
return;
|
|
308
325
|
}
|
|
309
326
|
(A = this.meetingSession) == null || A.audioVideo.realtimeSubscribeToVolumeIndicator(
|
|
310
|
-
|
|
311
|
-
(
|
|
312
|
-
new et(
|
|
313
|
-
userId: m ||
|
|
314
|
-
volume:
|
|
327
|
+
p,
|
|
328
|
+
(w, P, H, J) => {
|
|
329
|
+
new et(w).base() === w && (g.set(w, {
|
|
330
|
+
userId: m || w,
|
|
331
|
+
volume: P,
|
|
315
332
|
muted: H,
|
|
316
333
|
signalStrength: J
|
|
317
|
-
}), this.emit("userVolumes",
|
|
334
|
+
}), this.emit("userVolumes", v()));
|
|
318
335
|
}
|
|
319
336
|
);
|
|
320
337
|
}
|
|
321
338
|
), (f = this.meetingSession) == null || f.audioVideo.realtimeSubscribeToVolumeIndicator(
|
|
322
339
|
e,
|
|
323
|
-
(
|
|
324
|
-
new et(
|
|
340
|
+
(p, S, m, A) => {
|
|
341
|
+
new et(p).base() === p && A !== null && A !== 1 && this.emit("weakNetwork");
|
|
325
342
|
}
|
|
326
|
-
), (
|
|
343
|
+
), (_ = this.meetingSession) == null || _.audioVideo.realtimeSubscribeToFatalError((p) => this.emit("error", p));
|
|
327
344
|
}
|
|
328
345
|
});
|
|
329
|
-
this._getVoiceSign = e.getVoiceSign, this._initDom(), this.logger = new
|
|
346
|
+
this._getVoiceSign = e.getVoiceSign, this._autoPlayConfirm = e.autoPlayConfirm, this._initDom(), this.logger = new Vt("WebRTCLogger", e.logLevel || $t.INFO), this.deviceController = new xt(this.logger), this.initObservers();
|
|
330
347
|
}
|
|
331
348
|
/**
|
|
332
349
|
* 加入语音会议
|
|
@@ -335,45 +352,60 @@ class rt extends De {
|
|
|
335
352
|
*/
|
|
336
353
|
async join(e) {
|
|
337
354
|
return new Promise(async (n, i) => {
|
|
338
|
-
var a;
|
|
355
|
+
var a, u;
|
|
339
356
|
this.emit("joinWillStart");
|
|
340
357
|
try {
|
|
341
|
-
const { sdkAppId:
|
|
358
|
+
const { sdkAppId: f, userId: _, roomId: g, userSig: v } = await this._getVoiceSign({
|
|
342
359
|
...e,
|
|
343
360
|
roomId: e.roomId || 0
|
|
344
361
|
});
|
|
345
|
-
this.userId =
|
|
346
|
-
const { attendence:
|
|
347
|
-
decodeURIComponent(
|
|
348
|
-
),
|
|
362
|
+
this.userId = _;
|
|
363
|
+
const { attendence: p, vendor_wrapper: S } = JSON.parse(
|
|
364
|
+
decodeURIComponent(v)
|
|
365
|
+
), m = new Ut(
|
|
349
366
|
{
|
|
350
|
-
Meeting:
|
|
367
|
+
Meeting: S
|
|
351
368
|
},
|
|
352
369
|
{
|
|
353
370
|
Attendee: {
|
|
354
|
-
ExternalUserId:
|
|
355
|
-
AttendeeId:
|
|
356
|
-
JoinToken:
|
|
371
|
+
ExternalUserId: p.external_user_id,
|
|
372
|
+
AttendeeId: p.attendee_id,
|
|
373
|
+
JoinToken: p.join_token
|
|
357
374
|
}
|
|
358
375
|
}
|
|
359
376
|
);
|
|
360
|
-
this.meetingSession = new Bt(
|
|
361
|
-
const
|
|
377
|
+
this.meetingSession = new Bt(m, this.logger, this.deviceController), this._registerRtcEvent(), this.meetingSession.audioVideo.addDeviceChangeObserver(this.deviceChangeObserver), this.meetingSession.audioVideo.addObserver(this.audioVideoObserver), this.meetingSession.audioVideo.bindAudioElement(this.$audio);
|
|
378
|
+
const A = {
|
|
362
379
|
audioVideoDidStart: () => {
|
|
363
|
-
var
|
|
364
|
-
(
|
|
380
|
+
var w;
|
|
381
|
+
(w = this.meetingSession) == null || w.audioVideo.realtimeMuteLocalAudio(), this.joined = !0, this.emit("joined"), n(!0);
|
|
365
382
|
},
|
|
366
383
|
audioVideoDidStop: () => {
|
|
367
384
|
this.joined = !1, n(!1);
|
|
368
385
|
}
|
|
369
386
|
};
|
|
370
|
-
this.meetingSession.audioVideo.addObserver(
|
|
387
|
+
this.meetingSession.audioVideo.addObserver(A), this.audioMixObserver && this.meetingSession.audioVideo.addAudioMixObserver(this.audioMixObserver), this.meetingSession.audioVideo.setDeviceLabelTrigger(
|
|
371
388
|
async () => await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 })
|
|
372
389
|
);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
try {
|
|
391
|
+
const w = await this.meetingSession.audioVideo.listAudioInputDevices();
|
|
392
|
+
T.info("audioInputDevices ===>", w);
|
|
393
|
+
const P = ((a = w[0]) == null ? void 0 : a.deviceId) || "default";
|
|
394
|
+
await this.meetingSession.audioVideo.startAudioInput(P);
|
|
395
|
+
} catch (w) {
|
|
396
|
+
T.error(`设置语音输入设备失败:${w.message}`);
|
|
397
|
+
}
|
|
398
|
+
try {
|
|
399
|
+
const w = await this.meetingSession.audioVideo.listAudioOutputDevices();
|
|
400
|
+
T.info("audioOutputDevices ===>", w);
|
|
401
|
+
const P = ((u = w[0]) == null ? void 0 : u.deviceId) || "default";
|
|
402
|
+
await this.meetingSession.audioVideo.chooseAudioOutput(P);
|
|
403
|
+
} catch (w) {
|
|
404
|
+
T.error(`设置语音输出设备失败:${w.message}`);
|
|
405
|
+
}
|
|
406
|
+
this.meetingSession.audioVideo.start();
|
|
407
|
+
} catch (f) {
|
|
408
|
+
this.emit("error", f), this.logger.error(f.message), n(!1);
|
|
377
409
|
}
|
|
378
410
|
});
|
|
379
411
|
}
|
|
@@ -383,9 +415,9 @@ class rt extends De {
|
|
|
383
415
|
this.joined = !1;
|
|
384
416
|
const i = {
|
|
385
417
|
audioVideoDidStop: async (f) => {
|
|
386
|
-
var
|
|
387
|
-
const
|
|
388
|
-
(
|
|
418
|
+
var g;
|
|
419
|
+
const _ = f.statusCode();
|
|
420
|
+
(g = this.meetingSession) == null || g.deviceController.destroy(), _ === Wt.Left ? (this.logger.info("You left the session"), e(!0)) : (this.logger.info(`Stopped with a session status code: ${_}`), e(!0));
|
|
389
421
|
}
|
|
390
422
|
};
|
|
391
423
|
(a = this.meetingSession) == null || a.audioVideo.addObserver(i), (u = this.meetingSession) == null || u.audioVideo.stop();
|
|
@@ -565,14 +597,14 @@ function ur(t, s) {
|
|
|
565
597
|
function lr(t, s) {
|
|
566
598
|
return Ee(t, s) ? !0 : ve(t) && ve(s) ? cr(t, s) : Array.isArray(t) && Array.isArray(s) ? ur(t, s) : !1;
|
|
567
599
|
}
|
|
568
|
-
function
|
|
600
|
+
function Me(t, s) {
|
|
569
601
|
return Ee(t, s) ? !0 : ve(t) && ve(s) ? dr(t, s) : Array.isArray(t) && Array.isArray(s) ? fr(t, s) : !1;
|
|
570
602
|
}
|
|
571
603
|
function fr(t, s) {
|
|
572
604
|
if (t.length !== s.length)
|
|
573
605
|
return !1;
|
|
574
606
|
for (let e = 0, n = t.length; e < n; e++)
|
|
575
|
-
if (!
|
|
607
|
+
if (!Me(t[e], s[e]))
|
|
576
608
|
return !1;
|
|
577
609
|
return !0;
|
|
578
610
|
}
|
|
@@ -582,13 +614,13 @@ function dr(t, s) {
|
|
|
582
614
|
return !1;
|
|
583
615
|
for (let i = 0, a = e.length; i < a; i++) {
|
|
584
616
|
const u = e[i];
|
|
585
|
-
if (!
|
|
617
|
+
if (!Me(t[u], s[u]))
|
|
586
618
|
return !1;
|
|
587
619
|
}
|
|
588
620
|
return !0;
|
|
589
621
|
}
|
|
590
622
|
function st(t, s, e = { deep: !1 }) {
|
|
591
|
-
return e.deep ?
|
|
623
|
+
return e.deep ? Me(t, s) : lr(t, s);
|
|
592
624
|
}
|
|
593
625
|
class hr extends ae {
|
|
594
626
|
constructor(e) {
|
|
@@ -856,7 +888,7 @@ class _r extends ae {
|
|
|
856
888
|
* @param event
|
|
857
889
|
*/
|
|
858
890
|
o(this, "_handleCloseEvent", (e) => {
|
|
859
|
-
|
|
891
|
+
T.info(
|
|
860
892
|
`live room closed bacause of ${e.code}-${e.reason || tr(e.code)}`
|
|
861
893
|
), this.state = x.CLOSED;
|
|
862
894
|
});
|
|
@@ -865,21 +897,21 @@ class _r extends ae {
|
|
|
865
897
|
*/
|
|
866
898
|
o(this, "_handleClosingEvent", () => {
|
|
867
899
|
var e;
|
|
868
|
-
|
|
900
|
+
T.info("live room is closing, onLine:", (e = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : e.onLine), this.state = x.CLOSED;
|
|
869
901
|
});
|
|
870
902
|
/**
|
|
871
903
|
* 连接中
|
|
872
904
|
* @param event
|
|
873
905
|
*/
|
|
874
906
|
o(this, "_handleConnectingEvent", () => {
|
|
875
|
-
|
|
907
|
+
T.info("live room is connecting"), this.state = x.CONNECTING;
|
|
876
908
|
});
|
|
877
909
|
/**
|
|
878
910
|
* 连接发送异常
|
|
879
911
|
* @param event
|
|
880
912
|
*/
|
|
881
913
|
o(this, "_handleErrorEvent", (e) => {
|
|
882
|
-
|
|
914
|
+
T.error("live room error", e), this.state = x.CLOSED;
|
|
883
915
|
});
|
|
884
916
|
/**
|
|
885
917
|
* 接收到消息
|
|
@@ -900,14 +932,14 @@ class _r extends ae {
|
|
|
900
932
|
* @param event
|
|
901
933
|
*/
|
|
902
934
|
o(this, "_handleOpenEvent", (e) => {
|
|
903
|
-
|
|
935
|
+
T.info("live room open", e.detail), this.state = x.OPEN, e.detail.reconnects > 0 && this.emit("reconnected", e.detail);
|
|
904
936
|
});
|
|
905
937
|
/**
|
|
906
938
|
* 处理超时
|
|
907
939
|
* @param event
|
|
908
940
|
*/
|
|
909
941
|
o(this, "_handleTimeoutEvent", (e) => {
|
|
910
|
-
|
|
942
|
+
T.error("live room connect timeout!", e.detail), this.state = x.CLOSED;
|
|
911
943
|
});
|
|
912
944
|
/**
|
|
913
945
|
* 释放资源,释放之后需要重新实例化
|
|
@@ -1001,7 +1033,7 @@ class vr extends ae {
|
|
|
1001
1033
|
try {
|
|
1002
1034
|
return this._controller.sendMessage(i), !0;
|
|
1003
1035
|
} catch (a) {
|
|
1004
|
-
return
|
|
1036
|
+
return T.error(a), !1;
|
|
1005
1037
|
}
|
|
1006
1038
|
});
|
|
1007
1039
|
/**
|
|
@@ -1033,20 +1065,20 @@ class vr extends ae {
|
|
|
1033
1065
|
o(this, "_handleMessage", async (e) => {
|
|
1034
1066
|
var n, i, a, u, f;
|
|
1035
1067
|
if (typeof e == "object") {
|
|
1036
|
-
const { command:
|
|
1037
|
-
if (
|
|
1038
|
-
switch (
|
|
1068
|
+
const { command: _, data: g = {}, frontRequestId: v, code: p, message: S } = e;
|
|
1069
|
+
if (p === "SUCCESS")
|
|
1070
|
+
switch (_) {
|
|
1039
1071
|
case W.SelfUserInfo: {
|
|
1040
|
-
const m =
|
|
1072
|
+
const m = g;
|
|
1041
1073
|
st(this.selfInfo, m, { deep: !0 }) || (this._buildInData.selfInfo = m, this.emit(
|
|
1042
1074
|
"selfInfoUpdate",
|
|
1043
1075
|
this._buildInData.selfInfo,
|
|
1044
|
-
|
|
1076
|
+
v
|
|
1045
1077
|
));
|
|
1046
1078
|
break;
|
|
1047
1079
|
}
|
|
1048
1080
|
case W.RoomInfo: {
|
|
1049
|
-
const m =
|
|
1081
|
+
const m = g;
|
|
1050
1082
|
this._buildInData.roomInfo = Object.assign({}, m), this.emit(
|
|
1051
1083
|
"readyKeyframeSync",
|
|
1052
1084
|
m.last_frame || {}
|
|
@@ -1054,61 +1086,61 @@ class vr extends ae {
|
|
|
1054
1086
|
break;
|
|
1055
1087
|
}
|
|
1056
1088
|
case W.RTCInfo: {
|
|
1057
|
-
const { voice_id: m, type: A } =
|
|
1089
|
+
const { voice_id: m, type: A } = g;
|
|
1058
1090
|
if (this._buildInData.rtcInfo = { voiceId: m, type: A }, (n = this.$RTC) != null && n.joined)
|
|
1059
|
-
|
|
1091
|
+
T.warn("已加入语音房间,无需重复加入!");
|
|
1060
1092
|
else if (await ((u = this.$RTC) == null ? void 0 : u.join({
|
|
1061
1093
|
voiceId: m,
|
|
1062
1094
|
userId: ((i = this.selfInfo) == null ? void 0 : i.id) || "",
|
|
1063
1095
|
roomId: (a = this.roomInfo) == null ? void 0 : a.info.room_code,
|
|
1064
1096
|
type: A
|
|
1065
1097
|
}))) {
|
|
1066
|
-
const
|
|
1067
|
-
await this.toggleMicro(
|
|
1098
|
+
const P = (f = this._options.initialMicroStatus) != null ? f : Z.OPEN;
|
|
1099
|
+
await this.toggleMicro(P === Z.OPEN);
|
|
1068
1100
|
} else
|
|
1069
|
-
|
|
1101
|
+
T.error("加入语音房间失败");
|
|
1070
1102
|
break;
|
|
1071
1103
|
}
|
|
1072
1104
|
case W.UserList: {
|
|
1073
|
-
const m =
|
|
1074
|
-
this._buildInData.userList = m, this.emit("userListUpdate", this.userList,
|
|
1105
|
+
const m = g;
|
|
1106
|
+
this._buildInData.userList = m, this.emit("userListUpdate", this.userList, v);
|
|
1075
1107
|
break;
|
|
1076
1108
|
}
|
|
1077
1109
|
case W.CustomEvent: {
|
|
1078
|
-
const m =
|
|
1079
|
-
this.emit("broadcast", m,
|
|
1110
|
+
const m = g;
|
|
1111
|
+
this.emit("broadcast", m, v);
|
|
1080
1112
|
break;
|
|
1081
1113
|
}
|
|
1082
1114
|
case W.KeyframeSync: {
|
|
1083
|
-
const m =
|
|
1115
|
+
const m = g, A = Object.keys(
|
|
1084
1116
|
m
|
|
1085
1117
|
).reduce(
|
|
1086
|
-
(
|
|
1118
|
+
(w, P) => {
|
|
1087
1119
|
if (st(
|
|
1088
|
-
m[
|
|
1089
|
-
this._buildInData.keyframes[
|
|
1120
|
+
m[P],
|
|
1121
|
+
this._buildInData.keyframes[P],
|
|
1090
1122
|
{
|
|
1091
1123
|
deep: !0
|
|
1092
1124
|
}
|
|
1093
1125
|
))
|
|
1094
|
-
return
|
|
1126
|
+
return w;
|
|
1095
1127
|
const H = [
|
|
1096
|
-
m[
|
|
1097
|
-
this._buildInData.keyframes[
|
|
1098
|
-
|
|
1099
|
-
], J =
|
|
1128
|
+
m[P],
|
|
1129
|
+
this._buildInData.keyframes[P],
|
|
1130
|
+
v
|
|
1131
|
+
], J = P;
|
|
1100
1132
|
return this.keyframes.emit(
|
|
1101
1133
|
J,
|
|
1102
1134
|
...H
|
|
1103
|
-
), this._buildInData.keyframes[
|
|
1135
|
+
), this._buildInData.keyframes[P] = m[P], w[P] = m[P], w;
|
|
1104
1136
|
},
|
|
1105
1137
|
{}
|
|
1106
1138
|
);
|
|
1107
|
-
this.emit("keyframes", A,
|
|
1139
|
+
this.emit("keyframes", A, v);
|
|
1108
1140
|
break;
|
|
1109
1141
|
}
|
|
1110
1142
|
case W.BuiltinMsg: {
|
|
1111
|
-
const m =
|
|
1143
|
+
const m = g;
|
|
1112
1144
|
this.emit("builtinEvent", m), m.event_type === q.UserChange && this.emit("userChange", m), m.event_type === q.RoomChange && this.emit("roomChange", m), m.event_type === q.UserChange && m.action === G.UserMicroStatus && await this.toggleMicro(
|
|
1113
1145
|
m.data.status === Z.OPEN
|
|
1114
1146
|
), m.event_type === q.RoomChange && m.action === G.RoomClose && await this.exit();
|
|
@@ -1119,7 +1151,7 @@ class vr extends ae {
|
|
|
1119
1151
|
break;
|
|
1120
1152
|
}
|
|
1121
1153
|
default:
|
|
1122
|
-
console.warn("unknown command: ",
|
|
1154
|
+
console.warn("unknown command: ", _);
|
|
1123
1155
|
}
|
|
1124
1156
|
else
|
|
1125
1157
|
this.emit("error", e);
|
|
@@ -1137,8 +1169,8 @@ class vr extends ae {
|
|
|
1137
1169
|
* @returns
|
|
1138
1170
|
*/
|
|
1139
1171
|
o(this, "connect", async (e = {}) => {
|
|
1140
|
-
var u, f,
|
|
1141
|
-
if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (
|
|
1172
|
+
var u, f, _, g;
|
|
1173
|
+
if (this._options.url = (f = (u = e.url) != null ? u : this._options.url) != null ? f : "", this._options.getTicket = (_ = e.getTicket) != null ? _ : this._options.getTicket, this._options.initialMicroStatus = (g = e.rtcMicStatus) != null ? g : this._options.initialMicroStatus, !/^ws(s):\/\//.test(this._options.url) || typeof this._options.getTicket != "function")
|
|
1142
1174
|
return /^ws(s):\/\//.test(this._options.url) ? typeof this._options.getTicket != "function" ? new Error("getTicket muse be function") : !1 : new Error("Illegal realsee live room link");
|
|
1143
1175
|
const { force: n = !1 } = e;
|
|
1144
1176
|
if (this._options.rtc && !await this._options.rtc.detectMicro())
|
|
@@ -1148,8 +1180,8 @@ class vr extends ae {
|
|
|
1148
1180
|
if (n)
|
|
1149
1181
|
try {
|
|
1150
1182
|
await this._controller.close("force close by connect");
|
|
1151
|
-
} catch (
|
|
1152
|
-
console.warn(
|
|
1183
|
+
} catch (v) {
|
|
1184
|
+
console.warn(v);
|
|
1153
1185
|
}
|
|
1154
1186
|
else
|
|
1155
1187
|
return new Error("已有Live实例正在连接中,请勿重复连接!");
|
|
@@ -1171,7 +1203,7 @@ class vr extends ae {
|
|
|
1171
1203
|
try {
|
|
1172
1204
|
await ((e = this.$RTC) == null ? void 0 : e.quit());
|
|
1173
1205
|
} catch (n) {
|
|
1174
|
-
|
|
1206
|
+
T.warn(n);
|
|
1175
1207
|
}
|
|
1176
1208
|
return await this._controller.close();
|
|
1177
1209
|
});
|
|
@@ -1275,12 +1307,12 @@ class vr extends ae {
|
|
|
1275
1307
|
if (e.jsBridge)
|
|
1276
1308
|
return e.jsBridge;
|
|
1277
1309
|
if (e.useBuiltInJsBridge)
|
|
1278
|
-
return new
|
|
1310
|
+
return new Mt();
|
|
1279
1311
|
})(), this._options.getVoiceSign = (n = e.getVoiceSign) != null ? n : gr, this._options.autoPlayConfirm = e.autoPlayConfirm, this._options.rtc = (() => {
|
|
1280
1312
|
if (e.rtc)
|
|
1281
1313
|
return e.rtc;
|
|
1282
1314
|
if (e.rtcType)
|
|
1283
|
-
switch (e.getVoiceSign ||
|
|
1315
|
+
switch (e.getVoiceSign || T.error(
|
|
1284
1316
|
"GetVoiceSign method must be passed when using built-in RTC instances"
|
|
1285
1317
|
), e.rtcType) {
|
|
1286
1318
|
case Q.RealseeVRWebViewRTC: {
|
|
@@ -1289,7 +1321,7 @@ class vr extends ae {
|
|
|
1289
1321
|
jsBridge: this._options.jsBridge,
|
|
1290
1322
|
getVoiceSign: this._options.getVoiceSign
|
|
1291
1323
|
});
|
|
1292
|
-
|
|
1324
|
+
T.error(
|
|
1293
1325
|
"JsBridge instance must be passed when using built-in VRWebViewRTC instances"
|
|
1294
1326
|
);
|
|
1295
1327
|
return;
|
|
@@ -1300,19 +1332,19 @@ class vr extends ae {
|
|
|
1300
1332
|
logLevel: e.__debug__ ? it.DEBUG : it.INFO
|
|
1301
1333
|
});
|
|
1302
1334
|
case Q.RealseeBrowserRTC:
|
|
1303
|
-
return this._options.autoPlayConfirm ||
|
|
1335
|
+
return this._options.autoPlayConfirm || T.error(
|
|
1304
1336
|
"autoPlayConfirm method must be passed when using built-in RealseeBrowserRTC instances"
|
|
1305
1337
|
), new tt({
|
|
1306
1338
|
getVoiceSign: this._options.getVoiceSign,
|
|
1307
1339
|
autoPlayConfirm: this._options.autoPlayConfirm
|
|
1308
1340
|
});
|
|
1309
1341
|
default: {
|
|
1310
|
-
|
|
1342
|
+
T.error("unknown built-in RTC type");
|
|
1311
1343
|
return;
|
|
1312
1344
|
}
|
|
1313
1345
|
}
|
|
1314
1346
|
if (e.useBuiltInRTC) {
|
|
1315
|
-
if (e.getVoiceSign ||
|
|
1347
|
+
if (e.getVoiceSign || T.error(
|
|
1316
1348
|
"GetVoiceSign method must be passed when using built-in RTC instances"
|
|
1317
1349
|
), this._options.jsBridge)
|
|
1318
1350
|
return ar && (ir || sr) || or ? new nt({
|
|
@@ -1324,12 +1356,12 @@ class vr extends ae {
|
|
|
1324
1356
|
getVoiceSign: this._options.getVoiceSign,
|
|
1325
1357
|
autoPlayConfirm: this._options.autoPlayConfirm
|
|
1326
1358
|
});
|
|
1327
|
-
|
|
1359
|
+
T.error(
|
|
1328
1360
|
"jsBridge instance must be passed when using built-in RTC instances"
|
|
1329
1361
|
);
|
|
1330
1362
|
return;
|
|
1331
1363
|
}
|
|
1332
|
-
})(), this._options.rtc ||
|
|
1364
|
+
})(), this._options.rtc || T.warn("unused rtc"), this._options.url && this._options.getTicket && this.connect(), this._options.__debug__ && Object.assign(window, { $liveController: this._controller, $live: this });
|
|
1333
1365
|
}
|
|
1334
1366
|
get options() {
|
|
1335
1367
|
return Object.freeze(this._options || {});
|
|
@@ -1407,8 +1439,8 @@ class vr extends ae {
|
|
|
1407
1439
|
), f = Pe(W.BuiltinMsg, u, a);
|
|
1408
1440
|
try {
|
|
1409
1441
|
return this._controller.sendMessage(f), !0;
|
|
1410
|
-
} catch (
|
|
1411
|
-
return
|
|
1442
|
+
} catch (_) {
|
|
1443
|
+
return T.error(_), !1;
|
|
1412
1444
|
}
|
|
1413
1445
|
}
|
|
1414
1446
|
/**
|
|
@@ -1424,16 +1456,16 @@ class vr extends ae {
|
|
|
1424
1456
|
W.CustomEvent,
|
|
1425
1457
|
e,
|
|
1426
1458
|
n
|
|
1427
|
-
),
|
|
1428
|
-
u(new Error("RESPONSE TIMEOUT")), this.off("broadcast",
|
|
1429
|
-
}, i) : void 0,
|
|
1430
|
-
|
|
1459
|
+
), _ = f.front_request_id, g = i ? setTimeout(() => {
|
|
1460
|
+
u(new Error("RESPONSE TIMEOUT")), this.off("broadcast", v);
|
|
1461
|
+
}, i) : void 0, v = (p, S) => {
|
|
1462
|
+
S === _ && (g && clearTimeout(g), this.off("broadcast", v), a(p));
|
|
1431
1463
|
};
|
|
1432
|
-
this.on("broadcast",
|
|
1464
|
+
this.on("broadcast", v);
|
|
1433
1465
|
try {
|
|
1434
1466
|
this._controller.sendMessage(f);
|
|
1435
|
-
} catch (
|
|
1436
|
-
u(
|
|
1467
|
+
} catch (p) {
|
|
1468
|
+
u(p);
|
|
1437
1469
|
}
|
|
1438
1470
|
});
|
|
1439
1471
|
}
|
|
@@ -1472,31 +1504,31 @@ function dt() {
|
|
|
1472
1504
|
return !1;
|
|
1473
1505
|
for (var u = {}, f = 0; f < 10; f++)
|
|
1474
1506
|
u["_" + String.fromCharCode(f)] = f;
|
|
1475
|
-
var
|
|
1476
|
-
return u[
|
|
1507
|
+
var _ = Object.getOwnPropertyNames(u).map(function(v) {
|
|
1508
|
+
return u[v];
|
|
1477
1509
|
});
|
|
1478
|
-
if (
|
|
1510
|
+
if (_.join("") !== "0123456789")
|
|
1479
1511
|
return !1;
|
|
1480
|
-
var
|
|
1481
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
1482
|
-
|
|
1483
|
-
}), Object.keys(Object.assign({},
|
|
1484
|
-
} catch (
|
|
1512
|
+
var g = {};
|
|
1513
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(v) {
|
|
1514
|
+
g[v] = v;
|
|
1515
|
+
}), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
|
|
1516
|
+
} catch (v) {
|
|
1485
1517
|
return !1;
|
|
1486
1518
|
}
|
|
1487
1519
|
}
|
|
1488
1520
|
return je = i() ? Object.assign : function(a, u) {
|
|
1489
|
-
for (var f,
|
|
1490
|
-
f = Object(arguments[
|
|
1491
|
-
for (var
|
|
1492
|
-
s.call(f,
|
|
1521
|
+
for (var f, _ = n(a), g, v = 1; v < arguments.length; v++) {
|
|
1522
|
+
f = Object(arguments[v]);
|
|
1523
|
+
for (var p in f)
|
|
1524
|
+
s.call(f, p) && (_[p] = f[p]);
|
|
1493
1525
|
if (t) {
|
|
1494
|
-
|
|
1495
|
-
for (var
|
|
1496
|
-
e.call(f,
|
|
1526
|
+
g = t(f);
|
|
1527
|
+
for (var S = 0; S < g.length; S++)
|
|
1528
|
+
e.call(f, g[S]) && (_[g[S]] = f[g[S]]);
|
|
1497
1529
|
}
|
|
1498
1530
|
}
|
|
1499
|
-
return
|
|
1531
|
+
return _;
|
|
1500
1532
|
}, je;
|
|
1501
1533
|
}
|
|
1502
1534
|
/** @license React v17.0.2
|
|
@@ -1518,15 +1550,15 @@ function br() {
|
|
|
1518
1550
|
s = e("react.element"), ie.Fragment = e("react.fragment");
|
|
1519
1551
|
}
|
|
1520
1552
|
var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
1521
|
-
function u(f,
|
|
1522
|
-
var
|
|
1523
|
-
|
|
1524
|
-
for (
|
|
1525
|
-
i.call(
|
|
1553
|
+
function u(f, _, g) {
|
|
1554
|
+
var v, p = {}, S = null, m = null;
|
|
1555
|
+
g !== void 0 && (S = "" + g), _.key !== void 0 && (S = "" + _.key), _.ref !== void 0 && (m = _.ref);
|
|
1556
|
+
for (v in _)
|
|
1557
|
+
i.call(_, v) && !a.hasOwnProperty(v) && (p[v] = _[v]);
|
|
1526
1558
|
if (f && f.defaultProps)
|
|
1527
|
-
for (
|
|
1528
|
-
|
|
1529
|
-
return { $$typeof: s, type: f, key:
|
|
1559
|
+
for (v in _ = f.defaultProps, _)
|
|
1560
|
+
p[v] === void 0 && (p[v] = _[v]);
|
|
1561
|
+
return { $$typeof: s, type: f, key: S, ref: m, props: p, _owner: n.current };
|
|
1530
1562
|
}
|
|
1531
1563
|
return ie.jsx = u, ie.jsxs = u, ie;
|
|
1532
1564
|
}
|
|
@@ -1545,43 +1577,43 @@ function yr() {
|
|
|
1545
1577
|
process.env.NODE_ENV !== "production" && function() {
|
|
1546
1578
|
var s = V, e = dt(), n = 60103, i = 60106;
|
|
1547
1579
|
t.Fragment = 60107;
|
|
1548
|
-
var a = 60108, u = 60114, f = 60109,
|
|
1580
|
+
var a = 60108, u = 60114, f = 60109, _ = 60110, g = 60112, v = 60113, p = 60120, S = 60115, m = 60116, A = 60121, w = 60122, P = 60117, H = 60129, J = 60131;
|
|
1549
1581
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
1550
|
-
var
|
|
1551
|
-
n =
|
|
1582
|
+
var k = Symbol.for;
|
|
1583
|
+
n = k("react.element"), i = k("react.portal"), t.Fragment = k("react.fragment"), a = k("react.strict_mode"), u = k("react.profiler"), f = k("react.provider"), _ = k("react.context"), g = k("react.forward_ref"), v = k("react.suspense"), p = k("react.suspense_list"), S = k("react.memo"), m = k("react.lazy"), A = k("react.block"), w = k("react.server.block"), P = k("react.fundamental"), k("react.scope"), k("react.opaque.id"), H = k("react.debug_trace_mode"), k("react.offscreen"), J = k("react.legacy_hidden");
|
|
1552
1584
|
}
|
|
1553
|
-
var d = typeof Symbol == "function" && Symbol.iterator,
|
|
1554
|
-
function
|
|
1585
|
+
var d = typeof Symbol == "function" && Symbol.iterator, O = "@@iterator";
|
|
1586
|
+
function D(r) {
|
|
1555
1587
|
if (r === null || typeof r != "object")
|
|
1556
1588
|
return null;
|
|
1557
|
-
var c = d && r[d] || r[
|
|
1589
|
+
var c = d && r[d] || r[O];
|
|
1558
1590
|
return typeof c == "function" ? c : null;
|
|
1559
1591
|
}
|
|
1560
1592
|
var b = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1561
1593
|
function y(r) {
|
|
1562
1594
|
{
|
|
1563
|
-
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0),
|
|
1564
|
-
l[
|
|
1565
|
-
|
|
1595
|
+
for (var c = arguments.length, l = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
|
|
1596
|
+
l[h - 1] = arguments[h];
|
|
1597
|
+
M("error", r, l);
|
|
1566
1598
|
}
|
|
1567
1599
|
}
|
|
1568
|
-
function
|
|
1600
|
+
function M(r, c, l) {
|
|
1569
1601
|
{
|
|
1570
|
-
var
|
|
1571
|
-
|
|
1572
|
-
var
|
|
1602
|
+
var h = b.ReactDebugCurrentFrame, R = h.getStackAddendum();
|
|
1603
|
+
R !== "" && (c += "%s", l = l.concat([R]));
|
|
1604
|
+
var I = l.map(function(C) {
|
|
1573
1605
|
return "" + C;
|
|
1574
1606
|
});
|
|
1575
|
-
|
|
1607
|
+
I.unshift("Warning: " + c), Function.prototype.apply.call(console[r], console, I);
|
|
1576
1608
|
}
|
|
1577
1609
|
}
|
|
1578
1610
|
var U = !1;
|
|
1579
1611
|
function z(r) {
|
|
1580
|
-
return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === H || r === a || r ===
|
|
1612
|
+
return !!(typeof r == "string" || typeof r == "function" || r === t.Fragment || r === u || r === H || r === a || r === v || r === p || r === J || U || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === S || r.$$typeof === f || r.$$typeof === _ || r.$$typeof === g || r.$$typeof === P || r.$$typeof === A || r[0] === w));
|
|
1581
1613
|
}
|
|
1582
1614
|
function ue(r, c, l) {
|
|
1583
|
-
var
|
|
1584
|
-
return r.displayName || (
|
|
1615
|
+
var h = c.displayName || c.name || "";
|
|
1616
|
+
return r.displayName || (h !== "" ? l + "(" + h + ")" : l);
|
|
1585
1617
|
}
|
|
1586
1618
|
function be(r) {
|
|
1587
1619
|
return r.displayName || "Context";
|
|
@@ -1602,29 +1634,29 @@ function yr() {
|
|
|
1602
1634
|
return "Profiler";
|
|
1603
1635
|
case a:
|
|
1604
1636
|
return "StrictMode";
|
|
1605
|
-
case
|
|
1637
|
+
case v:
|
|
1606
1638
|
return "Suspense";
|
|
1607
|
-
case
|
|
1639
|
+
case p:
|
|
1608
1640
|
return "SuspenseList";
|
|
1609
1641
|
}
|
|
1610
1642
|
if (typeof r == "object")
|
|
1611
1643
|
switch (r.$$typeof) {
|
|
1612
|
-
case
|
|
1644
|
+
case _:
|
|
1613
1645
|
var c = r;
|
|
1614
1646
|
return be(c) + ".Consumer";
|
|
1615
1647
|
case f:
|
|
1616
1648
|
var l = r;
|
|
1617
1649
|
return be(l._context) + ".Provider";
|
|
1618
|
-
case
|
|
1650
|
+
case g:
|
|
1619
1651
|
return ue(r, r.render, "ForwardRef");
|
|
1620
|
-
case
|
|
1652
|
+
case S:
|
|
1621
1653
|
return F(r.type);
|
|
1622
1654
|
case A:
|
|
1623
1655
|
return F(r._render);
|
|
1624
1656
|
case m: {
|
|
1625
|
-
var
|
|
1657
|
+
var h = r, R = h._payload, I = h._init;
|
|
1626
1658
|
try {
|
|
1627
|
-
return F(R
|
|
1659
|
+
return F(I(R));
|
|
1628
1660
|
} catch (C) {
|
|
1629
1661
|
return null;
|
|
1630
1662
|
}
|
|
@@ -1632,14 +1664,14 @@ function yr() {
|
|
|
1632
1664
|
}
|
|
1633
1665
|
return null;
|
|
1634
1666
|
}
|
|
1635
|
-
var ee = 0,
|
|
1667
|
+
var ee = 0, j, B, te, le, Ve, $e, xe;
|
|
1636
1668
|
function Ue() {
|
|
1637
1669
|
}
|
|
1638
1670
|
Ue.__reactDisabledLog = !0;
|
|
1639
1671
|
function ht() {
|
|
1640
1672
|
{
|
|
1641
1673
|
if (ee === 0) {
|
|
1642
|
-
|
|
1674
|
+
j = console.log, B = console.info, te = console.warn, le = console.error, Ve = console.group, $e = console.groupCollapsed, xe = console.groupEnd;
|
|
1643
1675
|
var r = {
|
|
1644
1676
|
configurable: !0,
|
|
1645
1677
|
enumerable: !0,
|
|
@@ -1669,7 +1701,7 @@ function yr() {
|
|
|
1669
1701
|
};
|
|
1670
1702
|
Object.defineProperties(console, {
|
|
1671
1703
|
log: e({}, r, {
|
|
1672
|
-
value:
|
|
1704
|
+
value: j
|
|
1673
1705
|
}),
|
|
1674
1706
|
info: e({}, r, {
|
|
1675
1707
|
value: B
|
|
@@ -1681,7 +1713,7 @@ function yr() {
|
|
|
1681
1713
|
value: le
|
|
1682
1714
|
}),
|
|
1683
1715
|
group: e({}, r, {
|
|
1684
|
-
value:
|
|
1716
|
+
value: Ve
|
|
1685
1717
|
}),
|
|
1686
1718
|
groupCollapsed: e({}, r, {
|
|
1687
1719
|
value: $e
|
|
@@ -1700,33 +1732,33 @@ function yr() {
|
|
|
1700
1732
|
if (Ce === void 0)
|
|
1701
1733
|
try {
|
|
1702
1734
|
throw Error();
|
|
1703
|
-
} catch (
|
|
1704
|
-
var
|
|
1705
|
-
Ce =
|
|
1735
|
+
} catch (R) {
|
|
1736
|
+
var h = R.stack.trim().match(/\n( *(at )?)/);
|
|
1737
|
+
Ce = h && h[1] || "";
|
|
1706
1738
|
}
|
|
1707
1739
|
return `
|
|
1708
1740
|
` + Ce + r;
|
|
1709
1741
|
}
|
|
1710
1742
|
}
|
|
1711
|
-
var
|
|
1743
|
+
var Se = !1, de;
|
|
1712
1744
|
{
|
|
1713
1745
|
var gt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
1714
1746
|
de = new gt();
|
|
1715
1747
|
}
|
|
1716
1748
|
function Be(r, c) {
|
|
1717
|
-
if (!r ||
|
|
1749
|
+
if (!r || Se)
|
|
1718
1750
|
return "";
|
|
1719
1751
|
{
|
|
1720
1752
|
var l = de.get(r);
|
|
1721
1753
|
if (l !== void 0)
|
|
1722
1754
|
return l;
|
|
1723
1755
|
}
|
|
1724
|
-
var
|
|
1725
|
-
|
|
1726
|
-
var
|
|
1756
|
+
var h;
|
|
1757
|
+
Se = !0;
|
|
1758
|
+
var R = Error.prepareStackTrace;
|
|
1727
1759
|
Error.prepareStackTrace = void 0;
|
|
1728
|
-
var
|
|
1729
|
-
|
|
1760
|
+
var I;
|
|
1761
|
+
I = ye.current, ye.current = null, ht();
|
|
1730
1762
|
try {
|
|
1731
1763
|
if (c) {
|
|
1732
1764
|
var C = function() {
|
|
@@ -1740,14 +1772,14 @@ function yr() {
|
|
|
1740
1772
|
try {
|
|
1741
1773
|
Reflect.construct(C, []);
|
|
1742
1774
|
} catch (Y) {
|
|
1743
|
-
|
|
1775
|
+
h = Y;
|
|
1744
1776
|
}
|
|
1745
1777
|
Reflect.construct(r, [], C);
|
|
1746
1778
|
} else {
|
|
1747
1779
|
try {
|
|
1748
1780
|
C.call();
|
|
1749
1781
|
} catch (Y) {
|
|
1750
|
-
|
|
1782
|
+
h = Y;
|
|
1751
1783
|
}
|
|
1752
1784
|
r.call(C.prototype);
|
|
1753
1785
|
}
|
|
@@ -1755,31 +1787,31 @@ function yr() {
|
|
|
1755
1787
|
try {
|
|
1756
1788
|
throw Error();
|
|
1757
1789
|
} catch (Y) {
|
|
1758
|
-
|
|
1790
|
+
h = Y;
|
|
1759
1791
|
}
|
|
1760
1792
|
r();
|
|
1761
1793
|
}
|
|
1762
1794
|
} catch (Y) {
|
|
1763
|
-
if (Y &&
|
|
1764
|
-
for (var
|
|
1765
|
-
`), $ =
|
|
1766
|
-
`),
|
|
1767
|
-
|
|
1768
|
-
for (;
|
|
1769
|
-
if (
|
|
1770
|
-
if (
|
|
1795
|
+
if (Y && h && typeof Y.stack == "string") {
|
|
1796
|
+
for (var E = Y.stack.split(`
|
|
1797
|
+
`), $ = h.stack.split(`
|
|
1798
|
+
`), N = E.length - 1, L = $.length - 1; N >= 1 && L >= 0 && E[N] !== $[L]; )
|
|
1799
|
+
L--;
|
|
1800
|
+
for (; N >= 1 && L >= 0; N--, L--)
|
|
1801
|
+
if (E[N] !== $[L]) {
|
|
1802
|
+
if (N !== 1 || L !== 1)
|
|
1771
1803
|
do
|
|
1772
|
-
if (
|
|
1804
|
+
if (N--, L--, L < 0 || E[N] !== $[L]) {
|
|
1773
1805
|
var K = `
|
|
1774
|
-
` +
|
|
1806
|
+
` + E[N].replace(" at new ", " at ");
|
|
1775
1807
|
return typeof r == "function" && de.set(r, K), K;
|
|
1776
1808
|
}
|
|
1777
|
-
while (
|
|
1809
|
+
while (N >= 1 && L >= 0);
|
|
1778
1810
|
break;
|
|
1779
1811
|
}
|
|
1780
1812
|
}
|
|
1781
1813
|
} finally {
|
|
1782
|
-
|
|
1814
|
+
Se = !1, ye.current = I, _t(), Error.prepareStackTrace = R;
|
|
1783
1815
|
}
|
|
1784
1816
|
var ne = r ? r.displayName || r.name : "", Qe = ne ? fe(ne) : "";
|
|
1785
1817
|
return typeof r == "function" && de.set(r, Qe), Qe;
|
|
@@ -1799,23 +1831,23 @@ function yr() {
|
|
|
1799
1831
|
if (typeof r == "string")
|
|
1800
1832
|
return fe(r);
|
|
1801
1833
|
switch (r) {
|
|
1802
|
-
case
|
|
1834
|
+
case v:
|
|
1803
1835
|
return fe("Suspense");
|
|
1804
|
-
case
|
|
1836
|
+
case p:
|
|
1805
1837
|
return fe("SuspenseList");
|
|
1806
1838
|
}
|
|
1807
1839
|
if (typeof r == "object")
|
|
1808
1840
|
switch (r.$$typeof) {
|
|
1809
|
-
case
|
|
1841
|
+
case g:
|
|
1810
1842
|
return We(r.render);
|
|
1811
|
-
case
|
|
1843
|
+
case S:
|
|
1812
1844
|
return he(r.type, c, l);
|
|
1813
1845
|
case A:
|
|
1814
1846
|
return We(r._render);
|
|
1815
1847
|
case m: {
|
|
1816
|
-
var
|
|
1848
|
+
var h = r, R = h._payload, I = h._init;
|
|
1817
1849
|
try {
|
|
1818
|
-
return he(R
|
|
1850
|
+
return he(I(R), c, l);
|
|
1819
1851
|
} catch (C) {
|
|
1820
1852
|
}
|
|
1821
1853
|
}
|
|
@@ -1830,26 +1862,26 @@ function yr() {
|
|
|
1830
1862
|
} else
|
|
1831
1863
|
qe.setExtraStackFrame(null);
|
|
1832
1864
|
}
|
|
1833
|
-
function vt(r, c, l,
|
|
1865
|
+
function vt(r, c, l, h, R) {
|
|
1834
1866
|
{
|
|
1835
|
-
var
|
|
1867
|
+
var I = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1836
1868
|
for (var C in r)
|
|
1837
|
-
if (
|
|
1838
|
-
var
|
|
1869
|
+
if (I(r, C)) {
|
|
1870
|
+
var E = void 0;
|
|
1839
1871
|
try {
|
|
1840
1872
|
if (typeof r[C] != "function") {
|
|
1841
|
-
var $ = Error((
|
|
1873
|
+
var $ = Error((h || "React class") + ": " + l + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1842
1874
|
throw $.name = "Invariant Violation", $;
|
|
1843
1875
|
}
|
|
1844
|
-
|
|
1845
|
-
} catch (
|
|
1846
|
-
|
|
1876
|
+
E = r[C](c, C, h, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1877
|
+
} catch (N) {
|
|
1878
|
+
E = N;
|
|
1847
1879
|
}
|
|
1848
|
-
|
|
1880
|
+
E && !(E instanceof Error) && (_e(R), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", l, C, typeof E), _e(null)), E instanceof Error && !(E.message in Fe) && (Fe[E.message] = !0, _e(R), y("Failed %s type: %s", l, E.message), _e(null));
|
|
1849
1881
|
}
|
|
1850
1882
|
}
|
|
1851
1883
|
}
|
|
1852
|
-
var se = b.ReactCurrentOwner,
|
|
1884
|
+
var se = b.ReactCurrentOwner, we = Object.prototype.hasOwnProperty, pt = {
|
|
1853
1885
|
key: !0,
|
|
1854
1886
|
ref: !0,
|
|
1855
1887
|
__self: !0,
|
|
@@ -1857,7 +1889,7 @@ function yr() {
|
|
|
1857
1889
|
}, Ke, Ye, Oe;
|
|
1858
1890
|
Oe = {};
|
|
1859
1891
|
function Et(r) {
|
|
1860
|
-
if (
|
|
1892
|
+
if (we.call(r, "ref")) {
|
|
1861
1893
|
var c = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
1862
1894
|
if (c && c.isReactWarning)
|
|
1863
1895
|
return !1;
|
|
@@ -1865,7 +1897,7 @@ function yr() {
|
|
|
1865
1897
|
return r.ref !== void 0;
|
|
1866
1898
|
}
|
|
1867
1899
|
function bt(r) {
|
|
1868
|
-
if (
|
|
1900
|
+
if (we.call(r, "key")) {
|
|
1869
1901
|
var c = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
1870
1902
|
if (c && c.isReactWarning)
|
|
1871
1903
|
return !1;
|
|
@@ -1889,7 +1921,7 @@ function yr() {
|
|
|
1889
1921
|
});
|
|
1890
1922
|
}
|
|
1891
1923
|
}
|
|
1892
|
-
function
|
|
1924
|
+
function St(r, c) {
|
|
1893
1925
|
{
|
|
1894
1926
|
var l = function() {
|
|
1895
1927
|
Ye || (Ye = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
@@ -1900,8 +1932,8 @@ function yr() {
|
|
|
1900
1932
|
});
|
|
1901
1933
|
}
|
|
1902
1934
|
}
|
|
1903
|
-
var
|
|
1904
|
-
var
|
|
1935
|
+
var wt = function(r, c, l, h, R, I, C) {
|
|
1936
|
+
var E = {
|
|
1905
1937
|
// This tag allows us to uniquely identify this as a React Element
|
|
1906
1938
|
$$typeof: n,
|
|
1907
1939
|
// Built-in properties that belong on the element
|
|
@@ -1910,41 +1942,41 @@ function yr() {
|
|
|
1910
1942
|
ref: l,
|
|
1911
1943
|
props: C,
|
|
1912
1944
|
// Record the component responsible for creating this element.
|
|
1913
|
-
_owner:
|
|
1945
|
+
_owner: I
|
|
1914
1946
|
};
|
|
1915
|
-
return
|
|
1947
|
+
return E._store = {}, Object.defineProperty(E._store, "validated", {
|
|
1916
1948
|
configurable: !1,
|
|
1917
1949
|
enumerable: !1,
|
|
1918
1950
|
writable: !0,
|
|
1919
1951
|
value: !1
|
|
1920
|
-
}), Object.defineProperty(
|
|
1952
|
+
}), Object.defineProperty(E, "_self", {
|
|
1921
1953
|
configurable: !1,
|
|
1922
1954
|
enumerable: !1,
|
|
1923
1955
|
writable: !1,
|
|
1924
|
-
value:
|
|
1925
|
-
}), Object.defineProperty(
|
|
1956
|
+
value: h
|
|
1957
|
+
}), Object.defineProperty(E, "_source", {
|
|
1926
1958
|
configurable: !1,
|
|
1927
1959
|
enumerable: !1,
|
|
1928
1960
|
writable: !1,
|
|
1929
|
-
value:
|
|
1930
|
-
}), Object.freeze && (Object.freeze(
|
|
1961
|
+
value: R
|
|
1962
|
+
}), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
|
|
1931
1963
|
};
|
|
1932
|
-
function Ot(r, c, l,
|
|
1964
|
+
function Ot(r, c, l, h, R) {
|
|
1933
1965
|
{
|
|
1934
|
-
var
|
|
1935
|
-
l !== void 0 && (
|
|
1936
|
-
for (
|
|
1937
|
-
|
|
1966
|
+
var I, C = {}, E = null, $ = null;
|
|
1967
|
+
l !== void 0 && (E = "" + l), bt(c) && (E = "" + c.key), Et(c) && ($ = c.ref, yt(c, R));
|
|
1968
|
+
for (I in c)
|
|
1969
|
+
we.call(c, I) && !pt.hasOwnProperty(I) && (C[I] = c[I]);
|
|
1938
1970
|
if (r && r.defaultProps) {
|
|
1939
|
-
var
|
|
1940
|
-
for (
|
|
1941
|
-
C[
|
|
1971
|
+
var N = r.defaultProps;
|
|
1972
|
+
for (I in N)
|
|
1973
|
+
C[I] === void 0 && (C[I] = N[I]);
|
|
1942
1974
|
}
|
|
1943
|
-
if (
|
|
1944
|
-
var
|
|
1945
|
-
|
|
1975
|
+
if (E || $) {
|
|
1976
|
+
var L = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
1977
|
+
E && Ct(C, L), $ && St(C, L);
|
|
1946
1978
|
}
|
|
1947
|
-
return
|
|
1979
|
+
return wt(r, E, $, R, h, se.current, C);
|
|
1948
1980
|
}
|
|
1949
1981
|
}
|
|
1950
1982
|
var Re = b.ReactCurrentOwner, Ge = b.ReactDebugCurrentFrame;
|
|
@@ -2005,8 +2037,8 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2005
2037
|
if (Je[l])
|
|
2006
2038
|
return;
|
|
2007
2039
|
Je[l] = !0;
|
|
2008
|
-
var
|
|
2009
|
-
r && r._owner && r._owner !== Re.current && (
|
|
2040
|
+
var h = "";
|
|
2041
|
+
r && r._owner && r._owner !== Re.current && (h = " It was passed a child from " + F(r._owner.type) + "."), re(r), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, h), re(null);
|
|
2010
2042
|
}
|
|
2011
2043
|
}
|
|
2012
2044
|
function Xe(r, c) {
|
|
@@ -2015,15 +2047,15 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2015
2047
|
return;
|
|
2016
2048
|
if (Array.isArray(r))
|
|
2017
2049
|
for (var l = 0; l < r.length; l++) {
|
|
2018
|
-
var
|
|
2019
|
-
Te(
|
|
2050
|
+
var h = r[l];
|
|
2051
|
+
Te(h) && ze(h, c);
|
|
2020
2052
|
}
|
|
2021
2053
|
else if (Te(r))
|
|
2022
2054
|
r._store && (r._store.validated = !0);
|
|
2023
2055
|
else if (r) {
|
|
2024
|
-
var
|
|
2025
|
-
if (typeof
|
|
2026
|
-
for (var
|
|
2056
|
+
var R = D(r);
|
|
2057
|
+
if (typeof R == "function" && R !== r.entries)
|
|
2058
|
+
for (var I = R.call(r), C; !(C = I.next()).done; )
|
|
2027
2059
|
Te(C.value) && ze(C.value, c);
|
|
2028
2060
|
}
|
|
2029
2061
|
}
|
|
@@ -2036,19 +2068,19 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2036
2068
|
var l;
|
|
2037
2069
|
if (typeof c == "function")
|
|
2038
2070
|
l = c.propTypes;
|
|
2039
|
-
else if (typeof c == "object" && (c.$$typeof ===
|
|
2071
|
+
else if (typeof c == "object" && (c.$$typeof === g || // Note: Memo only checks outer props here.
|
|
2040
2072
|
// Inner props are checked in the reconciler.
|
|
2041
|
-
c.$$typeof ===
|
|
2073
|
+
c.$$typeof === S))
|
|
2042
2074
|
l = c.propTypes;
|
|
2043
2075
|
else
|
|
2044
2076
|
return;
|
|
2045
2077
|
if (l) {
|
|
2046
|
-
var
|
|
2047
|
-
vt(l, r.props, "prop",
|
|
2078
|
+
var h = F(c);
|
|
2079
|
+
vt(l, r.props, "prop", h, r);
|
|
2048
2080
|
} else if (c.PropTypes !== void 0 && !Ie) {
|
|
2049
2081
|
Ie = !0;
|
|
2050
|
-
var
|
|
2051
|
-
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
2082
|
+
var R = F(c);
|
|
2083
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
|
|
2052
2084
|
}
|
|
2053
2085
|
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
2054
2086
|
}
|
|
@@ -2056,33 +2088,33 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2056
2088
|
function kt(r) {
|
|
2057
2089
|
{
|
|
2058
2090
|
for (var c = Object.keys(r.props), l = 0; l < c.length; l++) {
|
|
2059
|
-
var
|
|
2060
|
-
if (
|
|
2061
|
-
re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
2091
|
+
var h = c[l];
|
|
2092
|
+
if (h !== "children" && h !== "key") {
|
|
2093
|
+
re(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), re(null);
|
|
2062
2094
|
break;
|
|
2063
2095
|
}
|
|
2064
2096
|
}
|
|
2065
2097
|
r.ref !== null && (re(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), re(null));
|
|
2066
2098
|
}
|
|
2067
2099
|
}
|
|
2068
|
-
function Ze(r, c, l,
|
|
2100
|
+
function Ze(r, c, l, h, R, I) {
|
|
2069
2101
|
{
|
|
2070
2102
|
var C = z(r);
|
|
2071
2103
|
if (!C) {
|
|
2072
|
-
var
|
|
2073
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
|
2074
|
-
var $ = Rt(
|
|
2075
|
-
$ ?
|
|
2076
|
-
var
|
|
2077
|
-
r === null ?
|
|
2104
|
+
var E = "";
|
|
2105
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (E += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
2106
|
+
var $ = Rt(R);
|
|
2107
|
+
$ ? E += $ : E += He();
|
|
2108
|
+
var N;
|
|
2109
|
+
r === null ? N = "null" : Array.isArray(r) ? N = "array" : r !== void 0 && r.$$typeof === n ? (N = "<" + (F(r.type) || "Unknown") + " />", E = " Did you accidentally export a JSX literal instead of a component?") : N = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, E);
|
|
2078
2110
|
}
|
|
2079
|
-
var
|
|
2080
|
-
if (
|
|
2081
|
-
return
|
|
2111
|
+
var L = Ot(r, c, l, R, I);
|
|
2112
|
+
if (L == null)
|
|
2113
|
+
return L;
|
|
2082
2114
|
if (C) {
|
|
2083
2115
|
var K = c.children;
|
|
2084
2116
|
if (K !== void 0)
|
|
2085
|
-
if (
|
|
2117
|
+
if (h)
|
|
2086
2118
|
if (Array.isArray(K)) {
|
|
2087
2119
|
for (var ne = 0; ne < K.length; ne++)
|
|
2088
2120
|
Xe(K[ne], r);
|
|
@@ -2092,7 +2124,7 @@ Check the top-level render call using <` + l + ">.");
|
|
|
2092
2124
|
else
|
|
2093
2125
|
Xe(K, r);
|
|
2094
2126
|
}
|
|
2095
|
-
return r === t.Fragment ? kt(
|
|
2127
|
+
return r === t.Fragment ? kt(L) : Tt(L), L;
|
|
2096
2128
|
}
|
|
2097
2129
|
}
|
|
2098
2130
|
function Pt(r, c, l) {
|
|
@@ -2116,51 +2148,51 @@ function kr(t) {
|
|
|
2116
2148
|
if (!d)
|
|
2117
2149
|
throw new Error("LiveProvider never found.");
|
|
2118
2150
|
return d;
|
|
2119
|
-
}, u = () => e, f = () => e.$RTC,
|
|
2120
|
-
function
|
|
2121
|
-
const b = a(), y = [b, name, ...
|
|
2122
|
-
return V.useEffect(() => (b.keyframes.on(d,
|
|
2151
|
+
}, u = () => e, f = () => e.$RTC, _ = () => f(), g = () => async (d) => await e.connect(d);
|
|
2152
|
+
function v(d, O, D = []) {
|
|
2153
|
+
const b = a(), y = [b, name, ...D], M = () => b.keyframes.off(d, O);
|
|
2154
|
+
return V.useEffect(() => (b.keyframes.on(d, O), M), y), M;
|
|
2123
2155
|
}
|
|
2124
|
-
function
|
|
2156
|
+
function p() {
|
|
2125
2157
|
const d = a();
|
|
2126
2158
|
return {
|
|
2127
|
-
connect: async (
|
|
2128
|
-
broadcast: async (
|
|
2159
|
+
connect: async (j) => await d.connect(j),
|
|
2160
|
+
broadcast: async (j, B, te = 0) => await d.broadcast(j, B, te),
|
|
2129
2161
|
exit: async () => await d.exit(),
|
|
2130
|
-
kick: async (
|
|
2131
|
-
toggleMicro: (
|
|
2132
|
-
forbidMicro: async (
|
|
2133
|
-
forbidSync: (
|
|
2134
|
-
sendKeyframe: (
|
|
2135
|
-
getFramesByKey: (
|
|
2136
|
-
setSelfInfo: (
|
|
2137
|
-
updateStatus: (
|
|
2162
|
+
kick: async (j) => await d.kick(j),
|
|
2163
|
+
toggleMicro: (j) => d.toggleMicro(j),
|
|
2164
|
+
forbidMicro: async (j, B = []) => await d.forbidMicro(j, B),
|
|
2165
|
+
forbidSync: (j, B = []) => d.forbidSync(j, B),
|
|
2166
|
+
sendKeyframe: (j, B) => d.sendKeyframe(j, B),
|
|
2167
|
+
getFramesByKey: (j) => d.getFramesByKey(j),
|
|
2168
|
+
setSelfInfo: (j) => d.setSelfInfo(j),
|
|
2169
|
+
updateStatus: (j, B, te, le) => d.updateStatus(j, B, te, le)
|
|
2138
2170
|
};
|
|
2139
2171
|
}
|
|
2140
|
-
function
|
|
2141
|
-
const
|
|
2172
|
+
function S(d) {
|
|
2173
|
+
const O = a(), [D, b] = V.useState(O.getFramesByKey(d));
|
|
2142
2174
|
V.useEffect(() => {
|
|
2143
|
-
const
|
|
2144
|
-
return
|
|
2145
|
-
}, [
|
|
2175
|
+
const M = (ue) => b(ue), U = d, z = M;
|
|
2176
|
+
return O.keyframes.on(U, z), () => O.keyframes.off(U, z);
|
|
2177
|
+
}, [O]);
|
|
2146
2178
|
const y = V.useCallback(
|
|
2147
|
-
(
|
|
2148
|
-
[
|
|
2179
|
+
(M) => O.sendKeyframe(d, M),
|
|
2180
|
+
[O]
|
|
2149
2181
|
);
|
|
2150
|
-
return [
|
|
2182
|
+
return [D, y];
|
|
2151
2183
|
}
|
|
2152
|
-
function m(d,
|
|
2153
|
-
const b = a(), y = () => b.off(d,
|
|
2154
|
-
return V.useEffect(() => (b.on(d,
|
|
2184
|
+
function m(d, O, D = []) {
|
|
2185
|
+
const b = a(), y = () => b.off(d, O), M = [b, d, ...D];
|
|
2186
|
+
return V.useEffect(() => (b.on(d, O), y), M), y;
|
|
2155
2187
|
}
|
|
2156
2188
|
function A() {
|
|
2157
|
-
const d = a(), [
|
|
2189
|
+
const d = a(), [O, D] = V.useState(d.state);
|
|
2158
2190
|
return V.useEffect(() => {
|
|
2159
|
-
const b = (y) =>
|
|
2191
|
+
const b = (y) => D(y);
|
|
2160
2192
|
return d.on("stateChange", b), () => d.off("stateChange", b);
|
|
2161
|
-
}, [d]),
|
|
2193
|
+
}, [d]), O;
|
|
2162
2194
|
}
|
|
2163
|
-
function
|
|
2195
|
+
function w() {
|
|
2164
2196
|
const d = a();
|
|
2165
2197
|
return {
|
|
2166
2198
|
join: (U) => d.$RTC.join(U),
|
|
@@ -2173,51 +2205,51 @@ function kr(t) {
|
|
|
2173
2205
|
detectMicro: () => d.$RTC.detectMicro()
|
|
2174
2206
|
};
|
|
2175
2207
|
}
|
|
2176
|
-
function
|
|
2177
|
-
const b = a(), y = () => b.$RTC.off(d,
|
|
2178
|
-
return V.useEffect(() => (b.$RTC.on(d,
|
|
2208
|
+
function P(d, O, D = []) {
|
|
2209
|
+
const b = a(), y = () => b.$RTC.off(d, O), M = [b, d, ...D];
|
|
2210
|
+
return V.useEffect(() => (b.$RTC.on(d, O), y), M), y;
|
|
2179
2211
|
}
|
|
2180
2212
|
function H() {
|
|
2181
|
-
const d = a(), [
|
|
2213
|
+
const d = a(), [O, D] = V.useState(
|
|
2182
2214
|
d.selfInfo || {}
|
|
2183
|
-
), b = (
|
|
2215
|
+
), b = (M) => D(M);
|
|
2184
2216
|
V.useEffect(() => (d.on("selfInfoUpdate", b), () => d.off("selfInfoUpdate", b)), [d]);
|
|
2185
2217
|
const y = V.useCallback(
|
|
2186
|
-
async (
|
|
2218
|
+
async (M) => await d.setSelfInfo(M),
|
|
2187
2219
|
[d]
|
|
2188
2220
|
);
|
|
2189
|
-
return [
|
|
2221
|
+
return [O, y];
|
|
2190
2222
|
}
|
|
2191
2223
|
function J() {
|
|
2192
|
-
const d = a(), [
|
|
2224
|
+
const d = a(), [O, D] = V.useState(
|
|
2193
2225
|
d.snapshot
|
|
2194
2226
|
);
|
|
2195
2227
|
return V.useEffect(() => {
|
|
2196
|
-
const b = (y) =>
|
|
2228
|
+
const b = (y) => D(y);
|
|
2197
2229
|
return d.on("keyframes", b), () => d.off("keyframes", b);
|
|
2198
|
-
}),
|
|
2230
|
+
}), O;
|
|
2199
2231
|
}
|
|
2200
|
-
function
|
|
2201
|
-
const d = a(), [
|
|
2202
|
-
return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]),
|
|
2232
|
+
function k() {
|
|
2233
|
+
const d = a(), [O, D] = V.useState(d.userList), b = (y) => D(y);
|
|
2234
|
+
return V.useEffect(() => (d.on("userListUpdate", b), () => d.off("userListUpdate", b)), [d]), O;
|
|
2203
2235
|
}
|
|
2204
2236
|
return {
|
|
2205
2237
|
live: e,
|
|
2206
2238
|
jsBridge: n,
|
|
2207
2239
|
LiveProvider: i,
|
|
2208
2240
|
unsafe__useLiveInstance: u,
|
|
2209
|
-
unsafe__useRTCInstance:
|
|
2210
|
-
useConnect:
|
|
2211
|
-
useKeyframe:
|
|
2212
|
-
useKeyframeUpdateCallback:
|
|
2213
|
-
useLiveAction:
|
|
2241
|
+
unsafe__useRTCInstance: _,
|
|
2242
|
+
useConnect: g,
|
|
2243
|
+
useKeyframe: S,
|
|
2244
|
+
useKeyframeUpdateCallback: v,
|
|
2245
|
+
useLiveAction: p,
|
|
2214
2246
|
useLiveEventCallback: m,
|
|
2215
2247
|
useLiveState: A,
|
|
2216
|
-
useRTCAction:
|
|
2217
|
-
useRTCEventCallback:
|
|
2248
|
+
useRTCAction: w,
|
|
2249
|
+
useRTCEventCallback: P,
|
|
2218
2250
|
useSelfInfo: H,
|
|
2219
2251
|
useKeyframesSnapshot: J,
|
|
2220
|
-
useUserList:
|
|
2252
|
+
useUserList: k
|
|
2221
2253
|
};
|
|
2222
2254
|
}
|
|
2223
2255
|
export {
|