@beterdichtbij/component-library 0.0.0-dev-timo.12 → 0.0.0-dev-timo.13
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/bd-component-lib.cjs.js +10 -10
- package/dist/bd-component-lib.es.js +161 -161
- package/dist/bd-component-lib.umd.js +1 -1
- package/package.json +1 -1
|
@@ -32223,85 +32223,85 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32223
32223
|
deviceManager: null,
|
|
32224
32224
|
incomingCall: null,
|
|
32225
32225
|
call: null
|
|
32226
|
-
}), ue = A(null), de = A(null), fe = A(null), pe = A(!0), me = A(!1), he = A(null), ge = A(null), _e = A(null), ve = A(0), ye = A(0), be = A(null), xe = A(!1), Ce = A(""), we = A(""), Te = A(null), Ee = A(null), De = A(!0), Oe = A(!1), ke = A(!1), Ae = A(!1), je = A(null), Me = A(null), Ne = A(null), Pe = A(null), L = null, Fe = null, Ie = null, Le = a(() => Oe.value ||
|
|
32226
|
+
}), ue = A(null), de = A(null), fe = A(null), pe = A(!0), me = A(!1), he = A(null), ge = A(null), _e = A(null), ve = A(0), ye = A(0), be = A(null), xe = A(!1), Ce = A(""), we = A(""), Te = A(null), Ee = A(null), De = A(!0), Oe = A(!1), ke = A(!1), Ae = A(!1), je = A(null), Me = A(null), Ne = A(null), Pe = A(null), L = null, Fe = null, Ie = null, Le = a(() => Oe.value || it.value), Re = a(() => {
|
|
32227
32227
|
switch (ve.value) {
|
|
32228
|
-
case 0: return
|
|
32229
|
-
case 1: return
|
|
32230
|
-
default: return
|
|
32228
|
+
case 0: return Xe.value.hasNoAvailableCamera;
|
|
32229
|
+
case 1: return Xe.value.hasOneAvailableCamera;
|
|
32230
|
+
default: return Xe.value.hasMultipleAvailableCameras;
|
|
32231
32231
|
}
|
|
32232
|
-
}),
|
|
32232
|
+
}), ze = a(() => {
|
|
32233
32233
|
let e = navigator.userAgent;
|
|
32234
32234
|
return /Mobi/.test(e) && !te.value;
|
|
32235
|
-
}),
|
|
32235
|
+
}), Be = a(() => {
|
|
32236
32236
|
let e = navigator.userAgent, t = e.indexOf("Android") !== -1, n = /Mobi/.test(e), r = /iPad|iPhone|iPod/.test(e) && !window.MSStream;
|
|
32237
32237
|
return !(t && n || r);
|
|
32238
|
-
}),
|
|
32238
|
+
}), Ve = a(() => !j.value?.video && it.value), He = a(() => !j.value?.audio && it.value), Ue = a(() => M.value === i.Declined ? "incoming--declined" : "incoming--loading"), We = a(() => {
|
|
32239
32239
|
switch (se.value) {
|
|
32240
32240
|
case 0: return "weak";
|
|
32241
32241
|
case 1: return "steady";
|
|
32242
32242
|
case 2: return "strong";
|
|
32243
32243
|
default: return null;
|
|
32244
32244
|
}
|
|
32245
|
-
}),
|
|
32245
|
+
}), Ge = a(() => {
|
|
32246
32246
|
switch (se.value) {
|
|
32247
32247
|
case 0: return O.value.signalStrength.weak;
|
|
32248
32248
|
case 1: return O.value.signalStrength.steady;
|
|
32249
32249
|
case 2: return O.value.signalStrength.strong;
|
|
32250
32250
|
default: return null;
|
|
32251
32251
|
}
|
|
32252
|
-
}),
|
|
32253
|
-
function
|
|
32252
|
+
}), Ke = a(() => O.value.videoCallTemplate || O.value), qe = a(() => Ke.value.actions || Ke.value), Je = a(() => Ke.value.help || Ke.value), Ye = a(() => Ke.value.permissions || Ke.value), Xe = a(() => Ke.value.cameraAvailability || Ke.value), Ze = a(() => te.value ? qe.value.stopSharingScreen : qe.value.shareScreen), Qe = a(() => Je.value.placeholderSettingsHelpTitle), $e = a(() => Je.value.placeholderSettingsHelpMessage), et = a(() => M.value === i.Declined), tt = a(() => M.value === i.HangedUp), nt = a(() => M.value === i.Connected), rt = a(() => !nt.value), it = a(() => M.value === i.DevicePermissionDenied), at = a(() => Ke.value.statusTextMessage || Ke.value), ot = a(() => Ke.value.statusDetailMessage || Ke.value), st = a(() => x.participantRole), ct = a(() => ke.value ? qe.value.microphoneUnmute : qe.value.microphoneMute), lt = a(() => Oe.value ? qe.value.cameraOn : qe.value.cameraOff), ut = a(() => pe.value ? qe.value.backgroundBlurUnavailable : De.value ? qe.value.backgroundBlur : qe.value.backgroundUnblur);
|
|
32253
|
+
function dt(e) {
|
|
32254
32254
|
if (typeof e != "string") return e;
|
|
32255
|
-
let t = e.replaceAll("{participantRole}",
|
|
32255
|
+
let t = e.replaceAll("{participantRole}", st.value);
|
|
32256
32256
|
return t && t.charAt(0).toLocaleUpperCase() + t.slice(1);
|
|
32257
32257
|
}
|
|
32258
|
-
let
|
|
32258
|
+
let ft = a(() => {
|
|
32259
32259
|
switch (M.value) {
|
|
32260
|
-
case i.Initializing: return
|
|
32261
|
-
case i.Dialing: return
|
|
32262
|
-
case i.Ringing: return
|
|
32263
|
-
case i.Answered: return
|
|
32264
|
-
case i.Connected: return
|
|
32265
|
-
case i.Declined: return
|
|
32266
|
-
case i.HangedUp: return
|
|
32267
|
-
case i.DevicePermissionDenied: return
|
|
32268
|
-
}
|
|
32269
|
-
}),
|
|
32260
|
+
case i.Initializing: return dt(at.value.initializing);
|
|
32261
|
+
case i.Dialing: return dt(at.value.dialing);
|
|
32262
|
+
case i.Ringing: return dt(at.value.ringing);
|
|
32263
|
+
case i.Answered: return dt(at.value.answered);
|
|
32264
|
+
case i.Connected: return dt(at.value.connected);
|
|
32265
|
+
case i.Declined: return dt(at.value.videoCallDeclined);
|
|
32266
|
+
case i.HangedUp: return dt(at.value.videoCallHangedUp);
|
|
32267
|
+
case i.DevicePermissionDenied: return dt(at.value.devicePermissionDenied);
|
|
32268
|
+
}
|
|
32269
|
+
}), pt = a(() => Ce.value || ft.value), mt = a(() => we.value);
|
|
32270
32270
|
ne(() => {
|
|
32271
|
-
|
|
32271
|
+
tn(), gt(), Ee.value = window.setInterval(kt, 5e3);
|
|
32272
32272
|
}), ie(() => {
|
|
32273
|
-
be.value && window.clearInterval(be.value), Ee.value && window.clearInterval(Ee.value),
|
|
32273
|
+
be.value && window.clearInterval(be.value), Ee.value && window.clearInterval(Ee.value), ht(), $t();
|
|
32274
32274
|
});
|
|
32275
|
-
function
|
|
32275
|
+
function ht() {
|
|
32276
32276
|
L &&= (window.clearTimeout(L), null), Fe &&= (window.clearTimeout(Fe), null), Ie &&= (window.clearTimeout(Ie), null);
|
|
32277
32277
|
}
|
|
32278
|
-
function
|
|
32279
|
-
|
|
32280
|
-
M.value === i.Initializing && (Ce.value =
|
|
32278
|
+
function gt() {
|
|
32279
|
+
ht(), M.value === i.Initializing ? L = window.setTimeout(() => {
|
|
32280
|
+
M.value === i.Initializing && (Ce.value = dt(at.value.callNotDelivered), we.value = dt(ot.value.callNotDeliveredDetail));
|
|
32281
32281
|
}, 3e4) : M.value === i.Dialing ? Fe = window.setTimeout(() => {
|
|
32282
|
-
M.value === i.Dialing && (Ce.value = "", we.value =
|
|
32282
|
+
M.value === i.Dialing && (Ce.value = "", we.value = dt(ot.value.notAnsweredDetail));
|
|
32283
32283
|
}, 1e4) : M.value === i.Connected && (Ie = window.setTimeout(() => {
|
|
32284
|
-
M.value === i.Connected && (we.value =
|
|
32284
|
+
M.value === i.Connected && (we.value = dt(ot.value.noVideoHint));
|
|
32285
32285
|
}, 5e3));
|
|
32286
32286
|
}
|
|
32287
|
-
function
|
|
32287
|
+
function _t(e) {
|
|
32288
32288
|
[
|
|
32289
32289
|
i.Declined,
|
|
32290
32290
|
i.HangedUp,
|
|
32291
32291
|
i.DevicePermissionDenied
|
|
32292
|
-
].includes(M.value) || (M.value = e, Ce.value = "", we.value = "",
|
|
32292
|
+
].includes(M.value) || (M.value = e, Ce.value = "", we.value = "", gt());
|
|
32293
32293
|
}
|
|
32294
|
-
async function
|
|
32294
|
+
async function vt() {
|
|
32295
32295
|
if (N.call) try {
|
|
32296
32296
|
ke.value ? await N.call.unmute() : await N.call.mute(), ke.value = !ke.value, ke.value || (Ae.value = !1);
|
|
32297
32297
|
} catch (e) {
|
|
32298
32298
|
console.error("Unable to toggle microphone", e);
|
|
32299
32299
|
}
|
|
32300
32300
|
}
|
|
32301
|
-
async function
|
|
32301
|
+
async function yt() {
|
|
32302
32302
|
if (N.call) try {
|
|
32303
32303
|
if (Oe.value) {
|
|
32304
|
-
let e = ue.value || await
|
|
32304
|
+
let e = ue.value || await Ft();
|
|
32305
32305
|
if (!e) return;
|
|
32306
32306
|
await N.call.startVideo(e), ue.value = e, Oe.value = !1, await ee();
|
|
32307
32307
|
let t = Ne.value;
|
|
@@ -32318,7 +32318,7 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32318
32318
|
console.error("Unable to toggle camera", e);
|
|
32319
32319
|
}
|
|
32320
32320
|
}
|
|
32321
|
-
async function
|
|
32321
|
+
async function bt() {
|
|
32322
32322
|
if (!(pe.value || me.value || !de.value || !fe.value)) {
|
|
32323
32323
|
me.value = !0;
|
|
32324
32324
|
try {
|
|
@@ -32330,96 +32330,96 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32330
32330
|
}
|
|
32331
32331
|
}
|
|
32332
32332
|
}
|
|
32333
|
+
function xt() {
|
|
32334
|
+
_t(i.Declined);
|
|
32335
|
+
}
|
|
32333
32336
|
function St() {
|
|
32334
|
-
|
|
32337
|
+
_t(i.Answered);
|
|
32335
32338
|
}
|
|
32336
32339
|
function Ct() {
|
|
32337
|
-
|
|
32340
|
+
M.value !== i.Connected && _t(i.Dialing);
|
|
32338
32341
|
}
|
|
32339
32342
|
function wt() {
|
|
32340
|
-
M.value !== i.
|
|
32343
|
+
M.value !== i.DevicePermissionDenied && !x.isCallee && Nt();
|
|
32341
32344
|
}
|
|
32342
|
-
function Tt() {
|
|
32343
|
-
|
|
32345
|
+
async function Tt() {
|
|
32346
|
+
_t(i.HangedUp), j.value.video && Zt();
|
|
32344
32347
|
}
|
|
32345
|
-
|
|
32346
|
-
|
|
32348
|
+
function Et(e) {
|
|
32349
|
+
_t(i.HangedUp), we.value = Vt(e);
|
|
32347
32350
|
}
|
|
32348
|
-
function Dt(
|
|
32349
|
-
|
|
32351
|
+
function Dt() {
|
|
32352
|
+
Ce.value = dt(at.value.signalHold), we.value = dt(ot.value.signalHoldDetail);
|
|
32350
32353
|
}
|
|
32351
32354
|
function Ot() {
|
|
32352
|
-
Ce.value = ft(ot.value.signalHold), we.value = ft(st.value.signalHoldDetail);
|
|
32353
|
-
}
|
|
32354
|
-
function kt() {
|
|
32355
32355
|
Te.value = /* @__PURE__ */ new Date();
|
|
32356
32356
|
}
|
|
32357
|
-
function
|
|
32357
|
+
function kt() {
|
|
32358
32358
|
if (!Te.value || M.value === i.HangedUp) return;
|
|
32359
32359
|
let e = /* @__PURE__ */ new Date(), t = new Date(Te.value), n = Math.abs(e.getTime() - t.getTime()), r = Math.ceil(n / 1e3);
|
|
32360
|
-
r >= 40 ? (Ce.value =
|
|
32360
|
+
r >= 40 ? (Ce.value = at.value.connectionIssues, we.value = ot.value.connectionIssuesStrong, se.value = 0) : r > 20 && (Ce.value = at.value.connectionIssues, we.value = ot.value.connectionIssuesMedium, se.value = 1);
|
|
32361
32361
|
}
|
|
32362
|
-
async function
|
|
32363
|
-
await
|
|
32362
|
+
async function At(e) {
|
|
32363
|
+
await en(), N.client = w(new f());
|
|
32364
32364
|
let t = new y(e);
|
|
32365
32365
|
if (N.agent = w(await N.client.createCallAgent(t)), N.deviceManager = await N.client.getDeviceManager(), j.value = await N.deviceManager.askDevicePermission({
|
|
32366
32366
|
video: !0,
|
|
32367
32367
|
audio: !0
|
|
32368
|
-
}), (await N.deviceManager.getCameras()).length || (j.value.video = !1), be.value = window.setInterval(
|
|
32369
|
-
|
|
32368
|
+
}), (await N.deviceManager.getCameras()).length || (j.value.video = !1), be.value = window.setInterval(Zt, 5e3), !j.value.audio || !j.value.video) {
|
|
32369
|
+
_t(i.DevicePermissionDenied);
|
|
32370
32370
|
return;
|
|
32371
32371
|
}
|
|
32372
|
-
N.agent.on("incomingCall",
|
|
32372
|
+
N.agent.on("incomingCall", jt), x.isCallee ? S("ready") : S("start-call");
|
|
32373
32373
|
}
|
|
32374
|
-
async function
|
|
32374
|
+
async function jt(e) {
|
|
32375
32375
|
if (!xe.value) try {
|
|
32376
|
-
xe.value = !0, N.incomingCall = e.incomingCall, await
|
|
32376
|
+
xe.value = !0, N.incomingCall = e.incomingCall, await Pt();
|
|
32377
32377
|
} catch (e) {
|
|
32378
32378
|
console.log("error occured during starting call", e);
|
|
32379
32379
|
} finally {
|
|
32380
32380
|
xe.value = !1;
|
|
32381
32381
|
}
|
|
32382
32382
|
}
|
|
32383
|
-
async function
|
|
32384
|
-
let e = await
|
|
32383
|
+
async function Mt() {
|
|
32384
|
+
let e = await Ft();
|
|
32385
32385
|
return ue.value = e, e ? { localVideoStreams: [e] } : void 0;
|
|
32386
32386
|
}
|
|
32387
|
-
async function
|
|
32387
|
+
async function Nt() {
|
|
32388
32388
|
try {
|
|
32389
|
-
|
|
32390
|
-
let e = { videoOptions: await
|
|
32391
|
-
N.call = N.agent.startCall(t, e),
|
|
32389
|
+
_t(i.Dialing);
|
|
32390
|
+
let e = { videoOptions: await Mt() }, t = [{ communicationUserId: x.participant.videoCallIdentityId }];
|
|
32391
|
+
N.call = N.agent.startCall(t, e), Lt(), await Rt(), It();
|
|
32392
32392
|
} catch (e) {
|
|
32393
32393
|
console.error(e);
|
|
32394
32394
|
}
|
|
32395
32395
|
}
|
|
32396
|
-
async function
|
|
32397
|
-
let e = await
|
|
32396
|
+
async function Pt() {
|
|
32397
|
+
let e = await Mt();
|
|
32398
32398
|
try {
|
|
32399
32399
|
N.call = await N.incomingCall.accept({ videoOptions: e });
|
|
32400
32400
|
} catch (e) {
|
|
32401
32401
|
console.error("Error occurred during accepting call", e);
|
|
32402
32402
|
}
|
|
32403
|
-
|
|
32403
|
+
Lt(), await Rt(), It();
|
|
32404
32404
|
}
|
|
32405
|
-
async function
|
|
32405
|
+
async function Ft() {
|
|
32406
32406
|
let e = (await N.deviceManager.getCameras())[0];
|
|
32407
32407
|
if (e) return new g(e);
|
|
32408
32408
|
console.error("No camera device found on the system");
|
|
32409
32409
|
}
|
|
32410
|
-
function
|
|
32411
|
-
N.call.on("stateChanged",
|
|
32412
|
-
e.added.forEach(
|
|
32413
|
-
}), N.call.remoteParticipants.forEach(
|
|
32414
|
-
e.added.forEach(
|
|
32410
|
+
function It() {
|
|
32411
|
+
N.call.on("stateChanged", Bt), N.call.on("localVideoStreamsUpdated", (e) => {
|
|
32412
|
+
e.added.forEach(Ut), e.removed.forEach(Ht);
|
|
32413
|
+
}), N.call.remoteParticipants.forEach(Gt), N.call.on("remoteParticipantsUpdated", (e) => {
|
|
32414
|
+
e.added.forEach(Gt);
|
|
32415
32415
|
}), N.call.on("isScreenSharingOnChanged", () => {
|
|
32416
32416
|
te.value = N.call.isScreenSharingOn;
|
|
32417
32417
|
});
|
|
32418
32418
|
}
|
|
32419
|
-
function
|
|
32420
|
-
le.value = N.call.feature(_.UserFacingDiagnostics), le.value.media.on("diagnosticChanged",
|
|
32419
|
+
function Lt() {
|
|
32420
|
+
le.value = N.call.feature(_.UserFacingDiagnostics), le.value.media.on("diagnosticChanged", zt), le.value.network.on("diagnosticChanged", zt);
|
|
32421
32421
|
}
|
|
32422
|
-
async function
|
|
32422
|
+
async function Rt() {
|
|
32423
32423
|
if (!(!ue.value || de.value)) try {
|
|
32424
32424
|
let e = ue.value.feature(_.VideoEffects), t = new b();
|
|
32425
32425
|
if (!await e.isSupported(t)) return;
|
|
@@ -32430,41 +32430,41 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32430
32430
|
console.error("Unable to initialize background blur", e);
|
|
32431
32431
|
}
|
|
32432
32432
|
}
|
|
32433
|
-
function
|
|
32434
|
-
if (e.diagnostic === "speakingWhileMicrophoneIsMuted") {
|
|
32433
|
+
function zt(e) {
|
|
32434
|
+
if (console.log("Diagnostic info changed:", e), e.diagnostic === "speakingWhileMicrophoneIsMuted") {
|
|
32435
32435
|
Ae.value = e.value === !0;
|
|
32436
32436
|
return;
|
|
32437
32437
|
}
|
|
32438
32438
|
(e.diagnostic === "networkReceiveQuality" || e.diagnostic === "networkSendQuality") && (e.value === v.Bad ? (console.error(`${e.diagnostic} is bad quality`), se.value = 0) : e.value === v.Poor ? (console.error(`${e.diagnostic} is poor quality`), se.value = 1) : se.value = 2);
|
|
32439
32439
|
}
|
|
32440
|
-
function
|
|
32440
|
+
function Bt() {
|
|
32441
32441
|
switch (N.call.state) {
|
|
32442
32442
|
case "EarlyMedia":
|
|
32443
|
-
|
|
32443
|
+
_t(i.Dialing);
|
|
32444
32444
|
break;
|
|
32445
32445
|
case "Ringing":
|
|
32446
|
-
|
|
32446
|
+
_t(i.Ringing);
|
|
32447
32447
|
break;
|
|
32448
32448
|
case "Connected":
|
|
32449
|
-
|
|
32449
|
+
_t(i.Connected);
|
|
32450
32450
|
break;
|
|
32451
32451
|
case "Disconnected":
|
|
32452
32452
|
let e = N.call.callEndReason;
|
|
32453
|
-
console.log("Call end reason:", e), console.log("Code:", e?.code), console.log("SubCode:", e?.subCode),
|
|
32453
|
+
console.log("Call end reason:", e), console.log("Code:", e?.code), console.log("SubCode:", e?.subCode), Tt();
|
|
32454
32454
|
break;
|
|
32455
32455
|
}
|
|
32456
32456
|
}
|
|
32457
|
-
function
|
|
32457
|
+
function Vt(e) {
|
|
32458
32458
|
let t = String(e);
|
|
32459
|
-
return
|
|
32459
|
+
return dt(Ke.value.endReasons?.[t] || "");
|
|
32460
32460
|
}
|
|
32461
|
-
async function
|
|
32461
|
+
async function Ht(e) {
|
|
32462
32462
|
if (!e || e.mediaStreamType !== "ScreenSharing" || !_e.value) return;
|
|
32463
32463
|
_e.value.dispose();
|
|
32464
32464
|
let t = Pe.value;
|
|
32465
32465
|
t && (t.style.display = "none", Ne.value.style.display = "flex");
|
|
32466
32466
|
}
|
|
32467
|
-
async function
|
|
32467
|
+
async function Ut(e) {
|
|
32468
32468
|
if (!e || e.mediaStreamType !== "ScreenSharing") return;
|
|
32469
32469
|
_e.value = await new h(e).createView();
|
|
32470
32470
|
let t = Pe.value;
|
|
@@ -32473,7 +32473,7 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32473
32473
|
let n = t.querySelector("video");
|
|
32474
32474
|
n.style.objectFit = "contain";
|
|
32475
32475
|
}
|
|
32476
|
-
async function
|
|
32476
|
+
async function Wt(e) {
|
|
32477
32477
|
if (console.log("Displaying local video stream", e, ue.value), e && e.source && ue.value && ue.value.source && he.value && ue.value.source.id == e.source.id) return !0;
|
|
32478
32478
|
try {
|
|
32479
32479
|
he.value = new h(e);
|
|
@@ -32485,36 +32485,36 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32485
32485
|
}
|
|
32486
32486
|
return ue.value = e, !0;
|
|
32487
32487
|
}
|
|
32488
|
-
async function
|
|
32489
|
-
e.videoStreams.forEach(
|
|
32490
|
-
e.added.forEach(
|
|
32488
|
+
async function Gt(e) {
|
|
32489
|
+
e.videoStreams.forEach(Kt), e.on("videoStreamsUpdated", (e) => {
|
|
32490
|
+
e.added.forEach(Kt);
|
|
32491
32491
|
});
|
|
32492
32492
|
}
|
|
32493
|
-
async function
|
|
32494
|
-
if (e.mediaStreamType === "Video" && (await
|
|
32493
|
+
async function Kt(e) {
|
|
32494
|
+
if (e.mediaStreamType === "Video" && (await qt(e), e.on("isAvailableChanged", async () => await qt(e))), e.mediaStreamType === "ScreenSharing" && e.on("isAvailableChanged", Yt), e.mediaStreamType === "ScreenSharing" && e.isAvailable) {
|
|
32495
32495
|
ge.value = new h(e);
|
|
32496
32496
|
let t = await ge.value.createView(), n = Me.value;
|
|
32497
32497
|
if (!n) return;
|
|
32498
|
-
|
|
32498
|
+
Jt(!0), oe.value = !0, Qt(n), n.replaceChildren(t.target);
|
|
32499
32499
|
}
|
|
32500
32500
|
}
|
|
32501
|
-
async function
|
|
32501
|
+
async function qt(e) {
|
|
32502
32502
|
if (!e.isAvailable) return;
|
|
32503
32503
|
ge.value = new h(e);
|
|
32504
32504
|
let t = await ge.value.createView(), n = je.value;
|
|
32505
|
-
n && (n.hidden = !1, n.replaceChildren(t.target),
|
|
32505
|
+
n && (n.hidden = !1, n.replaceChildren(t.target), Qt(n), Jt(!1));
|
|
32506
32506
|
}
|
|
32507
|
-
function
|
|
32507
|
+
function Jt(e) {
|
|
32508
32508
|
let t = je.value, n = Me.value;
|
|
32509
32509
|
!t || !n || (t.style.display = e ? "none" : "block", n.style.display = e ? "flex" : "none");
|
|
32510
32510
|
}
|
|
32511
|
-
function
|
|
32512
|
-
oe.value = !1,
|
|
32511
|
+
function Yt() {
|
|
32512
|
+
oe.value = !1, Jt(!1);
|
|
32513
32513
|
}
|
|
32514
|
-
async function
|
|
32515
|
-
|
|
32514
|
+
async function Xt() {
|
|
32515
|
+
Zt(!0);
|
|
32516
32516
|
}
|
|
32517
|
-
async function
|
|
32517
|
+
async function Zt(e = !1) {
|
|
32518
32518
|
let t = N.call?.state;
|
|
32519
32519
|
if (t === "Connecting" || t === "EarlyMedia") return;
|
|
32520
32520
|
let n = (await N.deviceManager.getCameras()).filter((e) => e.name != "OBS Virtual Camera");
|
|
@@ -32522,18 +32522,18 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32522
32522
|
for (let t = 0; t < ve.value; t++) {
|
|
32523
32523
|
(e || t != 0) && (ye.value = (ye.value + 1) % ve.value);
|
|
32524
32524
|
let r = n[ye.value];
|
|
32525
|
-
if (await
|
|
32525
|
+
if (await Wt(new g(r))) break;
|
|
32526
32526
|
}
|
|
32527
32527
|
}
|
|
32528
|
-
function
|
|
32528
|
+
function Qt(e) {
|
|
32529
32529
|
if (!e) return;
|
|
32530
32530
|
let t = e.querySelector("video");
|
|
32531
32531
|
t && (t.style.objectFit = "contain", t.disablePictureInPicture = !1);
|
|
32532
32532
|
}
|
|
32533
|
-
async function
|
|
32533
|
+
async function $t() {
|
|
32534
32534
|
N.call && N.call.state !== "Disconnected" && (await N.call.hangUp({ forEveryone: !0 }), await N.agent.dispose()), S("end-call", T.value);
|
|
32535
32535
|
}
|
|
32536
|
-
async function
|
|
32536
|
+
async function en() {
|
|
32537
32537
|
return o ||= Promise.all([
|
|
32538
32538
|
import("@azure/communication-calling"),
|
|
32539
32539
|
import("@azure/communication-common"),
|
|
@@ -32542,7 +32542,7 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32542
32542
|
f = e.CallClient, h = e.VideoStreamRenderer, g = e.LocalVideoStream, _ = e.Features, v = e.DiagnosticQuality, y = t.AzureCommunicationTokenCredential, b = n.BackgroundBlurEffect;
|
|
32543
32543
|
}), o;
|
|
32544
32544
|
}
|
|
32545
|
-
async function
|
|
32545
|
+
async function tn() {
|
|
32546
32546
|
d ||= import("./browser-1gKVsH6_.js").then((e) => e.t);
|
|
32547
32547
|
let { AzureLogger: e, setLogLevel: t } = await d;
|
|
32548
32548
|
e.log = (...e) => console.log(...e), t("info"), e.log = (...e) => {
|
|
@@ -32550,29 +32550,29 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32550
32550
|
T.value = T.value.splice(1 - PZ).concat(t);
|
|
32551
32551
|
};
|
|
32552
32552
|
}
|
|
32553
|
-
function
|
|
32553
|
+
function nn() {
|
|
32554
32554
|
let e = oe.value ? Me.value : je.value;
|
|
32555
32555
|
e && e.querySelector("video")?.requestFullscreen();
|
|
32556
32556
|
}
|
|
32557
|
-
function
|
|
32557
|
+
function rn() {
|
|
32558
32558
|
let e = oe.value ? Me.value : je.value;
|
|
32559
32559
|
if (!e) return;
|
|
32560
32560
|
let t = e.querySelector("video");
|
|
32561
32561
|
t && (document.pictureInPictureElement ? t.exitPictureInPicture() : document.pictureInPictureEnabled && t.requestPictureInPicture());
|
|
32562
32562
|
}
|
|
32563
|
-
async function
|
|
32563
|
+
async function an() {
|
|
32564
32564
|
N.call && N.call.isScreenSharingOn ? await N.call.stopScreenSharing() : await N.call.startScreenSharing();
|
|
32565
32565
|
}
|
|
32566
32566
|
return n({
|
|
32567
|
-
CallDeclined:
|
|
32568
|
-
CallAnswered:
|
|
32569
|
-
CallForDataReceived:
|
|
32570
|
-
CallClosedWithStatusCode:
|
|
32571
|
-
CallHeartbeatReceived:
|
|
32572
|
-
CallSignalHoldDetected:
|
|
32573
|
-
CallStartVideoCall:
|
|
32574
|
-
CallHangUp:
|
|
32575
|
-
InitializeAcsConnection:
|
|
32567
|
+
CallDeclined: xt,
|
|
32568
|
+
CallAnswered: St,
|
|
32569
|
+
CallForDataReceived: Ct,
|
|
32570
|
+
CallClosedWithStatusCode: Et,
|
|
32571
|
+
CallHeartbeatReceived: Ot,
|
|
32572
|
+
CallSignalHoldDetected: Dt,
|
|
32573
|
+
CallStartVideoCall: wt,
|
|
32574
|
+
CallHangUp: Tt,
|
|
32575
|
+
InitializeAcsConnection: At
|
|
32576
32576
|
}), (e, n) => {
|
|
32577
32577
|
let r = ce("BDLoader");
|
|
32578
32578
|
return k(), l("div", aZ, [m($q, null, {
|
|
@@ -32585,23 +32585,23 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32585
32585
|
}), m(eJ, null, {
|
|
32586
32586
|
default: I(() => [m(Qq, {
|
|
32587
32587
|
sm: "12",
|
|
32588
|
-
lg:
|
|
32588
|
+
lg: et.value ? "12" : "8"
|
|
32589
32589
|
}, {
|
|
32590
|
-
default: I(() => [u("div", { class: D(["incoming",
|
|
32590
|
+
default: I(() => [u("div", { class: D(["incoming", Ue.value]) }, [rt.value ? (k(), l("div", oZ, [
|
|
32591
32591
|
m(r, {
|
|
32592
32592
|
size: "lg",
|
|
32593
|
-
message:
|
|
32594
|
-
stopAnimation:
|
|
32593
|
+
message: ft.value,
|
|
32594
|
+
stopAnimation: et.value || tt.value || it.value
|
|
32595
32595
|
}, null, 8, ["message", "stopAnimation"]),
|
|
32596
|
-
|
|
32597
|
-
|
|
32598
|
-
|
|
32596
|
+
He.value ? (k(), l("div", sZ, [u("div", cZ, [m(Ri, { class: "icon-xl icon-state-error" })]), u("span", null, P(Ye.value.permissionDeniedForAudio), 1)])) : c("", !0),
|
|
32597
|
+
Ve.value ? (k(), l("div", lZ, [u("div", uZ, [m(oo, { class: "icon-xl icon-state-error" })]), u("span", null, P(Ye.value.permissionDeniedForVideo), 1)])) : c("", !0),
|
|
32598
|
+
et.value || tt.value || it.value ? (k(), s(R, {
|
|
32599
32599
|
key: 2,
|
|
32600
32600
|
variant: "primary",
|
|
32601
32601
|
class: "text-center",
|
|
32602
|
-
onClick:
|
|
32602
|
+
onClick: $t
|
|
32603
32603
|
}, {
|
|
32604
|
-
default: I(() => [p(P(
|
|
32604
|
+
default: I(() => [p(P(qe.value.closeWindow), 1)]),
|
|
32605
32605
|
_: 1
|
|
32606
32606
|
})) : c("", !0)
|
|
32607
32607
|
])) : (k(), l("div", dZ, [
|
|
@@ -32618,22 +32618,22 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32618
32618
|
u("div", fZ, [m(R, {
|
|
32619
32619
|
variant: "primary",
|
|
32620
32620
|
class: "text-center",
|
|
32621
|
-
onClick:
|
|
32621
|
+
onClick: nn
|
|
32622
32622
|
}, {
|
|
32623
|
-
default: I(() => [m(xa), u("span", null, P(
|
|
32623
|
+
default: I(() => [m(xa), u("span", null, P(qe.value.fullScreen), 1)]),
|
|
32624
32624
|
_: 1
|
|
32625
32625
|
}), !E && !re.value ? (k(), s(R, {
|
|
32626
32626
|
key: 0,
|
|
32627
32627
|
variant: "primary",
|
|
32628
32628
|
class: "text-center",
|
|
32629
|
-
onClick:
|
|
32629
|
+
onClick: rn
|
|
32630
32630
|
}, {
|
|
32631
|
-
default: I(() => [m(xa), u("span", null, P(
|
|
32631
|
+
default: I(() => [m(xa), u("span", null, P(qe.value.miniPlayer), 1)]),
|
|
32632
32632
|
_: 1
|
|
32633
32633
|
})) : c("", !0)])
|
|
32634
32634
|
]))], 2)]),
|
|
32635
32635
|
_: 1
|
|
32636
|
-
}, 8, ["lg"]),
|
|
32636
|
+
}, 8, ["lg"]), et.value ? c("", !0) : (k(), s(Qq, {
|
|
32637
32637
|
key: 0,
|
|
32638
32638
|
sm: "12",
|
|
32639
32639
|
lg: "4"
|
|
@@ -32652,95 +32652,95 @@ var iZ = /*#__PURE__*/ L(tZ, [["render", rZ]]), aZ = { class: "video-call-templa
|
|
|
32652
32652
|
ref: Pe,
|
|
32653
32653
|
class: "outgoing__screenshare"
|
|
32654
32654
|
}, null, 512),
|
|
32655
|
-
u("div", _Z, [
|
|
32655
|
+
u("div", _Z, [Ae.value ? (k(), l("div", vZ, [m(Ri), u("span", null, P(qe.value.microphoneMutedNotice), 1)])) : c("", !0)])
|
|
32656
32656
|
]),
|
|
32657
32657
|
u("div", yZ, [
|
|
32658
32658
|
Se((k(), s(R, {
|
|
32659
32659
|
class: D({ "btn-danger": ke.value }),
|
|
32660
|
-
onClick:
|
|
32660
|
+
onClick: vt
|
|
32661
32661
|
}, {
|
|
32662
32662
|
default: I(() => [ke.value ? (k(), l("img", {
|
|
32663
32663
|
key: 0,
|
|
32664
32664
|
src: UX,
|
|
32665
|
-
alt:
|
|
32665
|
+
alt: ct.value
|
|
32666
32666
|
}, null, 8, bZ)) : (k(), l("img", {
|
|
32667
32667
|
key: 1,
|
|
32668
32668
|
src: WX,
|
|
32669
|
-
alt:
|
|
32669
|
+
alt: ct.value
|
|
32670
32670
|
}, null, 8, xZ))]),
|
|
32671
32671
|
_: 1
|
|
32672
|
-
}, 8, ["class"])), [[F(DK),
|
|
32672
|
+
}, 8, ["class"])), [[F(DK), ct.value]]),
|
|
32673
32673
|
Se((k(), s(R, {
|
|
32674
32674
|
class: D({ "btn-danger": Oe.value }),
|
|
32675
|
-
onClick:
|
|
32675
|
+
onClick: yt
|
|
32676
32676
|
}, {
|
|
32677
32677
|
default: I(() => [Oe.value ? (k(), l("img", {
|
|
32678
32678
|
key: 0,
|
|
32679
32679
|
src: GX,
|
|
32680
|
-
alt:
|
|
32680
|
+
alt: lt.value
|
|
32681
32681
|
}, null, 8, SZ)) : (k(), l("img", {
|
|
32682
32682
|
key: 1,
|
|
32683
32683
|
src: KX,
|
|
32684
|
-
alt:
|
|
32684
|
+
alt: lt.value
|
|
32685
32685
|
}, null, 8, CZ))]),
|
|
32686
32686
|
_: 1
|
|
32687
|
-
}, 8, ["class"])), [[F(DK),
|
|
32687
|
+
}, 8, ["class"])), [[F(DK), lt.value]]),
|
|
32688
32688
|
Se((k(), s(R, {
|
|
32689
32689
|
class: D(["blur-button", {
|
|
32690
32690
|
off: De.value,
|
|
32691
32691
|
unavailable: pe.value
|
|
32692
32692
|
}]),
|
|
32693
|
-
onClick:
|
|
32693
|
+
onClick: bt
|
|
32694
32694
|
}, {
|
|
32695
32695
|
default: I(() => [m(iZ), m(eZ)]),
|
|
32696
32696
|
_: 1
|
|
32697
|
-
}, 8, ["class"])), [[F(DK),
|
|
32697
|
+
}, 8, ["class"])), [[F(DK), ut.value]])
|
|
32698
32698
|
]),
|
|
32699
|
-
|
|
32699
|
+
Be.value && !it.value && !re.value && !rt.value ? (k(), s(R, {
|
|
32700
32700
|
key: 0,
|
|
32701
32701
|
variant: te.value ? "danger" : "primary",
|
|
32702
32702
|
class: "share-button",
|
|
32703
|
-
onClick:
|
|
32703
|
+
onClick: an
|
|
32704
32704
|
}, {
|
|
32705
|
-
default: I(() => [m(xa), u("span", null, P(
|
|
32705
|
+
default: I(() => [m(xa), u("span", null, P(Ze.value), 1)]),
|
|
32706
32706
|
_: 1
|
|
32707
32707
|
}, 8, ["variant"])) : c("", !0),
|
|
32708
|
-
|
|
32708
|
+
ze.value ? (k(), l(t, { key: 1 }, [m(R, {
|
|
32709
32709
|
class: "text-center",
|
|
32710
|
-
onClick:
|
|
32710
|
+
onClick: Xt
|
|
32711
32711
|
}, {
|
|
32712
|
-
default: I(() => [p(P(
|
|
32712
|
+
default: I(() => [p(P(qe.value.switchCamera), 1)]),
|
|
32713
32713
|
_: 1
|
|
32714
|
-
}), u("p", wZ, P(
|
|
32715
|
-
|
|
32714
|
+
}), u("p", wZ, P(Re.value), 1)], 64)) : c("", !0),
|
|
32715
|
+
Ve.value ? (k(), l("div", TZ, [u("div", EZ, [m(oo, { class: "icon-xxl icon-state-error" })]), u("span", null, P(Ye.value.permissionDeniedForVideo), 1)])) : c("", !0)
|
|
32716
32716
|
]),
|
|
32717
|
-
!
|
|
32717
|
+
!tt.value && !it.value ? (k(), s(R, {
|
|
32718
32718
|
key: 0,
|
|
32719
32719
|
variant: "danger",
|
|
32720
32720
|
class: "end-call-button text-center w-100",
|
|
32721
|
-
onClick:
|
|
32721
|
+
onClick: $t
|
|
32722
32722
|
}, {
|
|
32723
|
-
default: I(() => [m(zn), u("span", null, P(
|
|
32723
|
+
default: I(() => [m(zn), u("span", null, P(qe.value.endCall), 1)]),
|
|
32724
32724
|
_: 1
|
|
32725
32725
|
})) : c("", !0),
|
|
32726
32726
|
u("div", DZ, [
|
|
32727
|
-
u("div", { class: D(["settings__signal",
|
|
32727
|
+
u("div", { class: D(["settings__signal", We.value]) }, [n[0] ||= u("ul", { class: "indicator" }, [
|
|
32728
32728
|
u("li"),
|
|
32729
32729
|
u("li"),
|
|
32730
32730
|
u("li")
|
|
32731
|
-
], -1), u("p", null, P(
|
|
32732
|
-
u("div", OZ, [u("p", kZ, P(
|
|
32731
|
+
], -1), u("p", null, P(Ge.value), 1)], 2),
|
|
32732
|
+
u("div", OZ, [u("p", kZ, P(pt.value), 1), mt.value ? (k(), l("small", AZ, P(mt.value), 1)) : c("", !0)]),
|
|
32733
32733
|
u("div", jZ, [
|
|
32734
|
-
u("p", null, [u("b", null, P(
|
|
32735
|
-
u("p", null, P(
|
|
32734
|
+
u("p", null, [u("b", null, P(Qe.value), 1)]),
|
|
32735
|
+
u("p", null, P($e.value), 1),
|
|
32736
32736
|
u("p", null, [
|
|
32737
32737
|
u("a", {
|
|
32738
32738
|
href: x.videoTestUrl,
|
|
32739
32739
|
target: "_blank",
|
|
32740
32740
|
rel: "noopener noreferrer"
|
|
32741
|
-
}, P(
|
|
32741
|
+
}, P(qe.value.testCall), 9, MZ),
|
|
32742
32742
|
n[1] ||= p(" • ", -1),
|
|
32743
|
-
u("a", NZ, P(
|
|
32743
|
+
u("a", NZ, P(qe.value.serviceDesk), 1)
|
|
32744
32744
|
])
|
|
32745
32745
|
])
|
|
32746
32746
|
])
|