jssz-meeting-component 1.2.2 → 1.2.3
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.esm.js +1531 -1530
- package/dist/index.umd.js +1 -1
- package/dist/src/components/call.vue.d.ts.map +1 -1
- package/dist/src/components/meeting.vue.d.ts.map +1 -1
- package/dist/src/internal/ManageMembers.vue.d.ts.map +1 -1
- package/dist/src/utils/srtc.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -20380,7 +20380,6 @@ function normalizeBrokerUrl(baseUrl) {
|
|
|
20380
20380
|
throw new Error("MQTT 初始化失败:mqttUrl 为空");
|
|
20381
20381
|
}
|
|
20382
20382
|
const normalizedScheme = trimmed.startsWith("tcp://") ? `mqtt://${trimmed.slice("tcp://".length)}` : trimmed;
|
|
20383
|
-
console.log("normalizedScheme:", normalizedScheme);
|
|
20384
20383
|
const withoutTrailingSlash = normalizedScheme.replace(/\/+$/g, "");
|
|
20385
20384
|
if (withoutTrailingSlash.endsWith(DEFAULT_MQTT_PATH)) {
|
|
20386
20385
|
return withoutTrailingSlash;
|
|
@@ -37741,7 +37740,6 @@ const srtc = new Tn({
|
|
|
37741
37740
|
});
|
|
37742
37741
|
srtc.onNotifyChannelEvent = async (evt) => {
|
|
37743
37742
|
var _a25, _b25, _c2, _d, _e, _f2, _g2, _h, _i2, _j, _k, _l2, _m;
|
|
37744
|
-
console.log(evt);
|
|
37745
37743
|
switch (evt.type) {
|
|
37746
37744
|
case on.CONNECTION_QUALITY_CHANGED:
|
|
37747
37745
|
handleConnectionQualityChanged(evt.data);
|
|
@@ -37962,7 +37960,6 @@ async function afterJoin() {
|
|
|
37962
37960
|
item.videoLoadFailed = false;
|
|
37963
37961
|
});
|
|
37964
37962
|
for (const userinfo of Object.values(srtc.getUsersInfo(true))) {
|
|
37965
|
-
console.log("userinfo", userinfo);
|
|
37966
37963
|
await ensurePreferredRemoteVideo(userinfo);
|
|
37967
37964
|
}
|
|
37968
37965
|
scheduleMountTracks(0);
|
|
@@ -40939,1585 +40936,1621 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
40939
40936
|
}
|
|
40940
40937
|
});
|
|
40941
40938
|
const DeviceSelector = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ced67da8"]]);
|
|
40942
|
-
const _hoisted_1$o =
|
|
40943
|
-
|
|
40944
|
-
class: "
|
|
40945
|
-
|
|
40946
|
-
const _hoisted_2$m = { class: "js-call-dialog-container" };
|
|
40947
|
-
const _hoisted_3$l = { class: "status-bar" };
|
|
40948
|
-
const _hoisted_4$j = { class: "status-left" };
|
|
40949
|
-
const _hoisted_5$g = {
|
|
40950
|
-
key: 0,
|
|
40951
|
-
class: "caller-info",
|
|
40952
|
-
title: "来电人"
|
|
40953
|
-
};
|
|
40954
|
-
const _hoisted_6$f = {
|
|
40955
|
-
class: "avatar",
|
|
40956
|
-
style: { "width": "35px", "height": "35px", "font-size": "16px" }
|
|
40939
|
+
const _hoisted_1$o = ["title"];
|
|
40940
|
+
const _hoisted_2$m = {
|
|
40941
|
+
class: "signal-bars",
|
|
40942
|
+
"aria-hidden": "true"
|
|
40957
40943
|
};
|
|
40958
|
-
const
|
|
40959
|
-
const _hoisted_8$d = { class: "caller-name" };
|
|
40960
|
-
const _hoisted_9$b = {
|
|
40944
|
+
const _hoisted_3$l = {
|
|
40961
40945
|
key: 0,
|
|
40962
|
-
class: "
|
|
40946
|
+
class: "signal-text"
|
|
40963
40947
|
};
|
|
40964
|
-
const
|
|
40965
|
-
const
|
|
40966
|
-
const
|
|
40967
|
-
const
|
|
40968
|
-
const
|
|
40969
|
-
const _hoisted_15$6 = { class: "avatar" };
|
|
40970
|
-
const _hoisted_16$6 = { class: "video-loading-overlay" };
|
|
40971
|
-
const _hoisted_17$5 = { class: "video-loading-text" };
|
|
40972
|
-
const _hoisted_18$5 = { class: "video-loading-overlay failed" };
|
|
40973
|
-
const _hoisted_19$5 = ["disabled", "onClick"];
|
|
40974
|
-
const _hoisted_20$5 = { class: "video-meta" };
|
|
40975
|
-
const _hoisted_21$3 = { class: "member-name" };
|
|
40976
|
-
const _hoisted_22$3 = {
|
|
40948
|
+
const _hoisted_4$j = { class: "network-quality-popup-shell" };
|
|
40949
|
+
const _hoisted_5$g = { class: "popup-header" };
|
|
40950
|
+
const _hoisted_6$f = { class: "popup-header-actions" };
|
|
40951
|
+
const _hoisted_7$e = { class: "popup-summary" };
|
|
40952
|
+
const _hoisted_8$d = {
|
|
40977
40953
|
key: 0,
|
|
40978
|
-
class: "
|
|
40979
|
-
};
|
|
40980
|
-
const _hoisted_23$3 = {
|
|
40981
|
-
key: 1,
|
|
40982
|
-
class: "video-empty"
|
|
40954
|
+
class: "popup-reasons"
|
|
40983
40955
|
};
|
|
40984
|
-
const
|
|
40956
|
+
const _hoisted_9$b = { class: "popup-section" };
|
|
40957
|
+
const _hoisted_10$b = { class: "popup-grid" };
|
|
40958
|
+
const _hoisted_11$a = { class: "popup-item-label" };
|
|
40959
|
+
const _hoisted_12$a = { class: "popup-item-value" };
|
|
40960
|
+
const _hoisted_13$8 = { class: "popup-section" };
|
|
40961
|
+
const _hoisted_14$7 = { class: "popup-grid" };
|
|
40962
|
+
const _hoisted_15$6 = { class: "popup-item-label" };
|
|
40963
|
+
const _hoisted_16$6 = { class: "popup-item-value" };
|
|
40964
|
+
const _hoisted_17$5 = { class: "popup-header" };
|
|
40965
|
+
const _hoisted_18$5 = { class: "popup-header-actions" };
|
|
40966
|
+
const _hoisted_19$5 = { class: "popup-section-container" };
|
|
40967
|
+
const _hoisted_20$5 = ["onClick"];
|
|
40968
|
+
const _hoisted_21$3 = { class: "detail-section-main" };
|
|
40969
|
+
const _hoisted_22$3 = { class: "popup-section-title" };
|
|
40970
|
+
const _hoisted_23$3 = { class: "popup-section-count" };
|
|
40971
|
+
const _hoisted_24$3 = { class: "detail-section-icon" };
|
|
40985
40972
|
const _hoisted_25$3 = {
|
|
40986
40973
|
key: 0,
|
|
40987
|
-
class: "
|
|
40974
|
+
class: "metric-card-list"
|
|
40988
40975
|
};
|
|
40989
|
-
const _hoisted_26$3 = {
|
|
40990
|
-
const _hoisted_27$3 = { class: "
|
|
40991
|
-
const _hoisted_28$3 = {
|
|
40976
|
+
const _hoisted_26$3 = { class: "metric-card-header" };
|
|
40977
|
+
const _hoisted_27$3 = { class: "metric-card-title" };
|
|
40978
|
+
const _hoisted_28$3 = { class: "metric-card-subtitle" };
|
|
40979
|
+
const _hoisted_29$2 = { class: "metric-card-grid" };
|
|
40980
|
+
const _hoisted_30$2 = { class: "popup-item-label" };
|
|
40981
|
+
const _hoisted_31$1 = { class: "popup-item-value" };
|
|
40982
|
+
const _hoisted_32$1 = {
|
|
40992
40983
|
key: 1,
|
|
40993
|
-
class: "
|
|
40984
|
+
class: "popup-empty"
|
|
40994
40985
|
};
|
|
40995
|
-
const DEFAULT_SUB_VIDEO_HEIGHT = 110;
|
|
40996
|
-
const DEFAULT_SUB_VIDEO_WIDTH = 190;
|
|
40997
|
-
const SUB_VIDEO_GAP = 12;
|
|
40998
|
-
const CONTROL_BAR_HEIGHT = 90;
|
|
40999
|
-
const STATUS_BAR_HEIGHT = 48;
|
|
41000
40986
|
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
41001
|
-
__name: "
|
|
40987
|
+
__name: "NetworkQualitySignal",
|
|
41002
40988
|
props: {
|
|
41003
40989
|
theme: { default: "dark" },
|
|
41004
|
-
|
|
41005
|
-
|
|
40990
|
+
size: { default: "default" },
|
|
40991
|
+
showText: { type: Boolean, default: false }
|
|
41006
40992
|
},
|
|
41007
40993
|
setup(__props) {
|
|
41008
|
-
const { meState: meState2 } = storeToRefs(useMeetingStore());
|
|
41009
40994
|
const props = __props;
|
|
41010
|
-
const
|
|
40995
|
+
const triggerRef = ref(null);
|
|
40996
|
+
const showPopup = ref(false);
|
|
40997
|
+
const advancedOpen = ref(false);
|
|
40998
|
+
const collapsedSections = ref({});
|
|
40999
|
+
const advancedDetails = ref();
|
|
41000
|
+
let detailTimer = null;
|
|
41011
41001
|
const themeClass = computed(() => `theme-${props.theme}`);
|
|
41012
|
-
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
|
|
41016
|
-
|
|
41017
|
-
|
|
41018
|
-
|
|
41019
|
-
|
|
41020
|
-
|
|
41021
|
-
|
|
41022
|
-
|
|
41023
|
-
|
|
41024
|
-
|
|
41025
|
-
|
|
41026
|
-
|
|
41027
|
-
|
|
41028
|
-
|
|
41029
|
-
|
|
41002
|
+
function formatValue(value, suffix = "", digits = 0) {
|
|
41003
|
+
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
41004
|
+
return `${value.toFixed(digits)}${suffix}`;
|
|
41005
|
+
}
|
|
41006
|
+
function formatMetricNumber(value, suffix = "", digits = 0) {
|
|
41007
|
+
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
41008
|
+
return `${value.toFixed(digits)}${suffix}`;
|
|
41009
|
+
}
|
|
41010
|
+
function formatBytes(value) {
|
|
41011
|
+
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
41012
|
+
if (value >= 1024 * 1024) return `${(value / (1024 * 1024)).toFixed(2)} MB`;
|
|
41013
|
+
if (value >= 1024) return `${(value / 1024).toFixed(1)} KB`;
|
|
41014
|
+
return `${value.toFixed(0)} B`;
|
|
41015
|
+
}
|
|
41016
|
+
function formatDimension(width, height) {
|
|
41017
|
+
if (!width || !height) return "--";
|
|
41018
|
+
return `${width} x ${height}`;
|
|
41019
|
+
}
|
|
41020
|
+
function formatLossRate(value) {
|
|
41021
|
+
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
41022
|
+
return `${value.toFixed(1)}%`;
|
|
41023
|
+
}
|
|
41024
|
+
function formatMos(value) {
|
|
41025
|
+
if (typeof value !== "number" || value <= 0 || Number.isNaN(value)) return "--";
|
|
41026
|
+
return value.toFixed(1);
|
|
41027
|
+
}
|
|
41028
|
+
function formatUpdatedAt(timestamp) {
|
|
41029
|
+
if (!timestamp) return "--";
|
|
41030
|
+
const date = new Date(timestamp);
|
|
41031
|
+
const hh = String(date.getHours()).padStart(2, "0");
|
|
41032
|
+
const mm = String(date.getMinutes()).padStart(2, "0");
|
|
41033
|
+
const ss = String(date.getSeconds()).padStart(2, "0");
|
|
41034
|
+
return `${hh}:${mm}:${ss}`;
|
|
41035
|
+
}
|
|
41036
|
+
function formatReason(value) {
|
|
41037
|
+
return value || "--";
|
|
41038
|
+
}
|
|
41039
|
+
function getMemberNameById(memberId) {
|
|
41040
|
+
var _a25;
|
|
41041
|
+
if (!memberId) return "";
|
|
41042
|
+
const matched = members.value.find(
|
|
41043
|
+
(member) => {
|
|
41044
|
+
var _a26;
|
|
41045
|
+
return ((_a26 = member == null ? void 0 : member.member) == null ? void 0 : _a26.memberId) === String(memberId);
|
|
41030
41046
|
}
|
|
41031
|
-
},
|
|
41032
|
-
{
|
|
41033
|
-
immediate: true
|
|
41034
|
-
}
|
|
41035
|
-
);
|
|
41036
|
-
const isCalling = computed(() => callStatus.value === "calling");
|
|
41037
|
-
const isReceiving = computed(() => callStatus.value === "receiving");
|
|
41038
|
-
const isConnected = computed(() => callStatus.value === "connected");
|
|
41039
|
-
const isListening = computed(() => callStatus.value === "listening");
|
|
41040
|
-
const isForcibleInsertion = computed(
|
|
41041
|
-
() => callStatus.value === "forcible-insertion"
|
|
41042
|
-
);
|
|
41043
|
-
const visibleMembers = computed(() => {
|
|
41044
|
-
return members.value.filter(
|
|
41045
|
-
(item) => item.roleType !== "4" && item.joinStaus === "1" && (!isListening.value || item.member.memberId !== getUserId())
|
|
41046
41047
|
);
|
|
41047
|
-
|
|
41048
|
-
|
|
41049
|
-
|
|
41050
|
-
|
|
41051
|
-
|
|
41052
|
-
|
|
41053
|
-
|
|
41054
|
-
|
|
41055
|
-
}
|
|
41056
|
-
|
|
41057
|
-
|
|
41058
|
-
|
|
41059
|
-
|
|
41048
|
+
return ((_a25 = matched == null ? void 0 : matched.member) == null ? void 0 : _a25.name) || "";
|
|
41049
|
+
}
|
|
41050
|
+
function startDetailRefresh() {
|
|
41051
|
+
stopDetailRefresh();
|
|
41052
|
+
refreshAdvancedDetails();
|
|
41053
|
+
detailTimer = window.setInterval(() => {
|
|
41054
|
+
refreshAdvancedDetails();
|
|
41055
|
+
}, 2e3);
|
|
41056
|
+
}
|
|
41057
|
+
function stopDetailRefresh() {
|
|
41058
|
+
if (detailTimer !== null) {
|
|
41059
|
+
window.clearInterval(detailTimer);
|
|
41060
|
+
detailTimer = null;
|
|
41060
41061
|
}
|
|
41061
|
-
|
|
41062
|
-
|
|
41062
|
+
}
|
|
41063
|
+
function refreshAdvancedDetails() {
|
|
41064
|
+
advancedDetails.value = readNetworkQualityMetricDetails();
|
|
41065
|
+
}
|
|
41066
|
+
function isSectionCollapsed(key) {
|
|
41067
|
+
return collapsedSections.value[key] ?? false;
|
|
41068
|
+
}
|
|
41069
|
+
function toggleSection(key) {
|
|
41070
|
+
collapsedSections.value[key] = !isSectionCollapsed(key);
|
|
41071
|
+
}
|
|
41072
|
+
function expandAllSections() {
|
|
41073
|
+
collapsedSections.value = Object.fromEntries(
|
|
41074
|
+
detailSections.value.map((section) => [section.key, false])
|
|
41063
41075
|
);
|
|
41064
|
-
|
|
41065
|
-
|
|
41066
|
-
|
|
41067
|
-
|
|
41068
|
-
|
|
41069
|
-
|
|
41070
|
-
|
|
41071
|
-
|
|
41072
|
-
|
|
41073
|
-
|
|
41074
|
-
|
|
41075
|
-
|
|
41076
|
-
|
|
41077
|
-
|
|
41076
|
+
}
|
|
41077
|
+
function collapseAllSections() {
|
|
41078
|
+
collapsedSections.value = Object.fromEntries(
|
|
41079
|
+
detailSections.value.map((section) => [section.key, true])
|
|
41080
|
+
);
|
|
41081
|
+
}
|
|
41082
|
+
function toggleAllSections() {
|
|
41083
|
+
if (allSectionsExpanded.value) {
|
|
41084
|
+
collapseAllSections();
|
|
41085
|
+
return;
|
|
41086
|
+
}
|
|
41087
|
+
expandAllSections();
|
|
41088
|
+
}
|
|
41089
|
+
function syncSectionCollapse(preserveExisting = true) {
|
|
41090
|
+
const nextState = {};
|
|
41091
|
+
for (const section of detailSections.value) {
|
|
41092
|
+
if (preserveExisting && section.key in collapsedSections.value) {
|
|
41093
|
+
nextState[section.key] = collapsedSections.value[section.key];
|
|
41094
|
+
continue;
|
|
41078
41095
|
}
|
|
41079
|
-
|
|
41080
|
-
{ immediate: true, deep: true }
|
|
41081
|
-
);
|
|
41082
|
-
const mainMember = computed(() => {
|
|
41083
|
-
if (!visibleMembers.value.length) return null;
|
|
41084
|
-
if (!mainMemberId.value) {
|
|
41085
|
-
return visibleMembers.value[0];
|
|
41096
|
+
nextState[section.key] = false;
|
|
41086
41097
|
}
|
|
41087
|
-
|
|
41088
|
-
|
|
41089
|
-
|
|
41098
|
+
collapsedSections.value = nextState;
|
|
41099
|
+
}
|
|
41100
|
+
const activeBars = computed(() => {
|
|
41101
|
+
if (networkQualityState.isOffline || networkQualityState.isStale) {
|
|
41102
|
+
return 0;
|
|
41103
|
+
}
|
|
41104
|
+
return getNetworkSignalBars(networkQualityState.level);
|
|
41090
41105
|
});
|
|
41091
|
-
const
|
|
41092
|
-
if (!
|
|
41093
|
-
return
|
|
41094
|
-
(item) => {
|
|
41095
|
-
var _a25;
|
|
41096
|
-
return item.member.memberId !== ((_a25 = mainMember.value) == null ? void 0 : _a25.member.memberId);
|
|
41097
|
-
}
|
|
41098
|
-
);
|
|
41106
|
+
const allSectionsExpanded = computed(() => {
|
|
41107
|
+
if (!detailSections.value.length) return true;
|
|
41108
|
+
return detailSections.value.every((section) => !isSectionCollapsed(section.key));
|
|
41099
41109
|
});
|
|
41100
|
-
const
|
|
41101
|
-
|
|
41102
|
-
|
|
41103
|
-
positions[member.member.memberId] = {
|
|
41104
|
-
position: "absolute",
|
|
41105
|
-
width: `${DEFAULT_SUB_VIDEO_WIDTH}px`,
|
|
41106
|
-
height: `${DEFAULT_SUB_VIDEO_HEIGHT}px`,
|
|
41107
|
-
right: "16px",
|
|
41108
|
-
top: `${STATUS_BAR_HEIGHT + 16 + index * (DEFAULT_SUB_VIDEO_HEIGHT + SUB_VIDEO_GAP)}px`
|
|
41109
|
-
};
|
|
41110
|
-
});
|
|
41111
|
-
return positions;
|
|
41110
|
+
const reasonText = computed(() => {
|
|
41111
|
+
if (!networkQualityState.reasons.length) return "";
|
|
41112
|
+
return `可能原因:${networkQualityState.reasons.join("、")}`;
|
|
41112
41113
|
});
|
|
41113
|
-
const
|
|
41114
|
-
|
|
41115
|
-
|
|
41116
|
-
|
|
41117
|
-
|
|
41118
|
-
|
|
41119
|
-
|
|
41120
|
-
|
|
41121
|
-
|
|
41122
|
-
|
|
41123
|
-
|
|
41124
|
-
|
|
41125
|
-
|
|
41126
|
-
|
|
41127
|
-
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
|
|
41131
|
-
|
|
41132
|
-
|
|
41133
|
-
|
|
41134
|
-
|
|
41135
|
-
|
|
41136
|
-
|
|
41137
|
-
|
|
41138
|
-
|
|
41139
|
-
|
|
41140
|
-
|
|
41141
|
-
|
|
41142
|
-
|
|
41143
|
-
|
|
41144
|
-
|
|
41145
|
-
|
|
41146
|
-
|
|
41147
|
-
|
|
41148
|
-
|
|
41149
|
-
|
|
41150
|
-
|
|
41151
|
-
|
|
41152
|
-
|
|
41153
|
-
|
|
41154
|
-
|
|
41155
|
-
|
|
41156
|
-
|
|
41157
|
-
|
|
41158
|
-
|
|
41159
|
-
|
|
41160
|
-
|
|
41114
|
+
const qualityItems = computed(() => [
|
|
41115
|
+
{ label: "总体质量", value: networkQualityState.label },
|
|
41116
|
+
{ label: "上行质量", value: networkQualityState.uplink },
|
|
41117
|
+
{ label: "下行质量", value: networkQualityState.downlink },
|
|
41118
|
+
{ label: "MOS", value: formatMos(networkQualityState.mos) },
|
|
41119
|
+
{ label: "最近更新", value: formatUpdatedAt(networkQualityState.updatedAt) },
|
|
41120
|
+
{
|
|
41121
|
+
label: "数据状态",
|
|
41122
|
+
value: networkQualityState.isStale ? "已过期" : "实时"
|
|
41123
|
+
}
|
|
41124
|
+
]);
|
|
41125
|
+
const overviewItems = computed(() => {
|
|
41126
|
+
const stats = networkQualityState.stats;
|
|
41127
|
+
return [
|
|
41128
|
+
{ label: "上行 RTT", value: formatValue(stats == null ? void 0 : stats.rtt_up, " ms") },
|
|
41129
|
+
{ label: "下行 RTT", value: formatValue(stats == null ? void 0 : stats.rtt_down, " ms") },
|
|
41130
|
+
{ label: "上行码率", value: formatValue(stats == null ? void 0 : stats.bitrate_up, " kb/s") },
|
|
41131
|
+
{ label: "下行码率", value: formatValue(stats == null ? void 0 : stats.bitrate_down, " kb/s") },
|
|
41132
|
+
{ label: "上行丢包率", value: formatLossRate(stats == null ? void 0 : stats.lossrate_up) },
|
|
41133
|
+
{ label: "下行丢包率", value: formatLossRate(stats == null ? void 0 : stats.lossrate_down) },
|
|
41134
|
+
{
|
|
41135
|
+
label: "可用上行带宽",
|
|
41136
|
+
value: formatValue(stats == null ? void 0 : stats.available_outgoing_bitrate, " kb/s")
|
|
41137
|
+
},
|
|
41138
|
+
{
|
|
41139
|
+
label: "可用下行带宽",
|
|
41140
|
+
value: formatValue(stats == null ? void 0 : stats.available_incoming_bitrate, " kb/s")
|
|
41141
|
+
}
|
|
41142
|
+
];
|
|
41143
|
+
});
|
|
41144
|
+
function createAudioSendCard(item, index) {
|
|
41145
|
+
const stats = (item == null ? void 0 : item.stats) || {};
|
|
41146
|
+
return {
|
|
41147
|
+
title: `本地音频 ${index + 1}`,
|
|
41148
|
+
subtitle: (item == null ? void 0 : item.desc) || (stats == null ? void 0 : stats.streamId) || "发送轨道",
|
|
41149
|
+
items: [
|
|
41150
|
+
{ label: "实时码率", value: formatMetricNumber(item == null ? void 0 : item.bitrate, " kb/s") },
|
|
41151
|
+
{ label: "音频电平", value: formatMetricNumber(item == null ? void 0 : item.db, " dBFS", 1) },
|
|
41152
|
+
{ label: "已发包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsSent) },
|
|
41153
|
+
{ label: "已发字节", value: formatBytes(stats == null ? void 0 : stats.bytesSent) },
|
|
41154
|
+
{ label: "远端丢包", value: formatMetricNumber(stats == null ? void 0 : stats.packetsLost) },
|
|
41155
|
+
{ label: "往返时延", value: formatMetricNumber(stats == null ? void 0 : stats.roundTripTime, " ms") },
|
|
41156
|
+
{ label: "远端抖动", value: formatMetricNumber(stats == null ? void 0 : stats.jitter, " ms") },
|
|
41157
|
+
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
41158
|
+
]
|
|
41159
|
+
};
|
|
41160
|
+
}
|
|
41161
|
+
function createVideoSendCard(item, index) {
|
|
41162
|
+
const stats = (item == null ? void 0 : item.stats) || {};
|
|
41163
|
+
return {
|
|
41164
|
+
title: `本地视频 ${index + 1}`,
|
|
41165
|
+
subtitle: (item == null ? void 0 : item.desc) || (stats == null ? void 0 : stats.rid) || (stats == null ? void 0 : stats.streamId) || "发送轨道",
|
|
41166
|
+
items: [
|
|
41167
|
+
{ label: "实时码率", value: formatMetricNumber(item == null ? void 0 : item.bitrate, " kb/s") },
|
|
41168
|
+
{ label: "分辨率", value: formatDimension((item == null ? void 0 : item.width) || (stats == null ? void 0 : stats.frameWidth), (item == null ? void 0 : item.height) || (stats == null ? void 0 : stats.frameHeight)) },
|
|
41169
|
+
{ label: "帧率", value: formatMetricNumber((item == null ? void 0 : item.fps) || (stats == null ? void 0 : stats.framesPerSecond), " fps") },
|
|
41170
|
+
{ label: "已发帧数", value: formatMetricNumber(stats == null ? void 0 : stats.framesSent) },
|
|
41171
|
+
{ label: "目标码率", value: formatMetricNumber(stats == null ? void 0 : stats.targetBitrate, " bps") },
|
|
41172
|
+
{ label: "FIR/PLI/NACK", value: `${formatMetricNumber(stats == null ? void 0 : stats.firCount)}/${formatMetricNumber(stats == null ? void 0 : stats.pliCount)}/${formatMetricNumber(stats == null ? void 0 : stats.nackCount)}` },
|
|
41173
|
+
{ label: "重传包数", value: formatMetricNumber(stats == null ? void 0 : stats.retransmittedPacketsSent) },
|
|
41174
|
+
{ label: "受限原因", value: formatReason(stats == null ? void 0 : stats.qualityLimitationReason) },
|
|
41175
|
+
{ label: "分辨率变化", value: formatMetricNumber(stats == null ? void 0 : stats.qualityLimitationResolutionChanges) },
|
|
41176
|
+
{ label: "往返时延", value: formatMetricNumber(stats == null ? void 0 : stats.roundTripTime, " ms") },
|
|
41177
|
+
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
41178
|
+
]
|
|
41179
|
+
};
|
|
41180
|
+
}
|
|
41181
|
+
function createAudioRecvCard(item, index) {
|
|
41182
|
+
const stats = (item == null ? void 0 : item.stats) || {};
|
|
41183
|
+
return {
|
|
41184
|
+
title: `远端音频 ${index + 1}`,
|
|
41185
|
+
subtitle: (item == null ? void 0 : item.uid) || (item == null ? void 0 : item.desc) || (stats == null ? void 0 : stats.streamId) || "接收轨道",
|
|
41186
|
+
items: [
|
|
41187
|
+
{ label: "实时码率", value: formatMetricNumber(item == null ? void 0 : item.bitrate, " kb/s") },
|
|
41188
|
+
{ label: "音频电平", value: formatMetricNumber(item == null ? void 0 : item.db, " dBFS", 1) },
|
|
41189
|
+
{ label: "已收包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsReceived) },
|
|
41190
|
+
{ label: "已收字节", value: formatBytes(stats == null ? void 0 : stats.bytesReceived) },
|
|
41191
|
+
{ label: "丢包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsLost) },
|
|
41192
|
+
{ label: "网络抖动", value: formatMetricNumber(stats == null ? void 0 : stats.jitter, " ms") },
|
|
41193
|
+
{ label: "缓冲均值", value: formatMetricNumber(stats == null ? void 0 : stats.jitterBufferAvgDelay, " ms") },
|
|
41194
|
+
{ label: "隐藏事件", value: formatMetricNumber(stats == null ? void 0 : stats.concealmentEvents) },
|
|
41195
|
+
{ label: "静音隐藏", value: formatMetricNumber(stats == null ? void 0 : stats.silentConcealmentEvents) },
|
|
41196
|
+
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
41197
|
+
]
|
|
41198
|
+
};
|
|
41199
|
+
}
|
|
41200
|
+
function createVideoRecvCard(item, index) {
|
|
41201
|
+
const stats = (item == null ? void 0 : item.stats) || {};
|
|
41202
|
+
const memberName = getMemberNameById(item == null ? void 0 : item.uid);
|
|
41203
|
+
return {
|
|
41204
|
+
title: `远端视频 ${index + 1}`,
|
|
41205
|
+
subtitle: memberName || (item == null ? void 0 : item.uid) || (item == null ? void 0 : item.desc) || (stats == null ? void 0 : stats.mimeType) || "接收轨道",
|
|
41206
|
+
items: [
|
|
41207
|
+
{ label: "实时码率", value: formatMetricNumber(item == null ? void 0 : item.bitrate, " kb/s") },
|
|
41208
|
+
{ label: "分辨率", value: formatDimension((item == null ? void 0 : item.width) || (stats == null ? void 0 : stats.frameWidth), (item == null ? void 0 : item.height) || (stats == null ? void 0 : stats.frameHeight)) },
|
|
41209
|
+
{ label: "帧率", value: formatMetricNumber((item == null ? void 0 : item.fps) || (stats == null ? void 0 : stats.framesPerSecond), " fps") },
|
|
41210
|
+
{ label: "已收包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsReceived) },
|
|
41211
|
+
{ label: "已收字节", value: formatBytes(stats == null ? void 0 : stats.bytesReceived) },
|
|
41212
|
+
{ label: "丢包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsLost) },
|
|
41213
|
+
{ label: "接收/解码帧", value: `${formatMetricNumber(stats == null ? void 0 : stats.framesReceived)}/${formatMetricNumber(stats == null ? void 0 : stats.framesDecoded)}` },
|
|
41214
|
+
{ label: "丢帧数", value: formatMetricNumber(stats == null ? void 0 : stats.framesDropped) },
|
|
41215
|
+
{ label: "FIR/PLI/NACK", value: `${formatMetricNumber(stats == null ? void 0 : stats.firCount)}/${formatMetricNumber(stats == null ? void 0 : stats.pliCount)}/${formatMetricNumber(stats == null ? void 0 : stats.nackCount)}` },
|
|
41216
|
+
{ label: "缓冲均值", value: formatMetricNumber(stats == null ? void 0 : stats.jitterBufferAvgDelay, " ms") },
|
|
41217
|
+
{ label: "解码器", value: formatReason(stats == null ? void 0 : stats.decoderImplementation) },
|
|
41218
|
+
{ label: "MIME", value: formatReason(stats == null ? void 0 : stats.mimeType) },
|
|
41219
|
+
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
41220
|
+
]
|
|
41221
|
+
};
|
|
41222
|
+
}
|
|
41223
|
+
const detailSections = computed(() => {
|
|
41224
|
+
const details = advancedDetails.value;
|
|
41225
|
+
return [
|
|
41226
|
+
{
|
|
41227
|
+
key: "local-audio",
|
|
41228
|
+
title: "本地音频发送",
|
|
41229
|
+
cards: ((details == null ? void 0 : details.local_audios) || []).map(createAudioSendCard)
|
|
41230
|
+
},
|
|
41231
|
+
{
|
|
41232
|
+
key: "local-video",
|
|
41233
|
+
title: "本地视频发送",
|
|
41234
|
+
cards: ((details == null ? void 0 : details.local_videos) || []).map(createVideoSendCard)
|
|
41235
|
+
},
|
|
41236
|
+
{
|
|
41237
|
+
key: "remote-audio",
|
|
41238
|
+
title: "远端音频接收",
|
|
41239
|
+
cards: ((details == null ? void 0 : details.remote_audios) || []).map(createAudioRecvCard)
|
|
41240
|
+
},
|
|
41241
|
+
{
|
|
41242
|
+
key: "remote-video",
|
|
41243
|
+
title: "远端视频接收",
|
|
41244
|
+
cards: ((details == null ? void 0 : details.remote_videos) || []).map(createVideoRecvCard)
|
|
41245
|
+
}
|
|
41246
|
+
];
|
|
41247
|
+
});
|
|
41248
|
+
watch(showPopup, (visible) => {
|
|
41249
|
+
if (visible) {
|
|
41250
|
+
refreshNetworkQualitySnapshot(false);
|
|
41251
|
+
if (advancedOpen.value) {
|
|
41252
|
+
syncSectionCollapse();
|
|
41253
|
+
startDetailRefresh();
|
|
41254
|
+
}
|
|
41255
|
+
return;
|
|
41256
|
+
}
|
|
41257
|
+
stopDetailRefresh();
|
|
41258
|
+
advancedOpen.value = false;
|
|
41259
|
+
collapsedSections.value = {};
|
|
41260
|
+
advancedDetails.value = void 0;
|
|
41261
|
+
});
|
|
41262
|
+
watch(advancedOpen, (open2) => {
|
|
41263
|
+
if (!showPopup.value) return;
|
|
41264
|
+
if (open2) {
|
|
41265
|
+
syncSectionCollapse(false);
|
|
41266
|
+
startDetailRefresh();
|
|
41267
|
+
} else {
|
|
41268
|
+
stopDetailRefresh();
|
|
41269
|
+
advancedDetails.value = void 0;
|
|
41161
41270
|
}
|
|
41162
41271
|
});
|
|
41163
|
-
const callerInfo = ref({});
|
|
41164
41272
|
watch(
|
|
41165
|
-
|
|
41273
|
+
detailSections,
|
|
41166
41274
|
() => {
|
|
41167
|
-
|
|
41168
|
-
|
|
41169
|
-
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41170
|
-
);
|
|
41171
|
-
callerInfo.value = info || {};
|
|
41172
|
-
} catch {
|
|
41173
|
-
callerInfo.value = {};
|
|
41174
|
-
}
|
|
41275
|
+
if (!advancedOpen.value) return;
|
|
41276
|
+
syncSectionCollapse();
|
|
41175
41277
|
},
|
|
41176
|
-
{
|
|
41278
|
+
{ deep: true }
|
|
41177
41279
|
);
|
|
41178
|
-
const onChange = async (type) => {
|
|
41179
|
-
switch (type) {
|
|
41180
|
-
case RoomModalSelectType.microphoneClick:
|
|
41181
|
-
if (micOperationBusy.value) return;
|
|
41182
|
-
if (isAuthority.value) {
|
|
41183
|
-
showNotification(alertMsg, "warning", 5e3);
|
|
41184
|
-
return;
|
|
41185
|
-
}
|
|
41186
|
-
if (meState2.value.microPhoneState === "1") {
|
|
41187
|
-
await closeMic();
|
|
41188
|
-
} else {
|
|
41189
|
-
await openMic();
|
|
41190
|
-
}
|
|
41191
|
-
break;
|
|
41192
|
-
case RoomModalSelectType.cameraClick:
|
|
41193
|
-
if (cameraOperationBusy.value) return;
|
|
41194
|
-
if (isAuthority.value) {
|
|
41195
|
-
alert(alertMsg);
|
|
41196
|
-
return;
|
|
41197
|
-
}
|
|
41198
|
-
if (meState2.value.cameraState === "1") {
|
|
41199
|
-
await closeCamera();
|
|
41200
|
-
} else {
|
|
41201
|
-
await openCamera();
|
|
41202
|
-
}
|
|
41203
|
-
break;
|
|
41204
|
-
case RoomModalSelectType.acceptClick:
|
|
41205
|
-
acceptCall();
|
|
41206
|
-
break;
|
|
41207
|
-
case RoomModalSelectType.endClick:
|
|
41208
|
-
endCall();
|
|
41209
|
-
break;
|
|
41210
|
-
}
|
|
41211
|
-
};
|
|
41212
|
-
const acceptCall = () => {
|
|
41213
|
-
const meetingInfo = JSON.parse(
|
|
41214
|
-
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41215
|
-
);
|
|
41216
|
-
setCallStatus("connected");
|
|
41217
|
-
stopSosFlash();
|
|
41218
|
-
getAnswerCall({
|
|
41219
|
-
meetingId: meetingInfo.meetingId,
|
|
41220
|
-
memberId: getUserId(),
|
|
41221
|
-
cameraStatus: "0",
|
|
41222
|
-
audioStatus: "0"
|
|
41223
|
-
}).then(() => {
|
|
41224
|
-
return getJoinCall({
|
|
41225
|
-
meetingId: meetingInfo.meetingId,
|
|
41226
|
-
memberId: getUserId(),
|
|
41227
|
-
cameraStatus: "0",
|
|
41228
|
-
audioStatus: "0"
|
|
41229
|
-
});
|
|
41230
|
-
}).then((resp) => {
|
|
41231
|
-
if (resp && resp.code === 200) {
|
|
41232
|
-
sessionStorage.setItem("JS_MEETING_INFO", JSON.stringify(resp.data));
|
|
41233
|
-
console.log("拨打电话", resp.data.meetingToken);
|
|
41234
|
-
setTimeout(() => {
|
|
41235
|
-
joinRoom();
|
|
41236
|
-
}, 100);
|
|
41237
|
-
stopRingtone();
|
|
41238
|
-
recordMeeting("start");
|
|
41239
|
-
}
|
|
41240
|
-
}).catch((err) => {
|
|
41241
|
-
console.error("接听失败", err);
|
|
41242
|
-
setCallStatus("end");
|
|
41243
|
-
});
|
|
41244
|
-
};
|
|
41245
|
-
const endCall = async () => {
|
|
41246
|
-
visible.value = false;
|
|
41247
|
-
stopSosFlash();
|
|
41248
|
-
const meetingInfo = JSON.parse(
|
|
41249
|
-
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41250
|
-
);
|
|
41251
|
-
setCallStatus("end");
|
|
41252
|
-
try {
|
|
41253
|
-
const res = await getHangUpCall({
|
|
41254
|
-
meetingId: meetingInfo.meetingId,
|
|
41255
|
-
memberId: getUserId()
|
|
41256
|
-
});
|
|
41257
|
-
if (res.code === 200) {
|
|
41258
|
-
await logoutRoomAction();
|
|
41259
|
-
clearTimer();
|
|
41260
|
-
recordMeeting("stop");
|
|
41261
|
-
}
|
|
41262
|
-
} catch (err) {
|
|
41263
|
-
console.error("挂断失败", err);
|
|
41264
|
-
await logoutRoomAction();
|
|
41265
|
-
}
|
|
41266
|
-
};
|
|
41267
|
-
const stopMonitoring = async () => {
|
|
41268
|
-
visible.value = false;
|
|
41269
|
-
const meetingInfo = JSON.parse(
|
|
41270
|
-
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41271
|
-
);
|
|
41272
|
-
try {
|
|
41273
|
-
const res = await getMeetingLeave({
|
|
41274
|
-
meetingId: meetingInfo.meetingId,
|
|
41275
|
-
memberId: getUserId()
|
|
41276
|
-
});
|
|
41277
|
-
if (res.code === 200) {
|
|
41278
|
-
await logoutRoomAction();
|
|
41279
|
-
clearTimer();
|
|
41280
|
-
}
|
|
41281
|
-
} catch (err) {
|
|
41282
|
-
console.error("离开失败", err);
|
|
41283
|
-
await logoutRoomAction();
|
|
41284
|
-
}
|
|
41285
|
-
};
|
|
41286
|
-
const clearTimer = () => {
|
|
41287
|
-
if (timer) {
|
|
41288
|
-
clearInterval(timer);
|
|
41289
|
-
timer = null;
|
|
41290
|
-
}
|
|
41291
|
-
};
|
|
41292
|
-
const recordMeeting = (newState) => {
|
|
41293
|
-
const meetingInfo = JSON.parse(
|
|
41294
|
-
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41295
|
-
);
|
|
41296
|
-
let params = {
|
|
41297
|
-
meetingId: meetingInfo.meetingId,
|
|
41298
|
-
memberId: getUserId(),
|
|
41299
|
-
cmd: newState
|
|
41300
|
-
};
|
|
41301
|
-
getMcuCtrl(params).then(() => {
|
|
41302
|
-
}).catch(() => {
|
|
41303
|
-
});
|
|
41304
|
-
};
|
|
41305
|
-
const toggleDeviceSelector = (deviceType) => {
|
|
41306
|
-
currentDeviceType.value = deviceType;
|
|
41307
|
-
showDeviceSelector.value = !showDeviceSelector.value;
|
|
41308
|
-
};
|
|
41309
|
-
watch(
|
|
41310
|
-
() => visible.value,
|
|
41311
|
-
(newValue) => {
|
|
41312
|
-
if (newValue) {
|
|
41313
|
-
showDeviceSelector.value = false;
|
|
41314
|
-
}
|
|
41315
|
-
}
|
|
41316
|
-
);
|
|
41317
|
-
onMounted(() => {
|
|
41318
|
-
});
|
|
41319
41280
|
onUnmounted(() => {
|
|
41320
|
-
|
|
41321
|
-
clearInterval(timer);
|
|
41322
|
-
timer = null;
|
|
41323
|
-
}
|
|
41281
|
+
stopDetailRefresh();
|
|
41324
41282
|
});
|
|
41325
41283
|
return (_ctx, _cache) => {
|
|
41326
|
-
return openBlock(),
|
|
41327
|
-
|
|
41328
|
-
|
|
41329
|
-
|
|
41330
|
-
|
|
41284
|
+
return openBlock(), createElementBlock("div", {
|
|
41285
|
+
class: normalizeClass(["network-quality-signal", [`size-${_ctx.size}`]])
|
|
41286
|
+
}, [
|
|
41287
|
+
createElementVNode("button", {
|
|
41288
|
+
ref_key: "triggerRef",
|
|
41289
|
+
ref: triggerRef,
|
|
41290
|
+
type: "button",
|
|
41291
|
+
class: normalizeClass(["network-quality-trigger", [
|
|
41292
|
+
`is-${unref(networkQualityState).level}`,
|
|
41293
|
+
{
|
|
41294
|
+
"is-alert": unref(networkQualityState).isOffline || unref(networkQualityState).isStale
|
|
41295
|
+
}
|
|
41296
|
+
]]),
|
|
41297
|
+
title: unref(networkQualityState).summary,
|
|
41298
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showPopup.value = !showPopup.value)
|
|
41331
41299
|
}, [
|
|
41332
|
-
createElementVNode("
|
|
41333
|
-
|
|
41334
|
-
createElementVNode("
|
|
41335
|
-
|
|
41336
|
-
|
|
41337
|
-
|
|
41338
|
-
|
|
41339
|
-
|
|
41300
|
+
createElementVNode("span", _hoisted_2$m, [
|
|
41301
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(4, (index) => {
|
|
41302
|
+
return createElementVNode("span", {
|
|
41303
|
+
key: index,
|
|
41304
|
+
class: normalizeClass(["signal-bar", { active: index <= activeBars.value }])
|
|
41305
|
+
}, null, 2);
|
|
41306
|
+
}), 64))
|
|
41307
|
+
]),
|
|
41308
|
+
_ctx.showText ? (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(unref(networkQualityState).label), 1)) : createCommentVNode("", true)
|
|
41309
|
+
], 10, _hoisted_1$o),
|
|
41310
|
+
createVNode(SmartPopup, {
|
|
41311
|
+
visible: showPopup.value,
|
|
41312
|
+
"onUpdate:visible": _cache[3] || (_cache[3] = ($event) => showPopup.value = $event),
|
|
41313
|
+
trigger: triggerRef.value,
|
|
41314
|
+
gap: 12
|
|
41315
|
+
}, {
|
|
41316
|
+
default: withCtx(() => [
|
|
41317
|
+
createElementVNode("div", _hoisted_4$j, [
|
|
41318
|
+
createElementVNode("div", {
|
|
41319
|
+
class: normalizeClass(["network-quality-popup network-quality-main", themeClass.value])
|
|
41320
|
+
}, [
|
|
41321
|
+
createElementVNode("div", _hoisted_5$g, [
|
|
41322
|
+
_cache[4] || (_cache[4] = createElementVNode("div", { class: "popup-title" }, "网络详情", -1)),
|
|
41323
|
+
createElementVNode("div", _hoisted_6$f, [
|
|
41324
|
+
createElementVNode("button", {
|
|
41325
|
+
type: "button",
|
|
41326
|
+
class: "advanced-toggle",
|
|
41327
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => advancedOpen.value = !advancedOpen.value, ["stop"]))
|
|
41328
|
+
}, toDisplayString(advancedOpen.value ? "关闭高级模式" : "打开高级模式"), 1),
|
|
41329
|
+
createElementVNode("div", {
|
|
41330
|
+
class: normalizeClass(["popup-status", `is-${unref(networkQualityState).level}`])
|
|
41331
|
+
}, toDisplayString(unref(networkQualityState).label), 3)
|
|
41340
41332
|
])
|
|
41341
|
-
])
|
|
41342
|
-
|
|
41343
|
-
|
|
41344
|
-
createElementVNode("
|
|
41345
|
-
|
|
41346
|
-
|
|
41347
|
-
|
|
41348
|
-
|
|
41349
|
-
|
|
41350
|
-
|
|
41351
|
-
|
|
41352
|
-
|
|
41353
|
-
|
|
41354
|
-
|
|
41355
|
-
|
|
41356
|
-
|
|
41357
|
-
|
|
41358
|
-
|
|
41359
|
-
|
|
41360
|
-
|
|
41361
|
-
|
|
41362
|
-
|
|
41363
|
-
|
|
41364
|
-
|
|
41365
|
-
|
|
41366
|
-
|
|
41367
|
-
|
|
41368
|
-
|
|
41369
|
-
|
|
41370
|
-
|
|
41371
|
-
|
|
41372
|
-
|
|
41373
|
-
|
|
41374
|
-
|
|
41375
|
-
|
|
41376
|
-
|
|
41377
|
-
|
|
41378
|
-
|
|
41379
|
-
|
|
41380
|
-
|
|
41333
|
+
]),
|
|
41334
|
+
createElementVNode("div", _hoisted_7$e, toDisplayString(unref(networkQualityState).summary), 1),
|
|
41335
|
+
reasonText.value ? (openBlock(), createElementBlock("div", _hoisted_8$d, toDisplayString(reasonText.value), 1)) : createCommentVNode("", true),
|
|
41336
|
+
createElementVNode("div", _hoisted_9$b, [
|
|
41337
|
+
_cache[5] || (_cache[5] = createElementVNode("div", { class: "popup-section-title" }, "质量概览", -1)),
|
|
41338
|
+
createElementVNode("div", _hoisted_10$b, [
|
|
41339
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(qualityItems.value, (item) => {
|
|
41340
|
+
return openBlock(), createElementBlock("div", {
|
|
41341
|
+
key: item.label,
|
|
41342
|
+
class: "popup-item"
|
|
41343
|
+
}, [
|
|
41344
|
+
createElementVNode("div", _hoisted_11$a, toDisplayString(item.label), 1),
|
|
41345
|
+
createElementVNode("div", _hoisted_12$a, toDisplayString(item.value), 1)
|
|
41346
|
+
]);
|
|
41347
|
+
}), 128))
|
|
41348
|
+
])
|
|
41349
|
+
]),
|
|
41350
|
+
createElementVNode("div", _hoisted_13$8, [
|
|
41351
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "popup-section-title" }, "网络指标", -1)),
|
|
41352
|
+
createElementVNode("div", _hoisted_14$7, [
|
|
41353
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(overviewItems.value, (item) => {
|
|
41354
|
+
return openBlock(), createElementBlock("div", {
|
|
41355
|
+
key: item.label,
|
|
41356
|
+
class: "popup-item"
|
|
41357
|
+
}, [
|
|
41358
|
+
createElementVNode("div", _hoisted_15$6, toDisplayString(item.label), 1),
|
|
41359
|
+
createElementVNode("div", _hoisted_16$6, toDisplayString(item.value), 1)
|
|
41360
|
+
]);
|
|
41361
|
+
}), 128))
|
|
41362
|
+
])
|
|
41363
|
+
])
|
|
41364
|
+
], 2),
|
|
41365
|
+
advancedOpen.value ? (openBlock(), createElementBlock("div", {
|
|
41366
|
+
key: 0,
|
|
41367
|
+
class: normalizeClass(["network-quality-popup network-quality-advanced", themeClass.value]),
|
|
41368
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
41369
|
+
}, ["stop"]))
|
|
41370
|
+
}, [
|
|
41371
|
+
createElementVNode("div", _hoisted_17$5, [
|
|
41372
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "popup-title" }, "高级模式", -1)),
|
|
41373
|
+
createElementVNode("div", _hoisted_18$5, [
|
|
41374
|
+
createElementVNode("button", {
|
|
41375
|
+
type: "button",
|
|
41376
|
+
class: "advanced-mini-btn",
|
|
41377
|
+
onClick: toggleAllSections
|
|
41378
|
+
}, toDisplayString(allSectionsExpanded.value ? "全部收起" : "全部展开"), 1)
|
|
41379
|
+
])
|
|
41380
|
+
]),
|
|
41381
|
+
createElementVNode("div", _hoisted_19$5, [
|
|
41382
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(detailSections.value, (section) => {
|
|
41383
|
+
return openBlock(), createElementBlock("div", {
|
|
41384
|
+
key: section.key,
|
|
41385
|
+
class: "popup-section"
|
|
41386
|
+
}, [
|
|
41381
41387
|
createElementVNode("button", {
|
|
41382
41388
|
type: "button",
|
|
41383
|
-
class: "
|
|
41384
|
-
|
|
41385
|
-
|
|
41386
|
-
|
|
41387
|
-
|
|
41388
|
-
|
|
41389
|
-
|
|
41390
|
-
|
|
41391
|
-
|
|
41392
|
-
|
|
41393
|
-
|
|
41394
|
-
|
|
41395
|
-
|
|
41396
|
-
|
|
41397
|
-
|
|
41398
|
-
|
|
41399
|
-
|
|
41400
|
-
|
|
41401
|
-
|
|
41402
|
-
|
|
41403
|
-
|
|
41404
|
-
|
|
41405
|
-
|
|
41406
|
-
|
|
41407
|
-
|
|
41408
|
-
|
|
41409
|
-
|
|
41410
|
-
|
|
41411
|
-
|
|
41412
|
-
|
|
41413
|
-
|
|
41414
|
-
|
|
41415
|
-
|
|
41416
|
-
|
|
41417
|
-
|
|
41418
|
-
|
|
41419
|
-
|
|
41420
|
-
createElementVNode("div", {
|
|
41421
|
-
class: normalizeClass(["device-dropdown-trigger", { "is-disabled": unref(micOperationBusy) }]),
|
|
41422
|
-
onClick: _cache[1] || (_cache[1] = ($event) => toggleDeviceSelector("microphone"))
|
|
41423
|
-
}, [
|
|
41424
|
-
createVNode(SvgIcon, {
|
|
41425
|
-
name: "TriangleIcon",
|
|
41426
|
-
size: 9
|
|
41427
|
-
})
|
|
41428
|
-
], 2)
|
|
41429
|
-
], 512)) : createCommentVNode("", true),
|
|
41430
|
-
isReceiving.value ? (openBlock(), createElementBlock("button", {
|
|
41431
|
-
key: 1,
|
|
41432
|
-
class: "accept-call-btn",
|
|
41433
|
-
onClick: acceptCall
|
|
41434
|
-
}, [
|
|
41435
|
-
createVNode(SvgIcon, {
|
|
41436
|
-
name: "PhoneIcon",
|
|
41437
|
-
size: 21
|
|
41438
|
-
}),
|
|
41439
|
-
_cache[10] || (_cache[10] = createElementVNode("span", null, "接听", -1))
|
|
41440
|
-
])) : createCommentVNode("", true),
|
|
41441
|
-
isCalling.value || isReceiving.value || isConnected.value ? (openBlock(), createElementBlock("button", {
|
|
41442
|
-
key: 2,
|
|
41443
|
-
class: "end-call-btn",
|
|
41444
|
-
onClick: endCall
|
|
41445
|
-
}, [
|
|
41446
|
-
createVNode(SvgIcon, {
|
|
41447
|
-
name: "HandUpIcon",
|
|
41448
|
-
size: 21,
|
|
41449
|
-
"color-class": "handUp"
|
|
41450
|
-
}),
|
|
41451
|
-
createElementVNode("span", null, toDisplayString(isReceiving.value ? "拒绝" : "挂断"), 1)
|
|
41452
|
-
])) : createCommentVNode("", true),
|
|
41453
|
-
isListening.value ? (openBlock(), createElementBlock("button", {
|
|
41454
|
-
key: 3,
|
|
41455
|
-
class: "end-call-btn",
|
|
41456
|
-
onClick: stopMonitoring
|
|
41457
|
-
}, [
|
|
41458
|
-
createVNode(SvgIcon, {
|
|
41459
|
-
name: "HandUpIcon",
|
|
41460
|
-
size: 21,
|
|
41461
|
-
"color-class": "handUp"
|
|
41462
|
-
}),
|
|
41463
|
-
_cache[11] || (_cache[11] = createElementVNode("span", null, "结束监听", -1))
|
|
41464
|
-
])) : createCommentVNode("", true),
|
|
41465
|
-
isForcibleInsertion.value ? (openBlock(), createElementBlock("button", {
|
|
41466
|
-
key: 4,
|
|
41467
|
-
class: "end-call-btn",
|
|
41468
|
-
onClick: stopMonitoring
|
|
41469
|
-
}, [
|
|
41470
|
-
createVNode(SvgIcon, {
|
|
41471
|
-
name: "HandUpIcon",
|
|
41472
|
-
size: 20
|
|
41473
|
-
}),
|
|
41474
|
-
_cache[12] || (_cache[12] = createElementVNode("span", null, "退出通话", -1))
|
|
41475
|
-
])) : createCommentVNode("", true),
|
|
41476
|
-
isConnected.value || isForcibleInsertion.value ? (openBlock(), createElementBlock("div", {
|
|
41477
|
-
key: 5,
|
|
41478
|
-
ref_key: "cameraRef",
|
|
41479
|
-
ref: cameraRef
|
|
41480
|
-
}, [
|
|
41481
|
-
createElementVNode("button", {
|
|
41482
|
-
class: normalizeClass(["control-btn", { "is-disabled": unref(cameraOperationBusy) }]),
|
|
41483
|
-
onClick: _cache[2] || (_cache[2] = ($event) => onChange(unref(RoomModalSelectType).cameraClick))
|
|
41484
|
-
}, [
|
|
41485
|
-
createVNode(SvgIcon, {
|
|
41486
|
-
name: unref(meState2).cameraState == "1" ? "CameraIcon" : "CameraSlashIcon",
|
|
41487
|
-
size: 20
|
|
41488
|
-
}, null, 8, ["name"]),
|
|
41489
|
-
_cache[13] || (_cache[13] = createElementVNode("span", null, "摄像头", -1))
|
|
41490
|
-
], 2),
|
|
41491
|
-
createElementVNode("div", {
|
|
41492
|
-
class: normalizeClass(["device-dropdown-trigger", { "is-disabled": unref(cameraOperationBusy) }]),
|
|
41493
|
-
onClick: _cache[3] || (_cache[3] = ($event) => toggleDeviceSelector("camera"))
|
|
41494
|
-
}, [
|
|
41495
|
-
createVNode(SvgIcon, {
|
|
41496
|
-
name: "TriangleIcon",
|
|
41497
|
-
size: 9
|
|
41498
|
-
})
|
|
41499
|
-
], 2)
|
|
41500
|
-
], 512)) : createCommentVNode("", true)
|
|
41501
|
-
]),
|
|
41502
|
-
isConnected.value ? (openBlock(), createElementBlock("div", _hoisted_28$3, [
|
|
41503
|
-
createVNode(SvgIcon, {
|
|
41504
|
-
name: "TranscribeIcon",
|
|
41505
|
-
size: 22
|
|
41506
|
-
}),
|
|
41507
|
-
_cache[14] || (_cache[14] = createElementVNode("span", null, "录制中", -1))
|
|
41508
|
-
])) : createCommentVNode("", true)
|
|
41389
|
+
class: normalizeClass(["detail-section-toggle", { collapsed: isSectionCollapsed(section.key) }]),
|
|
41390
|
+
onClick: ($event) => toggleSection(section.key)
|
|
41391
|
+
}, [
|
|
41392
|
+
createElementVNode("span", _hoisted_21$3, [
|
|
41393
|
+
createElementVNode("span", _hoisted_22$3, toDisplayString(section.title), 1),
|
|
41394
|
+
createElementVNode("span", _hoisted_23$3, "(" + toDisplayString(section.cards.length) + ")", 1)
|
|
41395
|
+
]),
|
|
41396
|
+
createElementVNode("span", _hoisted_24$3, toDisplayString(isSectionCollapsed(section.key) ? "展开" : "收起"), 1)
|
|
41397
|
+
], 10, _hoisted_20$5),
|
|
41398
|
+
!isSectionCollapsed(section.key) && section.cards.length ? (openBlock(), createElementBlock("div", _hoisted_25$3, [
|
|
41399
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(section.cards, (card) => {
|
|
41400
|
+
return openBlock(), createElementBlock("div", {
|
|
41401
|
+
key: card.title,
|
|
41402
|
+
class: "metric-card"
|
|
41403
|
+
}, [
|
|
41404
|
+
createElementVNode("div", _hoisted_26$3, [
|
|
41405
|
+
createElementVNode("div", _hoisted_27$3, toDisplayString(card.title), 1),
|
|
41406
|
+
createElementVNode("div", _hoisted_28$3, toDisplayString(card.subtitle), 1)
|
|
41407
|
+
]),
|
|
41408
|
+
createElementVNode("div", _hoisted_29$2, [
|
|
41409
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(card.items, (item) => {
|
|
41410
|
+
return openBlock(), createElementBlock("div", {
|
|
41411
|
+
key: `${card.title}-${item.label}`,
|
|
41412
|
+
class: "metric-card-item"
|
|
41413
|
+
}, [
|
|
41414
|
+
createElementVNode("div", _hoisted_30$2, toDisplayString(item.label), 1),
|
|
41415
|
+
createElementVNode("div", _hoisted_31$1, toDisplayString(item.value), 1)
|
|
41416
|
+
]);
|
|
41417
|
+
}), 128))
|
|
41418
|
+
])
|
|
41419
|
+
]);
|
|
41420
|
+
}), 128))
|
|
41421
|
+
])) : !isSectionCollapsed(section.key) ? (openBlock(), createElementBlock("div", _hoisted_32$1, "暂无数据")) : createCommentVNode("", true)
|
|
41422
|
+
]);
|
|
41423
|
+
}), 128))
|
|
41424
|
+
])
|
|
41425
|
+
], 2)) : createCommentVNode("", true)
|
|
41509
41426
|
])
|
|
41510
41427
|
]),
|
|
41511
|
-
|
|
41512
|
-
|
|
41513
|
-
|
|
41514
|
-
trigger: currentDeviceType.value == "microphone" ? micRef.value : cameraRef.value,
|
|
41515
|
-
gap: 10
|
|
41516
|
-
}, {
|
|
41517
|
-
default: withCtx(() => [
|
|
41518
|
-
createVNode(DeviceSelector, {
|
|
41519
|
-
"device-type": currentDeviceType.value,
|
|
41520
|
-
theme: _ctx.theme,
|
|
41521
|
-
onClose: _cache[4] || (_cache[4] = ($event) => showDeviceSelector.value = false)
|
|
41522
|
-
}, null, 8, ["device-type", "theme"])
|
|
41523
|
-
]),
|
|
41524
|
-
_: 1
|
|
41525
|
-
}, 8, ["visible", "trigger"])
|
|
41526
|
-
], 2)) : createCommentVNode("", true)
|
|
41527
|
-
]);
|
|
41428
|
+
_: 1
|
|
41429
|
+
}, 8, ["visible", "trigger"])
|
|
41430
|
+
], 2);
|
|
41528
41431
|
};
|
|
41529
41432
|
}
|
|
41530
41433
|
});
|
|
41531
|
-
const
|
|
41532
|
-
const
|
|
41533
|
-
const
|
|
41534
|
-
|
|
41535
|
-
|
|
41536
|
-
|
|
41537
|
-
|
|
41538
|
-
|
|
41539
|
-
const
|
|
41540
|
-
const
|
|
41541
|
-
const
|
|
41542
|
-
|
|
41543
|
-
|
|
41544
|
-
|
|
41545
|
-
|
|
41546
|
-
|
|
41547
|
-
|
|
41548
|
-
|
|
41549
|
-
|
|
41550
|
-
|
|
41551
|
-
|
|
41552
|
-
|
|
41553
|
-
|
|
41554
|
-
|
|
41555
|
-
|
|
41556
|
-
|
|
41557
|
-
|
|
41558
|
-
|
|
41559
|
-
|
|
41560
|
-
|
|
41561
|
-
try {
|
|
41562
|
-
localStorage.setItem(key, value);
|
|
41563
|
-
} catch {
|
|
41564
|
-
}
|
|
41565
|
-
}
|
|
41566
|
-
function safeLocalStorageGetItem(key) {
|
|
41567
|
-
try {
|
|
41568
|
-
return localStorage.getItem(key);
|
|
41569
|
-
} catch {
|
|
41570
|
-
return null;
|
|
41571
|
-
}
|
|
41572
|
-
}
|
|
41573
|
-
function getMeetingMqttHandoffContext() {
|
|
41574
|
-
const sourceTabId = safeSessionStorageGetItem(HANDOFF_SOURCE_TAB_ID_KEY) || "";
|
|
41575
|
-
const targetTabId = safeSessionStorageGetItem(HANDOFF_TARGET_TAB_ID_KEY) || "";
|
|
41576
|
-
const handoffId = safeSessionStorageGetItem(HANDOFF_ID_KEY) || "";
|
|
41577
|
-
if (!sourceTabId || !targetTabId || !handoffId) {
|
|
41578
|
-
return null;
|
|
41579
|
-
}
|
|
41580
|
-
return {
|
|
41581
|
-
sourceTabId,
|
|
41582
|
-
targetTabId,
|
|
41583
|
-
handoffId
|
|
41584
|
-
};
|
|
41585
|
-
}
|
|
41586
|
-
function readTargetHeartbeat() {
|
|
41587
|
-
const raw = safeLocalStorageGetItem(TARGET_HEARTBEAT_KEY);
|
|
41588
|
-
if (!raw) {
|
|
41589
|
-
return null;
|
|
41590
|
-
}
|
|
41591
|
-
try {
|
|
41592
|
-
const parsed = JSON.parse(raw);
|
|
41593
|
-
if (!(parsed == null ? void 0 : parsed.targetTabId) || !(parsed == null ? void 0 : parsed.handoffId) || !(parsed == null ? void 0 : parsed.ts)) {
|
|
41594
|
-
return null;
|
|
41595
|
-
}
|
|
41596
|
-
return {
|
|
41597
|
-
targetTabId: parsed.targetTabId,
|
|
41598
|
-
handoffId: parsed.handoffId,
|
|
41599
|
-
ts: Number(parsed.ts)
|
|
41434
|
+
const NetworkQualitySignal = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-3378006f"]]);
|
|
41435
|
+
const _hoisted_1$n = { class: "network-copy" };
|
|
41436
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
41437
|
+
__name: "netWorkStatus",
|
|
41438
|
+
props: {
|
|
41439
|
+
theme: { default: "dark" }
|
|
41440
|
+
},
|
|
41441
|
+
setup(__props) {
|
|
41442
|
+
const props = __props;
|
|
41443
|
+
const themeClass = computed(() => `theme-${props.theme}`);
|
|
41444
|
+
const displayLabel = computed(() => {
|
|
41445
|
+
if (networkQualityState.isStale) {
|
|
41446
|
+
return "网络检测中";
|
|
41447
|
+
}
|
|
41448
|
+
return networkQualityState.label;
|
|
41449
|
+
});
|
|
41450
|
+
return (_ctx, _cache) => {
|
|
41451
|
+
return openBlock(), createElementBlock("div", {
|
|
41452
|
+
class: normalizeClass(["network-situation", themeClass.value])
|
|
41453
|
+
}, [
|
|
41454
|
+
createVNode(NetworkQualitySignal, {
|
|
41455
|
+
theme: _ctx.theme,
|
|
41456
|
+
size: "compact"
|
|
41457
|
+
}, null, 8, ["theme"]),
|
|
41458
|
+
createElementVNode("div", _hoisted_1$n, [
|
|
41459
|
+
createElementVNode("span", {
|
|
41460
|
+
class: normalizeClass(["network-label", `is-${unref(networkQualityState).level}`])
|
|
41461
|
+
}, toDisplayString(displayLabel.value), 3)
|
|
41462
|
+
])
|
|
41463
|
+
], 2);
|
|
41600
41464
|
};
|
|
41601
|
-
} catch {
|
|
41602
|
-
return null;
|
|
41603
|
-
}
|
|
41604
|
-
}
|
|
41605
|
-
function writeTargetHeartbeat(context) {
|
|
41606
|
-
safeLocalStorageSetItem(
|
|
41607
|
-
TARGET_HEARTBEAT_KEY,
|
|
41608
|
-
JSON.stringify({
|
|
41609
|
-
targetTabId: context.targetTabId,
|
|
41610
|
-
handoffId: context.handoffId,
|
|
41611
|
-
ts: Date.now()
|
|
41612
|
-
})
|
|
41613
|
-
);
|
|
41614
|
-
}
|
|
41615
|
-
function writeTargetTabStatus(status, context) {
|
|
41616
|
-
safeLocalStorageSetItem(
|
|
41617
|
-
TARGET_TAB_STATUS_KEY,
|
|
41618
|
-
JSON.stringify({
|
|
41619
|
-
sourceTabId: context.sourceTabId,
|
|
41620
|
-
targetTabId: context.targetTabId,
|
|
41621
|
-
handoffId: context.handoffId,
|
|
41622
|
-
status,
|
|
41623
|
-
ts: Date.now()
|
|
41624
|
-
})
|
|
41625
|
-
);
|
|
41626
|
-
}
|
|
41627
|
-
function sendReconnectSignal(context) {
|
|
41628
|
-
if (closeSignalSent) {
|
|
41629
|
-
return;
|
|
41630
41465
|
}
|
|
41631
|
-
|
|
41632
|
-
|
|
41633
|
-
|
|
41634
|
-
|
|
41635
|
-
|
|
41636
|
-
|
|
41637
|
-
|
|
41638
|
-
|
|
41639
|
-
|
|
41640
|
-
|
|
41641
|
-
|
|
41642
|
-
|
|
41643
|
-
|
|
41644
|
-
}
|
|
41645
|
-
|
|
41646
|
-
|
|
41647
|
-
|
|
41648
|
-
|
|
41649
|
-
|
|
41650
|
-
}
|
|
41651
|
-
|
|
41652
|
-
|
|
41653
|
-
|
|
41654
|
-
|
|
41655
|
-
|
|
41656
|
-
|
|
41657
|
-
|
|
41658
|
-
|
|
41659
|
-
|
|
41660
|
-
|
|
41661
|
-
|
|
41662
|
-
|
|
41663
|
-
|
|
41664
|
-
|
|
41665
|
-
|
|
41666
|
-
|
|
41667
|
-
|
|
41668
|
-
|
|
41669
|
-
|
|
41670
|
-
|
|
41671
|
-
|
|
41672
|
-
|
|
41673
|
-
|
|
41674
|
-
|
|
41675
|
-
|
|
41676
|
-
|
|
41677
|
-
|
|
41678
|
-
|
|
41679
|
-
|
|
41680
|
-
|
|
41466
|
+
});
|
|
41467
|
+
const NetWorkStatus = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-565d8abd"]]);
|
|
41468
|
+
const _hoisted_1$m = {
|
|
41469
|
+
key: 0,
|
|
41470
|
+
class: "sos-flash-overlay"
|
|
41471
|
+
};
|
|
41472
|
+
const _hoisted_2$l = { class: "js-call-dialog-container" };
|
|
41473
|
+
const _hoisted_3$k = { class: "status-bar" };
|
|
41474
|
+
const _hoisted_4$i = { class: "status-left" };
|
|
41475
|
+
const _hoisted_5$f = {
|
|
41476
|
+
key: 0,
|
|
41477
|
+
class: "caller-info",
|
|
41478
|
+
title: "来电人"
|
|
41479
|
+
};
|
|
41480
|
+
const _hoisted_6$e = {
|
|
41481
|
+
class: "avatar",
|
|
41482
|
+
style: { "width": "35px", "height": "35px", "font-size": "16px" }
|
|
41483
|
+
};
|
|
41484
|
+
const _hoisted_7$d = { class: "caller-text" };
|
|
41485
|
+
const _hoisted_8$c = { class: "caller-name" };
|
|
41486
|
+
const _hoisted_9$a = {
|
|
41487
|
+
key: 0,
|
|
41488
|
+
class: "caller-number"
|
|
41489
|
+
};
|
|
41490
|
+
const _hoisted_10$a = { class: "status-right" };
|
|
41491
|
+
const _hoisted_11$9 = ["onClick"];
|
|
41492
|
+
const _hoisted_12$9 = { class: "video-wrapper" };
|
|
41493
|
+
const _hoisted_13$7 = ["id"];
|
|
41494
|
+
const _hoisted_14$6 = { class: "avatar-container" };
|
|
41495
|
+
const _hoisted_15$5 = { class: "avatar" };
|
|
41496
|
+
const _hoisted_16$5 = { class: "video-loading-overlay" };
|
|
41497
|
+
const _hoisted_17$4 = { class: "video-loading-text" };
|
|
41498
|
+
const _hoisted_18$4 = { class: "video-loading-overlay failed" };
|
|
41499
|
+
const _hoisted_19$4 = ["disabled", "onClick"];
|
|
41500
|
+
const _hoisted_20$4 = { class: "video-meta" };
|
|
41501
|
+
const _hoisted_21$2 = { class: "member-name" };
|
|
41502
|
+
const _hoisted_22$2 = {
|
|
41503
|
+
key: 0,
|
|
41504
|
+
class: "role-tag"
|
|
41505
|
+
};
|
|
41506
|
+
const _hoisted_23$2 = {
|
|
41507
|
+
key: 1,
|
|
41508
|
+
class: "video-empty"
|
|
41509
|
+
};
|
|
41510
|
+
const _hoisted_24$2 = { class: "control-bar" };
|
|
41511
|
+
const _hoisted_25$2 = {
|
|
41512
|
+
key: 0,
|
|
41513
|
+
class: "call-duration"
|
|
41514
|
+
};
|
|
41515
|
+
const _hoisted_26$2 = { id: "duration" };
|
|
41516
|
+
const _hoisted_27$2 = { class: "control-buttons" };
|
|
41517
|
+
const _hoisted_28$2 = {
|
|
41518
|
+
key: 1,
|
|
41519
|
+
class: "recording-button"
|
|
41520
|
+
};
|
|
41521
|
+
const DEFAULT_SUB_VIDEO_HEIGHT = 110;
|
|
41522
|
+
const DEFAULT_SUB_VIDEO_WIDTH = 190;
|
|
41523
|
+
const SUB_VIDEO_GAP = 12;
|
|
41524
|
+
const CONTROL_BAR_HEIGHT = 90;
|
|
41525
|
+
const STATUS_BAR_HEIGHT = 48;
|
|
41526
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
41527
|
+
__name: "call",
|
|
41528
|
+
props: {
|
|
41529
|
+
theme: { default: "dark" },
|
|
41530
|
+
draggable: { type: Boolean, default: false },
|
|
41531
|
+
taskId: {}
|
|
41532
|
+
},
|
|
41533
|
+
setup(__props) {
|
|
41534
|
+
const { meState: meState2 } = storeToRefs(useMeetingStore());
|
|
41535
|
+
const props = __props;
|
|
41536
|
+
const visible = callVisible;
|
|
41537
|
+
const themeClass = computed(() => `theme-${props.theme}`);
|
|
41538
|
+
const showDeviceSelector = ref(false);
|
|
41539
|
+
const currentDeviceType = ref("microphone");
|
|
41540
|
+
const micRef = ref(null);
|
|
41541
|
+
const cameraRef = ref(null);
|
|
41542
|
+
const joinTimeObj = ref("");
|
|
41543
|
+
let timer = null;
|
|
41544
|
+
watch(
|
|
41545
|
+
() => joinTime.value,
|
|
41546
|
+
() => {
|
|
41547
|
+
if (timer) {
|
|
41548
|
+
clearInterval(timer);
|
|
41549
|
+
timer = null;
|
|
41550
|
+
}
|
|
41551
|
+
if (joinTime.value) {
|
|
41552
|
+
timer = setInterval(() => {
|
|
41553
|
+
const now = +/* @__PURE__ */ new Date();
|
|
41554
|
+
joinTimeObj.value = formatDuringObject((now - joinTime.value) / 1e3);
|
|
41555
|
+
}, 1e3);
|
|
41556
|
+
}
|
|
41557
|
+
},
|
|
41558
|
+
{
|
|
41559
|
+
immediate: true
|
|
41560
|
+
}
|
|
41561
|
+
);
|
|
41562
|
+
const isCalling = computed(() => callStatus.value === "calling");
|
|
41563
|
+
const isReceiving = computed(() => callStatus.value === "receiving");
|
|
41564
|
+
const isConnected = computed(() => callStatus.value === "connected");
|
|
41565
|
+
const isListening = computed(() => callStatus.value === "listening");
|
|
41566
|
+
const isForcibleInsertion = computed(
|
|
41567
|
+
() => callStatus.value === "forcible-insertion"
|
|
41568
|
+
);
|
|
41569
|
+
const visibleMembers = computed(() => {
|
|
41570
|
+
return members.value.filter(
|
|
41571
|
+
(item) => item.roleType !== "4" && item.joinStaus === "1" && (!isListening.value || item.member.memberId !== getUserId())
|
|
41572
|
+
);
|
|
41573
|
+
});
|
|
41574
|
+
const hasForceInsertMember = computed(
|
|
41575
|
+
() => visibleMembers.value.some((item) => item.roleType === "1")
|
|
41576
|
+
);
|
|
41577
|
+
const layoutClass = computed(() => {
|
|
41578
|
+
if (visibleMembers.value.length <= 1) return "layout-single";
|
|
41579
|
+
if (hasForceInsertMember.value) return "layout-three";
|
|
41580
|
+
return "layout-two";
|
|
41581
|
+
});
|
|
41582
|
+
const mainMemberId = ref("");
|
|
41583
|
+
const pickDefaultMainMember = (list) => {
|
|
41584
|
+
if (!list.length) {
|
|
41585
|
+
return "";
|
|
41586
|
+
}
|
|
41587
|
+
const remoteMember = list.find(
|
|
41588
|
+
(item) => item.member.memberId !== getUserId()
|
|
41589
|
+
);
|
|
41590
|
+
return (remoteMember || list[0]).member.memberId;
|
|
41591
|
+
};
|
|
41592
|
+
watch(
|
|
41593
|
+
visibleMembers,
|
|
41594
|
+
(list) => {
|
|
41595
|
+
if (!list.length) {
|
|
41596
|
+
mainMemberId.value = "";
|
|
41597
|
+
return;
|
|
41598
|
+
}
|
|
41599
|
+
const exists = list.some(
|
|
41600
|
+
(item) => item.member.memberId === mainMemberId.value
|
|
41601
|
+
);
|
|
41602
|
+
if (!exists) {
|
|
41603
|
+
mainMemberId.value = pickDefaultMainMember(list);
|
|
41604
|
+
}
|
|
41605
|
+
},
|
|
41606
|
+
{ immediate: true, deep: true }
|
|
41607
|
+
);
|
|
41608
|
+
const mainMember = computed(() => {
|
|
41609
|
+
if (!visibleMembers.value.length) return null;
|
|
41610
|
+
if (!mainMemberId.value) {
|
|
41611
|
+
return visibleMembers.value[0];
|
|
41612
|
+
}
|
|
41613
|
+
return visibleMembers.value.find(
|
|
41614
|
+
(item) => item.member.memberId === mainMemberId.value
|
|
41615
|
+
) || visibleMembers.value[0];
|
|
41616
|
+
});
|
|
41617
|
+
const secondaryMembers = computed(() => {
|
|
41618
|
+
if (!mainMember.value) return [];
|
|
41619
|
+
return visibleMembers.value.filter(
|
|
41620
|
+
(item) => {
|
|
41621
|
+
var _a25;
|
|
41622
|
+
return item.member.memberId !== ((_a25 = mainMember.value) == null ? void 0 : _a25.member.memberId);
|
|
41623
|
+
}
|
|
41624
|
+
);
|
|
41625
|
+
});
|
|
41626
|
+
const subVideoPositions = computed(() => {
|
|
41627
|
+
const positions = {};
|
|
41628
|
+
secondaryMembers.value.forEach((member, index) => {
|
|
41629
|
+
positions[member.member.memberId] = {
|
|
41630
|
+
position: "absolute",
|
|
41631
|
+
width: `${DEFAULT_SUB_VIDEO_WIDTH}px`,
|
|
41632
|
+
height: `${DEFAULT_SUB_VIDEO_HEIGHT}px`,
|
|
41633
|
+
right: "16px",
|
|
41634
|
+
top: `${STATUS_BAR_HEIGHT + 16 + index * (DEFAULT_SUB_VIDEO_HEIGHT + SUB_VIDEO_GAP)}px`
|
|
41635
|
+
};
|
|
41636
|
+
});
|
|
41637
|
+
return positions;
|
|
41638
|
+
});
|
|
41639
|
+
const getVideoItemStyle = (memberId) => {
|
|
41640
|
+
var _a25;
|
|
41641
|
+
if (memberId === ((_a25 = mainMember.value) == null ? void 0 : _a25.member.memberId)) {
|
|
41642
|
+
return {
|
|
41643
|
+
position: "absolute",
|
|
41644
|
+
top: `${STATUS_BAR_HEIGHT}px`,
|
|
41645
|
+
right: "0px",
|
|
41646
|
+
left: "0px",
|
|
41647
|
+
bottom: `${CONTROL_BAR_HEIGHT}px`
|
|
41648
|
+
};
|
|
41649
|
+
}
|
|
41650
|
+
return subVideoPositions.value[memberId] || {};
|
|
41651
|
+
};
|
|
41652
|
+
const handleSwitchMain = (memberId) => {
|
|
41653
|
+
if (memberId === mainMemberId.value) return;
|
|
41654
|
+
mainMemberId.value = memberId;
|
|
41655
|
+
};
|
|
41656
|
+
watch(
|
|
41657
|
+
() => {
|
|
41658
|
+
var _a25;
|
|
41659
|
+
return ((_a25 = mainMember.value) == null ? void 0 : _a25.member.memberId) || "";
|
|
41660
|
+
},
|
|
41661
|
+
(memberId) => {
|
|
41662
|
+
const focusUid = memberId && memberId !== getUserId() ? memberId : null;
|
|
41663
|
+
void setPreferredRemoteVideoFocus(focusUid);
|
|
41664
|
+
},
|
|
41665
|
+
{ immediate: true }
|
|
41666
|
+
);
|
|
41667
|
+
const handleRetryVideo = async (user) => {
|
|
41668
|
+
var _a25;
|
|
41669
|
+
const memberId = (_a25 = user == null ? void 0 : user.member) == null ? void 0 : _a25.memberId;
|
|
41670
|
+
if (!memberId || memberId === getUserId() || (user == null ? void 0 : user.videoRetrying)) return;
|
|
41671
|
+
await retryRemoteVideoSubscription(memberId);
|
|
41672
|
+
};
|
|
41673
|
+
const statusText = computed(() => {
|
|
41674
|
+
switch (callStatus.value) {
|
|
41675
|
+
case "calling":
|
|
41676
|
+
return "正在呼叫";
|
|
41677
|
+
case "receiving":
|
|
41678
|
+
return "正在接收呼叫";
|
|
41679
|
+
case "connected":
|
|
41680
|
+
return "通话中";
|
|
41681
|
+
case "listening":
|
|
41682
|
+
return "正在监听";
|
|
41683
|
+
case "end":
|
|
41684
|
+
return "通话结束";
|
|
41685
|
+
default:
|
|
41686
|
+
return "通话中";
|
|
41687
|
+
}
|
|
41688
|
+
});
|
|
41689
|
+
const callerInfo = ref({});
|
|
41690
|
+
watch(
|
|
41691
|
+
() => callStatus.value,
|
|
41692
|
+
() => {
|
|
41693
|
+
try {
|
|
41694
|
+
const info = JSON.parse(
|
|
41695
|
+
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41696
|
+
);
|
|
41697
|
+
callerInfo.value = info || {};
|
|
41698
|
+
} catch {
|
|
41699
|
+
callerInfo.value = {};
|
|
41700
|
+
}
|
|
41701
|
+
},
|
|
41702
|
+
{ immediate: true }
|
|
41703
|
+
);
|
|
41704
|
+
const onChange = async (type) => {
|
|
41705
|
+
switch (type) {
|
|
41706
|
+
case RoomModalSelectType.microphoneClick:
|
|
41707
|
+
if (micOperationBusy.value) return;
|
|
41708
|
+
if (isAuthority.value) {
|
|
41709
|
+
showNotification(alertMsg, "warning", 5e3);
|
|
41710
|
+
return;
|
|
41711
|
+
}
|
|
41712
|
+
if (meState2.value.microPhoneState === "1") {
|
|
41713
|
+
await closeMic();
|
|
41714
|
+
} else {
|
|
41715
|
+
await openMic();
|
|
41716
|
+
}
|
|
41717
|
+
break;
|
|
41718
|
+
case RoomModalSelectType.cameraClick:
|
|
41719
|
+
if (cameraOperationBusy.value) return;
|
|
41720
|
+
if (isAuthority.value) {
|
|
41721
|
+
alert(alertMsg);
|
|
41722
|
+
return;
|
|
41723
|
+
}
|
|
41724
|
+
if (meState2.value.cameraState === "1") {
|
|
41725
|
+
await closeCamera();
|
|
41726
|
+
} else {
|
|
41727
|
+
await openCamera();
|
|
41728
|
+
}
|
|
41729
|
+
break;
|
|
41730
|
+
case RoomModalSelectType.acceptClick:
|
|
41731
|
+
acceptCall();
|
|
41732
|
+
break;
|
|
41733
|
+
case RoomModalSelectType.endClick:
|
|
41734
|
+
endCall();
|
|
41735
|
+
break;
|
|
41736
|
+
}
|
|
41737
|
+
};
|
|
41738
|
+
const acceptCall = () => {
|
|
41739
|
+
const meetingInfo = JSON.parse(
|
|
41740
|
+
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41741
|
+
);
|
|
41742
|
+
setCallStatus("connected");
|
|
41743
|
+
stopSosFlash();
|
|
41744
|
+
getAnswerCall({
|
|
41745
|
+
meetingId: meetingInfo.meetingId,
|
|
41746
|
+
memberId: getUserId(),
|
|
41747
|
+
cameraStatus: "0",
|
|
41748
|
+
audioStatus: "0"
|
|
41749
|
+
}).then(() => {
|
|
41750
|
+
return getJoinCall({
|
|
41751
|
+
meetingId: meetingInfo.meetingId,
|
|
41752
|
+
memberId: getUserId(),
|
|
41753
|
+
cameraStatus: "0",
|
|
41754
|
+
audioStatus: "0"
|
|
41755
|
+
});
|
|
41756
|
+
}).then((resp) => {
|
|
41757
|
+
if (resp && resp.code === 200) {
|
|
41758
|
+
sessionStorage.setItem("JS_MEETING_INFO", JSON.stringify(resp.data));
|
|
41759
|
+
console.log("拨打电话", resp.data.meetingToken);
|
|
41760
|
+
setTimeout(() => {
|
|
41761
|
+
joinRoom();
|
|
41762
|
+
}, 100);
|
|
41763
|
+
stopRingtone();
|
|
41764
|
+
recordMeeting("start");
|
|
41765
|
+
}
|
|
41766
|
+
}).catch((err) => {
|
|
41767
|
+
console.error("接听失败", err);
|
|
41768
|
+
setCallStatus("end");
|
|
41769
|
+
});
|
|
41770
|
+
};
|
|
41771
|
+
const endCall = async () => {
|
|
41772
|
+
visible.value = false;
|
|
41773
|
+
stopSosFlash();
|
|
41774
|
+
const meetingInfo = JSON.parse(
|
|
41775
|
+
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41776
|
+
);
|
|
41777
|
+
setCallStatus("end");
|
|
41778
|
+
try {
|
|
41779
|
+
const res = await getHangUpCall({
|
|
41780
|
+
meetingId: meetingInfo.meetingId,
|
|
41781
|
+
memberId: getUserId()
|
|
41782
|
+
});
|
|
41783
|
+
if (res.code === 200) {
|
|
41784
|
+
await logoutRoomAction();
|
|
41785
|
+
clearTimer();
|
|
41786
|
+
recordMeeting("stop");
|
|
41787
|
+
}
|
|
41788
|
+
} catch (err) {
|
|
41789
|
+
console.error("挂断失败", err);
|
|
41790
|
+
await logoutRoomAction();
|
|
41791
|
+
}
|
|
41792
|
+
};
|
|
41793
|
+
const stopMonitoring = async () => {
|
|
41794
|
+
visible.value = false;
|
|
41795
|
+
const meetingInfo = JSON.parse(
|
|
41796
|
+
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41797
|
+
);
|
|
41798
|
+
try {
|
|
41799
|
+
const res = await getMeetingLeave({
|
|
41800
|
+
meetingId: meetingInfo.meetingId,
|
|
41801
|
+
memberId: getUserId()
|
|
41802
|
+
});
|
|
41803
|
+
if (res.code === 200) {
|
|
41804
|
+
await logoutRoomAction();
|
|
41805
|
+
clearTimer();
|
|
41806
|
+
}
|
|
41807
|
+
} catch (err) {
|
|
41808
|
+
console.error("离开失败", err);
|
|
41809
|
+
await logoutRoomAction();
|
|
41810
|
+
}
|
|
41811
|
+
};
|
|
41812
|
+
const clearTimer = () => {
|
|
41813
|
+
if (timer) {
|
|
41814
|
+
clearInterval(timer);
|
|
41815
|
+
timer = null;
|
|
41816
|
+
}
|
|
41817
|
+
};
|
|
41818
|
+
const recordMeeting = (newState) => {
|
|
41819
|
+
const meetingInfo = JSON.parse(
|
|
41820
|
+
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
41821
|
+
);
|
|
41822
|
+
let params = {
|
|
41823
|
+
meetingId: meetingInfo.meetingId,
|
|
41824
|
+
memberId: getUserId(),
|
|
41825
|
+
cmd: newState
|
|
41826
|
+
};
|
|
41827
|
+
getMcuCtrl(params).then(() => {
|
|
41828
|
+
}).catch(() => {
|
|
41829
|
+
});
|
|
41830
|
+
};
|
|
41831
|
+
const toggleDeviceSelector = (deviceType) => {
|
|
41832
|
+
currentDeviceType.value = deviceType;
|
|
41833
|
+
showDeviceSelector.value = !showDeviceSelector.value;
|
|
41834
|
+
};
|
|
41835
|
+
watch(
|
|
41836
|
+
() => visible.value,
|
|
41837
|
+
(newValue) => {
|
|
41838
|
+
if (newValue) {
|
|
41839
|
+
showDeviceSelector.value = false;
|
|
41840
|
+
}
|
|
41841
|
+
}
|
|
41842
|
+
);
|
|
41843
|
+
onMounted(() => {
|
|
41844
|
+
});
|
|
41845
|
+
onUnmounted(() => {
|
|
41846
|
+
if (timer) {
|
|
41847
|
+
clearInterval(timer);
|
|
41848
|
+
timer = null;
|
|
41849
|
+
}
|
|
41850
|
+
});
|
|
41851
|
+
return (_ctx, _cache) => {
|
|
41852
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
41853
|
+
unref(sosFlashVisible) ? (openBlock(), createElementBlock("div", _hoisted_1$m)) : createCommentVNode("", true),
|
|
41854
|
+
unref(visible) ? (openBlock(), createElementBlock("div", {
|
|
41855
|
+
key: 1,
|
|
41856
|
+
class: normalizeClass(["js-dialog-overlay", themeClass.value])
|
|
41857
|
+
}, [
|
|
41858
|
+
createElementVNode("div", _hoisted_2$l, [
|
|
41859
|
+
createElementVNode("div", _hoisted_3$k, [
|
|
41860
|
+
createElementVNode("div", _hoisted_4$i, [
|
|
41861
|
+
createElementVNode("div", null, [
|
|
41862
|
+
createVNode(NetWorkStatus, { theme: _ctx.theme }, null, 8, ["theme"])
|
|
41863
|
+
]),
|
|
41864
|
+
isReceiving.value && callerInfo.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
|
|
41865
|
+
createElementVNode("div", _hoisted_6$e, toDisplayString(unref(getUserAvatar)(callerInfo.value)), 1),
|
|
41866
|
+
createElementVNode("div", _hoisted_7$d, [
|
|
41867
|
+
createElementVNode("div", _hoisted_8$c, toDisplayString(callerInfo.value.memberName || "未知来电"), 1),
|
|
41868
|
+
callerInfo.value.shortNumber ? (openBlock(), createElementBlock("div", _hoisted_9$a, " 分机:" + toDisplayString(callerInfo.value.shortNumber), 1)) : createCommentVNode("", true)
|
|
41869
|
+
])
|
|
41870
|
+
])) : createCommentVNode("", true)
|
|
41871
|
+
]),
|
|
41872
|
+
createElementVNode("div", _hoisted_10$a, [
|
|
41873
|
+
createElementVNode("span", null, toDisplayString(statusText.value), 1)
|
|
41874
|
+
])
|
|
41875
|
+
]),
|
|
41876
|
+
createElementVNode("div", {
|
|
41877
|
+
class: normalizeClass(["video-container", layoutClass.value])
|
|
41878
|
+
}, [
|
|
41879
|
+
visibleMembers.value.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(visibleMembers.value, (user) => {
|
|
41880
|
+
var _a25, _b25;
|
|
41881
|
+
return openBlock(), createElementBlock("div", {
|
|
41882
|
+
key: user.member.memberId,
|
|
41883
|
+
class: normalizeClass(["video-item", {
|
|
41884
|
+
"is-main": ((_a25 = mainMember.value) == null ? void 0 : _a25.member.memberId) === user.member.memberId,
|
|
41885
|
+
"is-secondary": ((_b25 = mainMember.value) == null ? void 0 : _b25.member.memberId) !== user.member.memberId
|
|
41886
|
+
}]),
|
|
41887
|
+
style: normalizeStyle(getVideoItemStyle(user.member.memberId)),
|
|
41888
|
+
onClick: ($event) => handleSwitchMain(user.member.memberId)
|
|
41889
|
+
}, [
|
|
41890
|
+
createElementVNode("div", _hoisted_12$9, [
|
|
41891
|
+
withDirectives(createElementVNode("div", {
|
|
41892
|
+
id: unref(getUserId)() === user.member.memberId ? "my-video" : `other-${user.member.memberId}`,
|
|
41893
|
+
class: "video-slot"
|
|
41894
|
+
}, null, 8, _hoisted_13$7), [
|
|
41895
|
+
[vShow, (user == null ? void 0 : user.cameraStatus) === "1"]
|
|
41896
|
+
]),
|
|
41897
|
+
withDirectives(createElementVNode("div", _hoisted_14$6, [
|
|
41898
|
+
createElementVNode("div", _hoisted_15$5, toDisplayString(unref(getUserAvatar)(user)), 1)
|
|
41899
|
+
], 512), [
|
|
41900
|
+
[vShow, (user == null ? void 0 : user.cameraStatus) !== "1"]
|
|
41901
|
+
]),
|
|
41902
|
+
withDirectives(createElementVNode("div", _hoisted_16$5, [
|
|
41903
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "video-loading-spinner" }, null, -1)),
|
|
41904
|
+
createElementVNode("div", _hoisted_17$4, toDisplayString((user == null ? void 0 : user.videoRetrying) ? "重新加载中..." : "加载中..."), 1)
|
|
41905
|
+
], 512), [
|
|
41906
|
+
[vShow, (user == null ? void 0 : user.loading) && (user == null ? void 0 : user.cameraStatus) === "1"]
|
|
41907
|
+
]),
|
|
41908
|
+
withDirectives(createElementVNode("div", _hoisted_18$4, [
|
|
41909
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "video-loading-text" }, "视频加载失败", -1)),
|
|
41910
|
+
createElementVNode("button", {
|
|
41911
|
+
type: "button",
|
|
41912
|
+
class: "video-retry-button",
|
|
41913
|
+
disabled: user == null ? void 0 : user.videoRetrying,
|
|
41914
|
+
onClick: withModifiers(($event) => handleRetryVideo(user), ["stop"])
|
|
41915
|
+
}, toDisplayString((user == null ? void 0 : user.videoRetrying) ? "重新加载中..." : "重新加载"), 9, _hoisted_19$4)
|
|
41916
|
+
], 512), [
|
|
41917
|
+
[vShow, (user == null ? void 0 : user.videoLoadFailed) && (user == null ? void 0 : user.cameraStatus) === "1"]
|
|
41918
|
+
]),
|
|
41919
|
+
createElementVNode("div", _hoisted_20$4, [
|
|
41920
|
+
createElementVNode("span", _hoisted_21$2, toDisplayString(user.member.name || "未知成员"), 1),
|
|
41921
|
+
user.member.memberId === unref(getUserId)() ? (openBlock(), createElementBlock("span", _hoisted_22$2, "(我)")) : createCommentVNode("", true)
|
|
41922
|
+
])
|
|
41923
|
+
])
|
|
41924
|
+
], 14, _hoisted_11$9);
|
|
41925
|
+
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_23$2, [..._cache[8] || (_cache[8] = [
|
|
41926
|
+
createElementVNode("span", null, "等待成员加入...", -1)
|
|
41927
|
+
])]))
|
|
41928
|
+
], 2),
|
|
41929
|
+
createElementVNode("div", _hoisted_24$2, [
|
|
41930
|
+
isConnected.value ? (openBlock(), createElementBlock("div", _hoisted_25$2, [
|
|
41931
|
+
createElementVNode("span", _hoisted_26$2, toDisplayString(joinTimeObj.value), 1)
|
|
41932
|
+
])) : createCommentVNode("", true),
|
|
41933
|
+
createElementVNode("div", _hoisted_27$2, [
|
|
41934
|
+
isConnected.value || isForcibleInsertion.value ? (openBlock(), createElementBlock("div", {
|
|
41935
|
+
key: 0,
|
|
41936
|
+
ref_key: "micRef",
|
|
41937
|
+
ref: micRef
|
|
41938
|
+
}, [
|
|
41939
|
+
createElementVNode("button", {
|
|
41940
|
+
class: normalizeClass(["control-btn", { "is-disabled": unref(micOperationBusy) }]),
|
|
41941
|
+
onClick: _cache[0] || (_cache[0] = ($event) => onChange(unref(RoomModalSelectType).microphoneClick))
|
|
41942
|
+
}, [
|
|
41943
|
+
createVNode(SvgIcon, {
|
|
41944
|
+
name: unref(meState2).microPhoneState == "1" ? "MicrophoneIcon" : "MicrophoneSlashIcon",
|
|
41945
|
+
size: 20
|
|
41946
|
+
}, null, 8, ["name"]),
|
|
41947
|
+
_cache[9] || (_cache[9] = createElementVNode("span", null, "麦克风", -1))
|
|
41948
|
+
], 2),
|
|
41949
|
+
createElementVNode("div", {
|
|
41950
|
+
class: normalizeClass(["device-dropdown-trigger", { "is-disabled": unref(micOperationBusy) }]),
|
|
41951
|
+
onClick: _cache[1] || (_cache[1] = ($event) => toggleDeviceSelector("microphone"))
|
|
41952
|
+
}, [
|
|
41953
|
+
createVNode(SvgIcon, {
|
|
41954
|
+
name: "TriangleIcon",
|
|
41955
|
+
size: 9
|
|
41956
|
+
})
|
|
41957
|
+
], 2)
|
|
41958
|
+
], 512)) : createCommentVNode("", true),
|
|
41959
|
+
isReceiving.value ? (openBlock(), createElementBlock("button", {
|
|
41960
|
+
key: 1,
|
|
41961
|
+
class: "accept-call-btn",
|
|
41962
|
+
onClick: acceptCall
|
|
41963
|
+
}, [
|
|
41964
|
+
createVNode(SvgIcon, {
|
|
41965
|
+
name: "PhoneIcon",
|
|
41966
|
+
size: 21
|
|
41967
|
+
}),
|
|
41968
|
+
_cache[10] || (_cache[10] = createElementVNode("span", null, "接听", -1))
|
|
41969
|
+
])) : createCommentVNode("", true),
|
|
41970
|
+
isCalling.value || isReceiving.value || isConnected.value ? (openBlock(), createElementBlock("button", {
|
|
41971
|
+
key: 2,
|
|
41972
|
+
class: "end-call-btn",
|
|
41973
|
+
onClick: endCall
|
|
41974
|
+
}, [
|
|
41975
|
+
createVNode(SvgIcon, {
|
|
41976
|
+
name: "HandUpIcon",
|
|
41977
|
+
size: 21,
|
|
41978
|
+
"color-class": "handUp"
|
|
41979
|
+
}),
|
|
41980
|
+
createElementVNode("span", null, toDisplayString(isReceiving.value ? "拒绝" : "挂断"), 1)
|
|
41981
|
+
])) : createCommentVNode("", true),
|
|
41982
|
+
isListening.value ? (openBlock(), createElementBlock("button", {
|
|
41983
|
+
key: 3,
|
|
41984
|
+
class: "end-call-btn",
|
|
41985
|
+
onClick: stopMonitoring
|
|
41986
|
+
}, [
|
|
41987
|
+
createVNode(SvgIcon, {
|
|
41988
|
+
name: "HandUpIcon",
|
|
41989
|
+
size: 21,
|
|
41990
|
+
"color-class": "handUp"
|
|
41991
|
+
}),
|
|
41992
|
+
_cache[11] || (_cache[11] = createElementVNode("span", null, "结束监听", -1))
|
|
41993
|
+
])) : createCommentVNode("", true),
|
|
41994
|
+
isForcibleInsertion.value ? (openBlock(), createElementBlock("button", {
|
|
41995
|
+
key: 4,
|
|
41996
|
+
class: "end-call-btn",
|
|
41997
|
+
onClick: stopMonitoring
|
|
41998
|
+
}, [
|
|
41999
|
+
createVNode(SvgIcon, {
|
|
42000
|
+
name: "HandUpIcon",
|
|
42001
|
+
size: 20
|
|
42002
|
+
}),
|
|
42003
|
+
_cache[12] || (_cache[12] = createElementVNode("span", null, "退出通话", -1))
|
|
42004
|
+
])) : createCommentVNode("", true),
|
|
42005
|
+
isConnected.value || isForcibleInsertion.value ? (openBlock(), createElementBlock("div", {
|
|
42006
|
+
key: 5,
|
|
42007
|
+
ref_key: "cameraRef",
|
|
42008
|
+
ref: cameraRef
|
|
42009
|
+
}, [
|
|
42010
|
+
createElementVNode("button", {
|
|
42011
|
+
class: normalizeClass(["control-btn", { "is-disabled": unref(cameraOperationBusy) }]),
|
|
42012
|
+
onClick: _cache[2] || (_cache[2] = ($event) => onChange(unref(RoomModalSelectType).cameraClick))
|
|
42013
|
+
}, [
|
|
42014
|
+
createVNode(SvgIcon, {
|
|
42015
|
+
name: unref(meState2).cameraState == "1" ? "CameraIcon" : "CameraSlashIcon",
|
|
42016
|
+
size: 20
|
|
42017
|
+
}, null, 8, ["name"]),
|
|
42018
|
+
_cache[13] || (_cache[13] = createElementVNode("span", null, "摄像头", -1))
|
|
42019
|
+
], 2),
|
|
42020
|
+
createElementVNode("div", {
|
|
42021
|
+
class: normalizeClass(["device-dropdown-trigger", { "is-disabled": unref(cameraOperationBusy) }]),
|
|
42022
|
+
onClick: _cache[3] || (_cache[3] = ($event) => toggleDeviceSelector("camera"))
|
|
42023
|
+
}, [
|
|
42024
|
+
createVNode(SvgIcon, {
|
|
42025
|
+
name: "TriangleIcon",
|
|
42026
|
+
size: 9
|
|
42027
|
+
})
|
|
42028
|
+
], 2)
|
|
42029
|
+
], 512)) : createCommentVNode("", true)
|
|
42030
|
+
]),
|
|
42031
|
+
isConnected.value ? (openBlock(), createElementBlock("div", _hoisted_28$2, [
|
|
42032
|
+
createVNode(SvgIcon, {
|
|
42033
|
+
name: "TranscribeIcon",
|
|
42034
|
+
size: 22
|
|
42035
|
+
}),
|
|
42036
|
+
_cache[14] || (_cache[14] = createElementVNode("span", null, "录制中", -1))
|
|
42037
|
+
])) : createCommentVNode("", true)
|
|
42038
|
+
])
|
|
42039
|
+
]),
|
|
42040
|
+
createVNode(SmartPopup, {
|
|
42041
|
+
visible: showDeviceSelector.value,
|
|
42042
|
+
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => showDeviceSelector.value = $event),
|
|
42043
|
+
trigger: currentDeviceType.value == "microphone" ? micRef.value : cameraRef.value,
|
|
42044
|
+
gap: 10
|
|
42045
|
+
}, {
|
|
42046
|
+
default: withCtx(() => [
|
|
42047
|
+
createVNode(DeviceSelector, {
|
|
42048
|
+
"device-type": currentDeviceType.value,
|
|
42049
|
+
theme: _ctx.theme,
|
|
42050
|
+
onClose: _cache[4] || (_cache[4] = ($event) => showDeviceSelector.value = false)
|
|
42051
|
+
}, null, 8, ["device-type", "theme"])
|
|
42052
|
+
]),
|
|
42053
|
+
_: 1
|
|
42054
|
+
}, 8, ["visible", "trigger"])
|
|
42055
|
+
], 2)) : createCommentVNode("", true)
|
|
42056
|
+
]);
|
|
42057
|
+
};
|
|
41681
42058
|
}
|
|
41682
|
-
|
|
41683
|
-
|
|
41684
|
-
|
|
41685
|
-
|
|
41686
|
-
|
|
41687
|
-
|
|
42059
|
+
});
|
|
42060
|
+
const JSCall = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-5c880aa1"]]);
|
|
42061
|
+
const HANDOFF_SOURCE_TAB_ID_KEY = "JS_MEETING_MQTT_HANDOFF_SOURCE_TAB_ID";
|
|
42062
|
+
const HANDOFF_TARGET_TAB_ID_KEY = "JS_MEETING_MQTT_HANDOFF_TARGET_TAB_ID";
|
|
42063
|
+
const HANDOFF_ID_KEY = "JS_MEETING_MQTT_HANDOFF_ID";
|
|
42064
|
+
const RECONNECT_SIGNAL_KEY = "JS_MEETING_MQTT_RECONNECT_SIGNAL";
|
|
42065
|
+
const TARGET_HEARTBEAT_KEY = "JS_MEETING_MQTT_HANDOFF_HEARTBEAT";
|
|
42066
|
+
const TARGET_TAB_STATUS_KEY = "JS_MEETING_NEW_TAB_STATUS";
|
|
42067
|
+
const TARGET_HEARTBEAT_INTERVAL_MS = 1e3;
|
|
42068
|
+
const RECONNECT_CHECK_DELAY_MS = 1500;
|
|
42069
|
+
const TARGET_TAB_STATUS_CLOSED = 0;
|
|
42070
|
+
const TARGET_TAB_STATUS_OPEN = 1;
|
|
42071
|
+
let installed = false;
|
|
42072
|
+
let closeSignalSent = false;
|
|
42073
|
+
let heartbeatTimer = null;
|
|
42074
|
+
let lastHandledReconnectSignalTs = 0;
|
|
42075
|
+
let leaveRequestSent = false;
|
|
42076
|
+
function createRandomId() {
|
|
42077
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
42078
|
+
return crypto.randomUUID().replace(/-/g, "").slice(0, 12);
|
|
41688
42079
|
}
|
|
41689
|
-
|
|
41690
|
-
return currentTabId === context.targetTabId;
|
|
42080
|
+
return Math.random().toString(36).slice(2, 14);
|
|
41691
42081
|
}
|
|
41692
|
-
function
|
|
42082
|
+
function safeSessionStorageGetItem(key) {
|
|
41693
42083
|
try {
|
|
41694
|
-
|
|
41695
|
-
const meetingId = String((meetingInfo == null ? void 0 : meetingInfo.meetingId) || "").trim();
|
|
41696
|
-
const memberId = String(getUserId() || "").trim();
|
|
41697
|
-
if (!meetingId || !memberId) {
|
|
41698
|
-
return null;
|
|
41699
|
-
}
|
|
41700
|
-
return { meetingId, memberId, force: true };
|
|
42084
|
+
return sessionStorage.getItem(key);
|
|
41701
42085
|
} catch {
|
|
41702
42086
|
return null;
|
|
41703
42087
|
}
|
|
41704
42088
|
}
|
|
41705
|
-
function
|
|
41706
|
-
if (leaveRequestSent) {
|
|
41707
|
-
return;
|
|
41708
|
-
}
|
|
41709
|
-
const payload = buildMeetingLeavePayload();
|
|
41710
|
-
if (!payload) {
|
|
41711
|
-
return;
|
|
41712
|
-
}
|
|
41713
|
-
leaveRequestSent = true;
|
|
41714
|
-
const body = JSON.stringify(payload);
|
|
41715
|
-
const token = getSdkToken();
|
|
41716
|
-
const authHeader = token ? { Authorization: `Bearer ${token}` } : {};
|
|
41717
|
-
const requestUrl = "/meeting/api/v2/meeting/leave";
|
|
42089
|
+
function safeLocalStorageSetItem(key, value) {
|
|
41718
42090
|
try {
|
|
41719
|
-
|
|
41720
|
-
method: "POST",
|
|
41721
|
-
headers: {
|
|
41722
|
-
"Content-Type": "application/json",
|
|
41723
|
-
Accept: "application/json, text/plain, */*",
|
|
41724
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
41725
|
-
...authHeader
|
|
41726
|
-
},
|
|
41727
|
-
body,
|
|
41728
|
-
keepalive: true,
|
|
41729
|
-
credentials: "same-origin"
|
|
41730
|
-
}).catch(() => {
|
|
41731
|
-
});
|
|
41732
|
-
console.warn("[MQTT_HANDOFF] 页面关闭触发离会请求(keepalive)", payload);
|
|
42091
|
+
localStorage.setItem(key, value);
|
|
41733
42092
|
} catch {
|
|
41734
42093
|
}
|
|
42094
|
+
}
|
|
42095
|
+
function safeLocalStorageGetItem(key) {
|
|
41735
42096
|
try {
|
|
41736
|
-
|
|
41737
|
-
const beaconData = new Blob([body], { type: "application/json" });
|
|
41738
|
-
const sent = navigator.sendBeacon(requestUrl, beaconData);
|
|
41739
|
-
console.warn("[MQTT_HANDOFF] 页面关闭触发离会请求(beacon)", {
|
|
41740
|
-
...payload,
|
|
41741
|
-
sent
|
|
41742
|
-
});
|
|
41743
|
-
}
|
|
42097
|
+
return localStorage.getItem(key);
|
|
41744
42098
|
} catch {
|
|
42099
|
+
return null;
|
|
41745
42100
|
}
|
|
41746
42101
|
}
|
|
41747
|
-
function
|
|
41748
|
-
const
|
|
41749
|
-
|
|
41750
|
-
|
|
41751
|
-
|
|
41752
|
-
|
|
41753
|
-
if (!latestHeartbeat) {
|
|
41754
|
-
return true;
|
|
41755
|
-
}
|
|
41756
|
-
if (latestHeartbeat.targetTabId !== signal.targetTabId) {
|
|
41757
|
-
return true;
|
|
41758
|
-
}
|
|
41759
|
-
if (latestHeartbeat.handoffId !== signal.handoffId) {
|
|
41760
|
-
return true;
|
|
42102
|
+
function getMeetingMqttHandoffContext() {
|
|
42103
|
+
const sourceTabId = safeSessionStorageGetItem(HANDOFF_SOURCE_TAB_ID_KEY) || "";
|
|
42104
|
+
const targetTabId = safeSessionStorageGetItem(HANDOFF_TARGET_TAB_ID_KEY) || "";
|
|
42105
|
+
const handoffId = safeSessionStorageGetItem(HANDOFF_ID_KEY) || "";
|
|
42106
|
+
if (!sourceTabId || !targetTabId || !handoffId) {
|
|
42107
|
+
return null;
|
|
41761
42108
|
}
|
|
41762
|
-
return
|
|
41763
|
-
|
|
41764
|
-
|
|
41765
|
-
|
|
41766
|
-
}
|
|
41767
|
-
function setMeetingMqttHandoffForWindow(targetWindow, context) {
|
|
41768
|
-
targetWindow.sessionStorage.setItem(
|
|
41769
|
-
HANDOFF_SOURCE_TAB_ID_KEY,
|
|
41770
|
-
context.sourceTabId
|
|
41771
|
-
);
|
|
41772
|
-
targetWindow.sessionStorage.setItem(
|
|
41773
|
-
HANDOFF_TARGET_TAB_ID_KEY,
|
|
41774
|
-
context.targetTabId
|
|
41775
|
-
);
|
|
41776
|
-
targetWindow.sessionStorage.setItem(HANDOFF_ID_KEY, context.handoffId);
|
|
42109
|
+
return {
|
|
42110
|
+
sourceTabId,
|
|
42111
|
+
targetTabId,
|
|
42112
|
+
handoffId
|
|
42113
|
+
};
|
|
41777
42114
|
}
|
|
41778
|
-
function
|
|
41779
|
-
|
|
41780
|
-
|
|
42115
|
+
function readTargetHeartbeat() {
|
|
42116
|
+
const raw = safeLocalStorageGetItem(TARGET_HEARTBEAT_KEY);
|
|
42117
|
+
if (!raw) {
|
|
42118
|
+
return null;
|
|
41781
42119
|
}
|
|
41782
|
-
|
|
41783
|
-
|
|
41784
|
-
|
|
41785
|
-
|
|
41786
|
-
return;
|
|
41787
|
-
}
|
|
41788
|
-
let signal = null;
|
|
41789
|
-
try {
|
|
41790
|
-
signal = JSON.parse(event.newValue);
|
|
41791
|
-
} catch {
|
|
41792
|
-
return;
|
|
41793
|
-
}
|
|
41794
|
-
if (!(signal == null ? void 0 : signal.sourceTabId) || !signal.targetTabId || !signal.handoffId) {
|
|
41795
|
-
return;
|
|
41796
|
-
}
|
|
41797
|
-
const signalTs = Number(signal.ts);
|
|
41798
|
-
if (!signalTs || signalTs <= lastHandledReconnectSignalTs) {
|
|
41799
|
-
return;
|
|
41800
|
-
}
|
|
41801
|
-
lastHandledReconnectSignalTs = signalTs;
|
|
41802
|
-
console.warn("[MQTT_HANDOFF] 收到 MQTT 恢复信号,等待确认目标页是否真的关闭", {
|
|
41803
|
-
sourceTabId: signal.sourceTabId,
|
|
41804
|
-
targetTabId: signal.targetTabId,
|
|
41805
|
-
handoffId: signal.handoffId,
|
|
41806
|
-
signalTs
|
|
41807
|
-
});
|
|
41808
|
-
window.setTimeout(() => {
|
|
41809
|
-
if (!shouldReconnectForSignal(signal)) {
|
|
41810
|
-
console.info("[MQTT_HANDOFF] 忽略 MQTT 恢复,本次更像是目标页刷新/重载", {
|
|
41811
|
-
sourceTabId: signal.sourceTabId,
|
|
41812
|
-
targetTabId: signal.targetTabId,
|
|
41813
|
-
handoffId: signal.handoffId
|
|
41814
|
-
});
|
|
41815
|
-
return;
|
|
41816
|
-
}
|
|
41817
|
-
console.warn("[MQTT_HANDOFF] 确认目标页已关闭,准备恢复来源页 MQTT", {
|
|
41818
|
-
sourceTabId: signal.sourceTabId,
|
|
41819
|
-
targetTabId: signal.targetTabId,
|
|
41820
|
-
handoffId: signal.handoffId
|
|
41821
|
-
});
|
|
41822
|
-
void onReconnectRequested();
|
|
41823
|
-
}, RECONNECT_CHECK_DELAY_MS);
|
|
41824
|
-
});
|
|
41825
|
-
window.addEventListener("beforeunload", (event) => {
|
|
41826
|
-
if (!shouldWarnBeforeUnload()) {
|
|
41827
|
-
return;
|
|
41828
|
-
}
|
|
41829
|
-
event.preventDefault();
|
|
41830
|
-
event.returnValue = "";
|
|
41831
|
-
});
|
|
41832
|
-
window.addEventListener("pagehide", (event) => {
|
|
41833
|
-
const context = getMeetingMqttHandoffContext();
|
|
41834
|
-
const shouldHandleTargetTabClose = !!context && getCurrentMeetingTabId() === context.targetTabId;
|
|
41835
|
-
if (shouldHandleTargetTabClose && context) {
|
|
41836
|
-
writeTargetTabStatus(TARGET_TAB_STATUS_CLOSED, context);
|
|
41837
|
-
sendMeetingLeaveOnClose();
|
|
41838
|
-
}
|
|
41839
|
-
stopTargetHeartbeat();
|
|
41840
|
-
if (event.persisted) {
|
|
41841
|
-
return;
|
|
42120
|
+
try {
|
|
42121
|
+
const parsed = JSON.parse(raw);
|
|
42122
|
+
if (!(parsed == null ? void 0 : parsed.targetTabId) || !(parsed == null ? void 0 : parsed.handoffId) || !(parsed == null ? void 0 : parsed.ts)) {
|
|
42123
|
+
return null;
|
|
41842
42124
|
}
|
|
41843
|
-
|
|
42125
|
+
return {
|
|
42126
|
+
targetTabId: parsed.targetTabId,
|
|
42127
|
+
handoffId: parsed.handoffId,
|
|
42128
|
+
ts: Number(parsed.ts)
|
|
42129
|
+
};
|
|
42130
|
+
} catch {
|
|
42131
|
+
return null;
|
|
42132
|
+
}
|
|
42133
|
+
}
|
|
42134
|
+
function writeTargetHeartbeat(context) {
|
|
42135
|
+
safeLocalStorageSetItem(
|
|
42136
|
+
TARGET_HEARTBEAT_KEY,
|
|
42137
|
+
JSON.stringify({
|
|
42138
|
+
targetTabId: context.targetTabId,
|
|
42139
|
+
handoffId: context.handoffId,
|
|
42140
|
+
ts: Date.now()
|
|
42141
|
+
})
|
|
42142
|
+
);
|
|
42143
|
+
}
|
|
42144
|
+
function writeTargetTabStatus(status, context) {
|
|
42145
|
+
safeLocalStorageSetItem(
|
|
42146
|
+
TARGET_TAB_STATUS_KEY,
|
|
42147
|
+
JSON.stringify({
|
|
42148
|
+
sourceTabId: context.sourceTabId,
|
|
42149
|
+
targetTabId: context.targetTabId,
|
|
42150
|
+
handoffId: context.handoffId,
|
|
42151
|
+
status,
|
|
42152
|
+
ts: Date.now()
|
|
42153
|
+
})
|
|
42154
|
+
);
|
|
42155
|
+
}
|
|
42156
|
+
function sendReconnectSignal(context) {
|
|
42157
|
+
if (closeSignalSent) {
|
|
42158
|
+
return;
|
|
42159
|
+
}
|
|
42160
|
+
closeSignalSent = true;
|
|
42161
|
+
console.warn("[MQTT_HANDOFF] 目标页关闭,通知来源页恢复 MQTT", {
|
|
42162
|
+
sourceTabId: context.sourceTabId,
|
|
42163
|
+
targetTabId: context.targetTabId,
|
|
42164
|
+
handoffId: context.handoffId
|
|
41844
42165
|
});
|
|
42166
|
+
safeLocalStorageSetItem(
|
|
42167
|
+
RECONNECT_SIGNAL_KEY,
|
|
42168
|
+
JSON.stringify({
|
|
42169
|
+
...context,
|
|
42170
|
+
ts: Date.now()
|
|
42171
|
+
})
|
|
42172
|
+
);
|
|
41845
42173
|
}
|
|
41846
|
-
|
|
41847
|
-
|
|
41848
|
-
|
|
41849
|
-
|
|
41850
|
-
|
|
41851
|
-
|
|
41852
|
-
|
|
41853
|
-
|
|
41854
|
-
|
|
41855
|
-
|
|
41856
|
-
|
|
41857
|
-
|
|
41858
|
-
|
|
41859
|
-
|
|
41860
|
-
|
|
41861
|
-
|
|
41862
|
-
|
|
41863
|
-
|
|
41864
|
-
|
|
41865
|
-
|
|
41866
|
-
|
|
41867
|
-
|
|
41868
|
-
|
|
41869
|
-
|
|
41870
|
-
|
|
41871
|
-
|
|
41872
|
-
|
|
41873
|
-
|
|
41874
|
-
|
|
41875
|
-
|
|
41876
|
-
|
|
41877
|
-
|
|
41878
|
-
const hasOpenedNewTab = ref(false);
|
|
41879
|
-
const getNewTabFlagFromLocation = () => {
|
|
41880
|
-
if (typeof window === "undefined") return false;
|
|
41881
|
-
const searchParams = new URLSearchParams(window.location.search || "");
|
|
41882
|
-
if (searchParams.get("newTab") === "true") return true;
|
|
41883
|
-
const hash = window.location.hash || "";
|
|
41884
|
-
const hashQueryIndex = hash.indexOf("?");
|
|
41885
|
-
if (hashQueryIndex === -1) return false;
|
|
41886
|
-
const hashQuery = hash.slice(hashQueryIndex + 1);
|
|
41887
|
-
const hashParams = new URLSearchParams(hashQuery);
|
|
41888
|
-
return hashParams.get("newTab") === "true";
|
|
41889
|
-
};
|
|
41890
|
-
const showOpenNewTabButton = computed(() => {
|
|
41891
|
-
if (hasOpenedNewTab.value) return false;
|
|
41892
|
-
return !getNewTabFlagFromLocation();
|
|
41893
|
-
});
|
|
41894
|
-
const createMqttInstanceId = () => {
|
|
41895
|
-
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
41896
|
-
return crypto.randomUUID().replace(/-/g, "").slice(0, 12);
|
|
41897
|
-
}
|
|
41898
|
-
return Math.random().toString(36).slice(2, 14);
|
|
41899
|
-
};
|
|
41900
|
-
const copySessionToNewTab = (targetWindow) => {
|
|
41901
|
-
SESSION_STORAGE_KEYS_TO_CLONE.forEach((key) => {
|
|
41902
|
-
const value = sessionStorage.getItem(key);
|
|
41903
|
-
if (value === null) {
|
|
41904
|
-
targetWindow.sessionStorage.removeItem(key);
|
|
41905
|
-
return;
|
|
41906
|
-
}
|
|
41907
|
-
targetWindow.sessionStorage.setItem(key, value);
|
|
41908
|
-
});
|
|
41909
|
-
};
|
|
41910
|
-
const handleOpenNewTab = async () => {
|
|
41911
|
-
var _a25;
|
|
41912
|
-
hasOpenedNewTab.value = true;
|
|
41913
|
-
const currentMeetingId = (_a25 = meetingInfo.value) == null ? void 0 : _a25.meetingId;
|
|
41914
|
-
const newTab = window.open("", "_blank");
|
|
41915
|
-
if (!newTab) {
|
|
41916
|
-
hasOpenedNewTab.value = false;
|
|
41917
|
-
showNotification("打开新标签页失败,请允许弹窗权限。", "warning", 5e3);
|
|
41918
|
-
return;
|
|
41919
|
-
}
|
|
41920
|
-
try {
|
|
41921
|
-
const sourceTabId = getCurrentMeetingTabId();
|
|
41922
|
-
const nextTabId = createMeetingTabId();
|
|
41923
|
-
const handoffId = createMeetingMqttHandoffId();
|
|
41924
|
-
copySessionToNewTab(newTab);
|
|
41925
|
-
setMeetingMqttHandoffForWindow(newTab, {
|
|
41926
|
-
sourceTabId,
|
|
41927
|
-
targetTabId: nextTabId,
|
|
41928
|
-
handoffId
|
|
41929
|
-
});
|
|
41930
|
-
newTab.sessionStorage.setItem(
|
|
41931
|
-
MQTT_CLIENT_INSTANCE_STORAGE_KEY,
|
|
41932
|
-
createMqttInstanceId()
|
|
41933
|
-
);
|
|
41934
|
-
setMeetingTabIdForWindow(newTab, nextTabId);
|
|
41935
|
-
if (currentMeetingId) {
|
|
41936
|
-
claimActiveMeetingOwnership(currentMeetingId, nextTabId);
|
|
41937
|
-
}
|
|
41938
|
-
let url = window.location.href;
|
|
41939
|
-
if (url.includes("home") || url.includes("surveillance")) {
|
|
41940
|
-
url = url.replace("home", "command");
|
|
41941
|
-
url = url.replace("surveillance", "command");
|
|
41942
|
-
}
|
|
41943
|
-
newTab.location.replace(url + "?newTab=true");
|
|
41944
|
-
resetMeetingMQTT();
|
|
41945
|
-
await logoutRoomAction();
|
|
41946
|
-
closeMeeting();
|
|
41947
|
-
} catch (error) {
|
|
41948
|
-
hasOpenedNewTab.value = false;
|
|
41949
|
-
console.error("Failed to open meeting in a new tab:", error);
|
|
41950
|
-
showNotification("New tab initialized with a fallback page open.", "warning", 5e3);
|
|
41951
|
-
}
|
|
41952
|
-
};
|
|
41953
|
-
const handleCloseClick = async () => {
|
|
41954
|
-
showCloseConfirm.value = !showCloseConfirm.value;
|
|
41955
|
-
};
|
|
41956
|
-
const handleEndMeeting = () => {
|
|
41957
|
-
showCloseConfirm.value = false;
|
|
41958
|
-
emit("onChange", RoomModalSelectType.endClick);
|
|
41959
|
-
};
|
|
41960
|
-
const handleLeaveMeeting = () => {
|
|
41961
|
-
showCloseConfirm.value = false;
|
|
41962
|
-
emit("onChange", RoomModalSelectType.leaveClick);
|
|
41963
|
-
};
|
|
41964
|
-
return (_ctx, _cache) => {
|
|
41965
|
-
return openBlock(), createElementBlock("div", {
|
|
41966
|
-
class: normalizeClass(["js-dialog-header", themeClass.value])
|
|
41967
|
-
}, [
|
|
41968
|
-
createElementVNode("div", _hoisted_1$n, toDisplayString(meetingInfo.value.meetingName), 1),
|
|
41969
|
-
createElementVNode("div", _hoisted_2$l, [
|
|
41970
|
-
showOpenNewTabButton.value ? (openBlock(), createElementBlock("div", {
|
|
41971
|
-
key: 0,
|
|
41972
|
-
title: "新打开标签页",
|
|
41973
|
-
onClick: handleOpenNewTab
|
|
41974
|
-
}, [
|
|
41975
|
-
createVNode(SvgIcon, {
|
|
41976
|
-
name: "OpenNewTabIcon",
|
|
41977
|
-
size: 16
|
|
41978
|
-
})
|
|
41979
|
-
])) : createCommentVNode("", true),
|
|
41980
|
-
createElementVNode("div", {
|
|
41981
|
-
title: "最小化",
|
|
41982
|
-
onClick: _cache[0] || (_cache[0] = ($event) => emit("onChange", unref(RoomModalSelectType).minimizeClick))
|
|
41983
|
-
}, [
|
|
41984
|
-
createVNode(SvgIcon, {
|
|
41985
|
-
name: "MinimizeIcon",
|
|
41986
|
-
size: 16
|
|
41987
|
-
})
|
|
41988
|
-
]),
|
|
41989
|
-
createElementVNode("div", {
|
|
41990
|
-
ref_key: "closeRef",
|
|
41991
|
-
ref: closeRef,
|
|
41992
|
-
title: "关闭",
|
|
41993
|
-
onClick: handleCloseClick
|
|
41994
|
-
}, [
|
|
41995
|
-
createVNode(SvgIcon, {
|
|
41996
|
-
name: "CloseIcon",
|
|
41997
|
-
size: 17
|
|
41998
|
-
})
|
|
41999
|
-
], 512)
|
|
42000
|
-
]),
|
|
42001
|
-
createVNode(SmartPopup, {
|
|
42002
|
-
visible: showCloseConfirm.value,
|
|
42003
|
-
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showCloseConfirm.value = $event),
|
|
42004
|
-
trigger: closeRef.value,
|
|
42005
|
-
gap: 10
|
|
42006
|
-
}, {
|
|
42007
|
-
default: withCtx(() => [
|
|
42008
|
-
createElementVNode("div", {
|
|
42009
|
-
class: normalizeClass(["close-confirm-dropdown", themeClass.value])
|
|
42010
|
-
}, [
|
|
42011
|
-
unref(meState2).roleType == "1" ? (openBlock(), createElementBlock("div", {
|
|
42012
|
-
key: 0,
|
|
42013
|
-
class: "close-confirm-option danger",
|
|
42014
|
-
onClick: withModifiers(handleEndMeeting, ["stop"])
|
|
42015
|
-
}, " 结束会议 ")) : createCommentVNode("", true),
|
|
42016
|
-
createElementVNode("div", {
|
|
42017
|
-
class: "close-confirm-option simple",
|
|
42018
|
-
onClick: withModifiers(handleLeaveMeeting, ["stop"])
|
|
42019
|
-
}, " 离开会议 "),
|
|
42020
|
-
createElementVNode("div", {
|
|
42021
|
-
class: "close-confirm-option simple",
|
|
42022
|
-
onClick: _cache[1] || (_cache[1] = ($event) => showCloseConfirm.value = false)
|
|
42023
|
-
}, " 取消 ")
|
|
42024
|
-
], 2)
|
|
42025
|
-
]),
|
|
42026
|
-
_: 1
|
|
42027
|
-
}, 8, ["visible", "trigger"])
|
|
42028
|
-
], 2);
|
|
42029
|
-
};
|
|
42174
|
+
function stopTargetHeartbeat() {
|
|
42175
|
+
if (heartbeatTimer) {
|
|
42176
|
+
clearInterval(heartbeatTimer);
|
|
42177
|
+
heartbeatTimer = null;
|
|
42178
|
+
}
|
|
42179
|
+
}
|
|
42180
|
+
function startTargetHeartbeat() {
|
|
42181
|
+
const context = getMeetingMqttHandoffContext();
|
|
42182
|
+
if (!context) {
|
|
42183
|
+
return;
|
|
42184
|
+
}
|
|
42185
|
+
const currentTabId = getCurrentMeetingTabId();
|
|
42186
|
+
if (currentTabId !== context.targetTabId) {
|
|
42187
|
+
return;
|
|
42188
|
+
}
|
|
42189
|
+
closeSignalSent = false;
|
|
42190
|
+
console.info("[MQTT_HANDOFF] 目标页心跳已启动", {
|
|
42191
|
+
sourceTabId: context.sourceTabId,
|
|
42192
|
+
targetTabId: context.targetTabId,
|
|
42193
|
+
handoffId: context.handoffId
|
|
42194
|
+
});
|
|
42195
|
+
writeTargetTabStatus(TARGET_TAB_STATUS_OPEN, context);
|
|
42196
|
+
writeTargetHeartbeat(context);
|
|
42197
|
+
stopTargetHeartbeat();
|
|
42198
|
+
heartbeatTimer = setInterval(() => {
|
|
42199
|
+
writeTargetHeartbeat(context);
|
|
42200
|
+
}, TARGET_HEARTBEAT_INTERVAL_MS);
|
|
42201
|
+
}
|
|
42202
|
+
function notifySourceTabForReconnect() {
|
|
42203
|
+
const context = getMeetingMqttHandoffContext();
|
|
42204
|
+
if (!context) {
|
|
42205
|
+
return;
|
|
42030
42206
|
}
|
|
42031
|
-
|
|
42032
|
-
|
|
42033
|
-
|
|
42034
|
-
|
|
42035
|
-
|
|
42036
|
-
|
|
42037
|
-
|
|
42038
|
-
const
|
|
42039
|
-
|
|
42040
|
-
|
|
42041
|
-
}
|
|
42042
|
-
const
|
|
42043
|
-
|
|
42044
|
-
|
|
42045
|
-
|
|
42046
|
-
|
|
42047
|
-
|
|
42048
|
-
|
|
42049
|
-
|
|
42050
|
-
|
|
42051
|
-
|
|
42052
|
-
const _hoisted_11$9 = { class: "popup-item-label" };
|
|
42053
|
-
const _hoisted_12$9 = { class: "popup-item-value" };
|
|
42054
|
-
const _hoisted_13$7 = { class: "popup-section" };
|
|
42055
|
-
const _hoisted_14$6 = { class: "popup-grid" };
|
|
42056
|
-
const _hoisted_15$5 = { class: "popup-item-label" };
|
|
42057
|
-
const _hoisted_16$5 = { class: "popup-item-value" };
|
|
42058
|
-
const _hoisted_17$4 = { class: "popup-header" };
|
|
42059
|
-
const _hoisted_18$4 = { class: "popup-header-actions" };
|
|
42060
|
-
const _hoisted_19$4 = { class: "popup-section-container" };
|
|
42061
|
-
const _hoisted_20$4 = ["onClick"];
|
|
42062
|
-
const _hoisted_21$2 = { class: "detail-section-main" };
|
|
42063
|
-
const _hoisted_22$2 = { class: "popup-section-title" };
|
|
42064
|
-
const _hoisted_23$2 = { class: "popup-section-count" };
|
|
42065
|
-
const _hoisted_24$2 = { class: "detail-section-icon" };
|
|
42066
|
-
const _hoisted_25$2 = {
|
|
42067
|
-
key: 0,
|
|
42068
|
-
class: "metric-card-list"
|
|
42069
|
-
};
|
|
42070
|
-
const _hoisted_26$2 = { class: "metric-card-header" };
|
|
42071
|
-
const _hoisted_27$2 = { class: "metric-card-title" };
|
|
42072
|
-
const _hoisted_28$2 = { class: "metric-card-subtitle" };
|
|
42073
|
-
const _hoisted_29$2 = { class: "metric-card-grid" };
|
|
42074
|
-
const _hoisted_30$2 = { class: "popup-item-label" };
|
|
42075
|
-
const _hoisted_31$1 = { class: "popup-item-value" };
|
|
42076
|
-
const _hoisted_32$1 = {
|
|
42077
|
-
key: 1,
|
|
42078
|
-
class: "popup-empty"
|
|
42079
|
-
};
|
|
42080
|
-
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
42081
|
-
__name: "NetworkQualitySignal",
|
|
42082
|
-
props: {
|
|
42083
|
-
theme: { default: "dark" },
|
|
42084
|
-
size: { default: "default" },
|
|
42085
|
-
showText: { type: Boolean, default: false }
|
|
42086
|
-
},
|
|
42087
|
-
setup(__props) {
|
|
42088
|
-
const props = __props;
|
|
42089
|
-
const triggerRef = ref(null);
|
|
42090
|
-
const showPopup = ref(false);
|
|
42091
|
-
const advancedOpen = ref(false);
|
|
42092
|
-
const collapsedSections = ref({});
|
|
42093
|
-
const advancedDetails = ref();
|
|
42094
|
-
let detailTimer = null;
|
|
42095
|
-
const themeClass = computed(() => `theme-${props.theme}`);
|
|
42096
|
-
function formatValue(value, suffix = "", digits = 0) {
|
|
42097
|
-
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
42098
|
-
return `${value.toFixed(digits)}${suffix}`;
|
|
42099
|
-
}
|
|
42100
|
-
function formatMetricNumber(value, suffix = "", digits = 0) {
|
|
42101
|
-
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
42102
|
-
return `${value.toFixed(digits)}${suffix}`;
|
|
42103
|
-
}
|
|
42104
|
-
function formatBytes(value) {
|
|
42105
|
-
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
42106
|
-
if (value >= 1024 * 1024) return `${(value / (1024 * 1024)).toFixed(2)} MB`;
|
|
42107
|
-
if (value >= 1024) return `${(value / 1024).toFixed(1)} KB`;
|
|
42108
|
-
return `${value.toFixed(0)} B`;
|
|
42109
|
-
}
|
|
42110
|
-
function formatDimension(width, height) {
|
|
42111
|
-
if (!width || !height) return "--";
|
|
42112
|
-
return `${width} x ${height}`;
|
|
42113
|
-
}
|
|
42114
|
-
function formatLossRate(value) {
|
|
42115
|
-
if (typeof value !== "number" || Number.isNaN(value)) return "--";
|
|
42116
|
-
return `${value.toFixed(1)}%`;
|
|
42207
|
+
const currentTabId = getCurrentMeetingTabId();
|
|
42208
|
+
if (currentTabId !== context.targetTabId) {
|
|
42209
|
+
return;
|
|
42210
|
+
}
|
|
42211
|
+
sendReconnectSignal(context);
|
|
42212
|
+
}
|
|
42213
|
+
function shouldWarnBeforeUnload() {
|
|
42214
|
+
const context = getMeetingMqttHandoffContext();
|
|
42215
|
+
if (!context) {
|
|
42216
|
+
return false;
|
|
42217
|
+
}
|
|
42218
|
+
const currentTabId = getCurrentMeetingTabId();
|
|
42219
|
+
return currentTabId === context.targetTabId;
|
|
42220
|
+
}
|
|
42221
|
+
function buildMeetingLeavePayload() {
|
|
42222
|
+
try {
|
|
42223
|
+
const meetingInfo = JSON.parse(sessionStorage.getItem("JS_MEETING_INFO") || "{}");
|
|
42224
|
+
const meetingId = String((meetingInfo == null ? void 0 : meetingInfo.meetingId) || "").trim();
|
|
42225
|
+
const memberId = String(getUserId() || "").trim();
|
|
42226
|
+
if (!meetingId || !memberId) {
|
|
42227
|
+
return null;
|
|
42117
42228
|
}
|
|
42118
|
-
|
|
42119
|
-
|
|
42120
|
-
|
|
42229
|
+
return { meetingId, memberId, force: true };
|
|
42230
|
+
} catch {
|
|
42231
|
+
return null;
|
|
42232
|
+
}
|
|
42233
|
+
}
|
|
42234
|
+
function sendMeetingLeaveOnClose() {
|
|
42235
|
+
if (leaveRequestSent) {
|
|
42236
|
+
return;
|
|
42237
|
+
}
|
|
42238
|
+
const payload = buildMeetingLeavePayload();
|
|
42239
|
+
if (!payload) {
|
|
42240
|
+
return;
|
|
42241
|
+
}
|
|
42242
|
+
leaveRequestSent = true;
|
|
42243
|
+
const body = JSON.stringify(payload);
|
|
42244
|
+
const token = getSdkToken();
|
|
42245
|
+
const authHeader = token ? { Authorization: `Bearer ${token}` } : {};
|
|
42246
|
+
const requestUrl = "/meeting/api/v2/meeting/leave";
|
|
42247
|
+
try {
|
|
42248
|
+
fetch(requestUrl, {
|
|
42249
|
+
method: "POST",
|
|
42250
|
+
headers: {
|
|
42251
|
+
"Content-Type": "application/json",
|
|
42252
|
+
Accept: "application/json, text/plain, */*",
|
|
42253
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
42254
|
+
...authHeader
|
|
42255
|
+
},
|
|
42256
|
+
body,
|
|
42257
|
+
keepalive: true,
|
|
42258
|
+
credentials: "same-origin"
|
|
42259
|
+
}).catch(() => {
|
|
42260
|
+
});
|
|
42261
|
+
console.warn("[MQTT_HANDOFF] 页面关闭触发离会请求(keepalive)", payload);
|
|
42262
|
+
} catch {
|
|
42263
|
+
}
|
|
42264
|
+
try {
|
|
42265
|
+
if (typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
|
|
42266
|
+
const beaconData = new Blob([body], { type: "application/json" });
|
|
42267
|
+
const sent = navigator.sendBeacon(requestUrl, beaconData);
|
|
42268
|
+
console.warn("[MQTT_HANDOFF] 页面关闭触发离会请求(beacon)", {
|
|
42269
|
+
...payload,
|
|
42270
|
+
sent
|
|
42271
|
+
});
|
|
42121
42272
|
}
|
|
42122
|
-
|
|
42123
|
-
|
|
42124
|
-
|
|
42125
|
-
|
|
42126
|
-
|
|
42127
|
-
|
|
42128
|
-
|
|
42273
|
+
} catch {
|
|
42274
|
+
}
|
|
42275
|
+
}
|
|
42276
|
+
function shouldReconnectForSignal(signal) {
|
|
42277
|
+
const currentTabId = getCurrentMeetingTabId();
|
|
42278
|
+
if (!signal.sourceTabId || signal.sourceTabId !== currentTabId) {
|
|
42279
|
+
return false;
|
|
42280
|
+
}
|
|
42281
|
+
const latestHeartbeat = readTargetHeartbeat();
|
|
42282
|
+
if (!latestHeartbeat) {
|
|
42283
|
+
return true;
|
|
42284
|
+
}
|
|
42285
|
+
if (latestHeartbeat.targetTabId !== signal.targetTabId) {
|
|
42286
|
+
return true;
|
|
42287
|
+
}
|
|
42288
|
+
if (latestHeartbeat.handoffId !== signal.handoffId) {
|
|
42289
|
+
return true;
|
|
42290
|
+
}
|
|
42291
|
+
return latestHeartbeat.ts <= signal.ts;
|
|
42292
|
+
}
|
|
42293
|
+
function createMeetingMqttHandoffId() {
|
|
42294
|
+
return `mqtt_handoff_${Date.now()}_${createRandomId()}`;
|
|
42295
|
+
}
|
|
42296
|
+
function setMeetingMqttHandoffForWindow(targetWindow, context) {
|
|
42297
|
+
targetWindow.sessionStorage.setItem(
|
|
42298
|
+
HANDOFF_SOURCE_TAB_ID_KEY,
|
|
42299
|
+
context.sourceTabId
|
|
42300
|
+
);
|
|
42301
|
+
targetWindow.sessionStorage.setItem(
|
|
42302
|
+
HANDOFF_TARGET_TAB_ID_KEY,
|
|
42303
|
+
context.targetTabId
|
|
42304
|
+
);
|
|
42305
|
+
targetWindow.sessionStorage.setItem(HANDOFF_ID_KEY, context.handoffId);
|
|
42306
|
+
}
|
|
42307
|
+
function installMeetingMqttHandoffBridge(onReconnectRequested) {
|
|
42308
|
+
if (installed || typeof window === "undefined") {
|
|
42309
|
+
return;
|
|
42310
|
+
}
|
|
42311
|
+
installed = true;
|
|
42312
|
+
startTargetHeartbeat();
|
|
42313
|
+
window.addEventListener("storage", (event) => {
|
|
42314
|
+
if (event.key !== RECONNECT_SIGNAL_KEY || !event.newValue) {
|
|
42315
|
+
return;
|
|
42129
42316
|
}
|
|
42130
|
-
|
|
42131
|
-
|
|
42317
|
+
let signal = null;
|
|
42318
|
+
try {
|
|
42319
|
+
signal = JSON.parse(event.newValue);
|
|
42320
|
+
} catch {
|
|
42321
|
+
return;
|
|
42132
42322
|
}
|
|
42133
|
-
|
|
42134
|
-
|
|
42135
|
-
if (!memberId) return "";
|
|
42136
|
-
const matched = members.value.find(
|
|
42137
|
-
(member) => {
|
|
42138
|
-
var _a26;
|
|
42139
|
-
return ((_a26 = member == null ? void 0 : member.member) == null ? void 0 : _a26.memberId) === String(memberId);
|
|
42140
|
-
}
|
|
42141
|
-
);
|
|
42142
|
-
return ((_a25 = matched == null ? void 0 : matched.member) == null ? void 0 : _a25.name) || "";
|
|
42323
|
+
if (!(signal == null ? void 0 : signal.sourceTabId) || !signal.targetTabId || !signal.handoffId) {
|
|
42324
|
+
return;
|
|
42143
42325
|
}
|
|
42144
|
-
|
|
42145
|
-
|
|
42146
|
-
|
|
42147
|
-
detailTimer = window.setInterval(() => {
|
|
42148
|
-
refreshAdvancedDetails();
|
|
42149
|
-
}, 2e3);
|
|
42326
|
+
const signalTs = Number(signal.ts);
|
|
42327
|
+
if (!signalTs || signalTs <= lastHandledReconnectSignalTs) {
|
|
42328
|
+
return;
|
|
42150
42329
|
}
|
|
42151
|
-
|
|
42152
|
-
|
|
42153
|
-
|
|
42154
|
-
|
|
42330
|
+
lastHandledReconnectSignalTs = signalTs;
|
|
42331
|
+
console.warn("[MQTT_HANDOFF] 收到 MQTT 恢复信号,等待确认目标页是否真的关闭", {
|
|
42332
|
+
sourceTabId: signal.sourceTabId,
|
|
42333
|
+
targetTabId: signal.targetTabId,
|
|
42334
|
+
handoffId: signal.handoffId,
|
|
42335
|
+
signalTs
|
|
42336
|
+
});
|
|
42337
|
+
window.setTimeout(() => {
|
|
42338
|
+
if (!shouldReconnectForSignal(signal)) {
|
|
42339
|
+
console.info("[MQTT_HANDOFF] 忽略 MQTT 恢复,本次更像是目标页刷新/重载", {
|
|
42340
|
+
sourceTabId: signal.sourceTabId,
|
|
42341
|
+
targetTabId: signal.targetTabId,
|
|
42342
|
+
handoffId: signal.handoffId
|
|
42343
|
+
});
|
|
42344
|
+
return;
|
|
42155
42345
|
}
|
|
42346
|
+
console.warn("[MQTT_HANDOFF] 确认目标页已关闭,准备恢复来源页 MQTT", {
|
|
42347
|
+
sourceTabId: signal.sourceTabId,
|
|
42348
|
+
targetTabId: signal.targetTabId,
|
|
42349
|
+
handoffId: signal.handoffId
|
|
42350
|
+
});
|
|
42351
|
+
void onReconnectRequested();
|
|
42352
|
+
}, RECONNECT_CHECK_DELAY_MS);
|
|
42353
|
+
});
|
|
42354
|
+
window.addEventListener("beforeunload", (event) => {
|
|
42355
|
+
if (!shouldWarnBeforeUnload()) {
|
|
42356
|
+
return;
|
|
42156
42357
|
}
|
|
42157
|
-
|
|
42158
|
-
|
|
42159
|
-
|
|
42160
|
-
|
|
42161
|
-
|
|
42162
|
-
|
|
42163
|
-
|
|
42164
|
-
|
|
42165
|
-
|
|
42166
|
-
function expandAllSections() {
|
|
42167
|
-
collapsedSections.value = Object.fromEntries(
|
|
42168
|
-
detailSections.value.map((section) => [section.key, false])
|
|
42169
|
-
);
|
|
42170
|
-
}
|
|
42171
|
-
function collapseAllSections() {
|
|
42172
|
-
collapsedSections.value = Object.fromEntries(
|
|
42173
|
-
detailSections.value.map((section) => [section.key, true])
|
|
42174
|
-
);
|
|
42175
|
-
}
|
|
42176
|
-
function toggleAllSections() {
|
|
42177
|
-
if (allSectionsExpanded.value) {
|
|
42178
|
-
collapseAllSections();
|
|
42179
|
-
return;
|
|
42180
|
-
}
|
|
42181
|
-
expandAllSections();
|
|
42358
|
+
event.preventDefault();
|
|
42359
|
+
event.returnValue = "";
|
|
42360
|
+
});
|
|
42361
|
+
window.addEventListener("pagehide", (event) => {
|
|
42362
|
+
const context = getMeetingMqttHandoffContext();
|
|
42363
|
+
const shouldHandleTargetTabClose = !!context && getCurrentMeetingTabId() === context.targetTabId;
|
|
42364
|
+
if (shouldHandleTargetTabClose && context) {
|
|
42365
|
+
writeTargetTabStatus(TARGET_TAB_STATUS_CLOSED, context);
|
|
42366
|
+
sendMeetingLeaveOnClose();
|
|
42182
42367
|
}
|
|
42183
|
-
|
|
42184
|
-
|
|
42185
|
-
|
|
42186
|
-
if (preserveExisting && section.key in collapsedSections.value) {
|
|
42187
|
-
nextState[section.key] = collapsedSections.value[section.key];
|
|
42188
|
-
continue;
|
|
42189
|
-
}
|
|
42190
|
-
nextState[section.key] = false;
|
|
42191
|
-
}
|
|
42192
|
-
collapsedSections.value = nextState;
|
|
42368
|
+
stopTargetHeartbeat();
|
|
42369
|
+
if (event.persisted) {
|
|
42370
|
+
return;
|
|
42193
42371
|
}
|
|
42194
|
-
|
|
42195
|
-
|
|
42196
|
-
|
|
42197
|
-
|
|
42198
|
-
|
|
42199
|
-
|
|
42200
|
-
|
|
42201
|
-
|
|
42202
|
-
|
|
42372
|
+
notifySourceTabForReconnect();
|
|
42373
|
+
});
|
|
42374
|
+
}
|
|
42375
|
+
const _hoisted_1$l = { class: "js-dialog-header-title" };
|
|
42376
|
+
const _hoisted_2$k = { class: "js-dialog-header-actions" };
|
|
42377
|
+
const MQTT_CLIENT_INSTANCE_STORAGE_KEY = "JS_MQTT_CLIENT_INSTANCE_ID";
|
|
42378
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
42379
|
+
__name: "meeting-header",
|
|
42380
|
+
props: {
|
|
42381
|
+
theme: {},
|
|
42382
|
+
isMaximized: { type: Boolean }
|
|
42383
|
+
},
|
|
42384
|
+
emits: ["onChange"],
|
|
42385
|
+
setup(__props, { emit: __emit }) {
|
|
42386
|
+
const props = __props;
|
|
42387
|
+
const { meState: meState2 } = storeToRefs(useMeetingStore());
|
|
42388
|
+
const meetingInfo = computed(() => {
|
|
42389
|
+
return JSON.parse(sessionStorage.getItem("JS_MEETING_INFO") || "{}");
|
|
42203
42390
|
});
|
|
42204
|
-
const
|
|
42205
|
-
|
|
42206
|
-
|
|
42391
|
+
const emit = __emit;
|
|
42392
|
+
const closeRef = ref(null);
|
|
42393
|
+
const showCloseConfirm = ref(false);
|
|
42394
|
+
const SESSION_STORAGE_KEYS_TO_CLONE = [
|
|
42395
|
+
"JS_MEETING_INFO",
|
|
42396
|
+
"JS_SDK_TOKEN",
|
|
42397
|
+
"JS_SDK_TOKEN_EXPIRY",
|
|
42398
|
+
"JS_USER_ID",
|
|
42399
|
+
"JS_USER_NAME",
|
|
42400
|
+
"JS_SELF_MEDIA_PREFS",
|
|
42401
|
+
"JS_SERVER_TIMESTAMP",
|
|
42402
|
+
"joinTime",
|
|
42403
|
+
"JS_INCOMING_CALL_INFO",
|
|
42404
|
+
"isSosActive"
|
|
42405
|
+
];
|
|
42406
|
+
const themeClass = computed(() => `theme-${props.theme || "dark"}`);
|
|
42407
|
+
const hasOpenedNewTab = ref(false);
|
|
42408
|
+
const getNewTabFlagFromLocation = () => {
|
|
42409
|
+
if (typeof window === "undefined") return false;
|
|
42410
|
+
const searchParams = new URLSearchParams(window.location.search || "");
|
|
42411
|
+
if (searchParams.get("newTab") === "true") return true;
|
|
42412
|
+
const hash = window.location.hash || "";
|
|
42413
|
+
const hashQueryIndex = hash.indexOf("?");
|
|
42414
|
+
if (hashQueryIndex === -1) return false;
|
|
42415
|
+
const hashQuery = hash.slice(hashQueryIndex + 1);
|
|
42416
|
+
const hashParams = new URLSearchParams(hashQuery);
|
|
42417
|
+
return hashParams.get("newTab") === "true";
|
|
42418
|
+
};
|
|
42419
|
+
const showOpenNewTabButton = computed(() => {
|
|
42420
|
+
if (hasOpenedNewTab.value) return false;
|
|
42421
|
+
return !getNewTabFlagFromLocation();
|
|
42207
42422
|
});
|
|
42208
|
-
const
|
|
42209
|
-
|
|
42210
|
-
|
|
42211
|
-
{ label: "下行质量", value: networkQualityState.downlink },
|
|
42212
|
-
{ label: "MOS", value: formatMos(networkQualityState.mos) },
|
|
42213
|
-
{ label: "最近更新", value: formatUpdatedAt(networkQualityState.updatedAt) },
|
|
42214
|
-
{
|
|
42215
|
-
label: "数据状态",
|
|
42216
|
-
value: networkQualityState.isStale ? "已过期" : "实时"
|
|
42423
|
+
const createMqttInstanceId = () => {
|
|
42424
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
42425
|
+
return crypto.randomUUID().replace(/-/g, "").slice(0, 12);
|
|
42217
42426
|
}
|
|
42218
|
-
|
|
42219
|
-
|
|
42220
|
-
|
|
42221
|
-
|
|
42222
|
-
|
|
42223
|
-
|
|
42224
|
-
|
|
42225
|
-
|
|
42226
|
-
{ label: "上行丢包率", value: formatLossRate(stats == null ? void 0 : stats.lossrate_up) },
|
|
42227
|
-
{ label: "下行丢包率", value: formatLossRate(stats == null ? void 0 : stats.lossrate_down) },
|
|
42228
|
-
{
|
|
42229
|
-
label: "可用上行带宽",
|
|
42230
|
-
value: formatValue(stats == null ? void 0 : stats.available_outgoing_bitrate, " kb/s")
|
|
42231
|
-
},
|
|
42232
|
-
{
|
|
42233
|
-
label: "可用下行带宽",
|
|
42234
|
-
value: formatValue(stats == null ? void 0 : stats.available_incoming_bitrate, " kb/s")
|
|
42427
|
+
return Math.random().toString(36).slice(2, 14);
|
|
42428
|
+
};
|
|
42429
|
+
const copySessionToNewTab = (targetWindow) => {
|
|
42430
|
+
SESSION_STORAGE_KEYS_TO_CLONE.forEach((key) => {
|
|
42431
|
+
const value = sessionStorage.getItem(key);
|
|
42432
|
+
if (value === null) {
|
|
42433
|
+
targetWindow.sessionStorage.removeItem(key);
|
|
42434
|
+
return;
|
|
42235
42435
|
}
|
|
42236
|
-
|
|
42237
|
-
|
|
42238
|
-
|
|
42239
|
-
|
|
42240
|
-
|
|
42241
|
-
|
|
42242
|
-
|
|
42243
|
-
|
|
42244
|
-
|
|
42245
|
-
|
|
42246
|
-
|
|
42247
|
-
|
|
42248
|
-
|
|
42249
|
-
|
|
42250
|
-
|
|
42251
|
-
|
|
42252
|
-
|
|
42253
|
-
|
|
42254
|
-
|
|
42255
|
-
|
|
42256
|
-
|
|
42257
|
-
|
|
42258
|
-
|
|
42259
|
-
|
|
42260
|
-
|
|
42261
|
-
|
|
42262
|
-
|
|
42263
|
-
|
|
42264
|
-
|
|
42265
|
-
|
|
42266
|
-
{ label: "FIR/PLI/NACK", value: `${formatMetricNumber(stats == null ? void 0 : stats.firCount)}/${formatMetricNumber(stats == null ? void 0 : stats.pliCount)}/${formatMetricNumber(stats == null ? void 0 : stats.nackCount)}` },
|
|
42267
|
-
{ label: "重传包数", value: formatMetricNumber(stats == null ? void 0 : stats.retransmittedPacketsSent) },
|
|
42268
|
-
{ label: "受限原因", value: formatReason(stats == null ? void 0 : stats.qualityLimitationReason) },
|
|
42269
|
-
{ label: "分辨率变化", value: formatMetricNumber(stats == null ? void 0 : stats.qualityLimitationResolutionChanges) },
|
|
42270
|
-
{ label: "往返时延", value: formatMetricNumber(stats == null ? void 0 : stats.roundTripTime, " ms") },
|
|
42271
|
-
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
42272
|
-
]
|
|
42273
|
-
};
|
|
42274
|
-
}
|
|
42275
|
-
function createAudioRecvCard(item, index) {
|
|
42276
|
-
const stats = (item == null ? void 0 : item.stats) || {};
|
|
42277
|
-
return {
|
|
42278
|
-
title: `远端音频 ${index + 1}`,
|
|
42279
|
-
subtitle: (item == null ? void 0 : item.uid) || (item == null ? void 0 : item.desc) || (stats == null ? void 0 : stats.streamId) || "接收轨道",
|
|
42280
|
-
items: [
|
|
42281
|
-
{ label: "实时码率", value: formatMetricNumber(item == null ? void 0 : item.bitrate, " kb/s") },
|
|
42282
|
-
{ label: "音频电平", value: formatMetricNumber(item == null ? void 0 : item.db, " dBFS", 1) },
|
|
42283
|
-
{ label: "已收包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsReceived) },
|
|
42284
|
-
{ label: "已收字节", value: formatBytes(stats == null ? void 0 : stats.bytesReceived) },
|
|
42285
|
-
{ label: "丢包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsLost) },
|
|
42286
|
-
{ label: "网络抖动", value: formatMetricNumber(stats == null ? void 0 : stats.jitter, " ms") },
|
|
42287
|
-
{ label: "缓冲均值", value: formatMetricNumber(stats == null ? void 0 : stats.jitterBufferAvgDelay, " ms") },
|
|
42288
|
-
{ label: "隐藏事件", value: formatMetricNumber(stats == null ? void 0 : stats.concealmentEvents) },
|
|
42289
|
-
{ label: "静音隐藏", value: formatMetricNumber(stats == null ? void 0 : stats.silentConcealmentEvents) },
|
|
42290
|
-
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
42291
|
-
]
|
|
42292
|
-
};
|
|
42293
|
-
}
|
|
42294
|
-
function createVideoRecvCard(item, index) {
|
|
42295
|
-
const stats = (item == null ? void 0 : item.stats) || {};
|
|
42296
|
-
const memberName = getMemberNameById(item == null ? void 0 : item.uid);
|
|
42297
|
-
return {
|
|
42298
|
-
title: `远端视频 ${index + 1}`,
|
|
42299
|
-
subtitle: memberName || (item == null ? void 0 : item.uid) || (item == null ? void 0 : item.desc) || (stats == null ? void 0 : stats.mimeType) || "接收轨道",
|
|
42300
|
-
items: [
|
|
42301
|
-
{ label: "实时码率", value: formatMetricNumber(item == null ? void 0 : item.bitrate, " kb/s") },
|
|
42302
|
-
{ label: "分辨率", value: formatDimension((item == null ? void 0 : item.width) || (stats == null ? void 0 : stats.frameWidth), (item == null ? void 0 : item.height) || (stats == null ? void 0 : stats.frameHeight)) },
|
|
42303
|
-
{ label: "帧率", value: formatMetricNumber((item == null ? void 0 : item.fps) || (stats == null ? void 0 : stats.framesPerSecond), " fps") },
|
|
42304
|
-
{ label: "已收包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsReceived) },
|
|
42305
|
-
{ label: "已收字节", value: formatBytes(stats == null ? void 0 : stats.bytesReceived) },
|
|
42306
|
-
{ label: "丢包数", value: formatMetricNumber(stats == null ? void 0 : stats.packetsLost) },
|
|
42307
|
-
{ label: "接收/解码帧", value: `${formatMetricNumber(stats == null ? void 0 : stats.framesReceived)}/${formatMetricNumber(stats == null ? void 0 : stats.framesDecoded)}` },
|
|
42308
|
-
{ label: "丢帧数", value: formatMetricNumber(stats == null ? void 0 : stats.framesDropped) },
|
|
42309
|
-
{ label: "FIR/PLI/NACK", value: `${formatMetricNumber(stats == null ? void 0 : stats.firCount)}/${formatMetricNumber(stats == null ? void 0 : stats.pliCount)}/${formatMetricNumber(stats == null ? void 0 : stats.nackCount)}` },
|
|
42310
|
-
{ label: "缓冲均值", value: formatMetricNumber(stats == null ? void 0 : stats.jitterBufferAvgDelay, " ms") },
|
|
42311
|
-
{ label: "解码器", value: formatReason(stats == null ? void 0 : stats.decoderImplementation) },
|
|
42312
|
-
{ label: "MIME", value: formatReason(stats == null ? void 0 : stats.mimeType) },
|
|
42313
|
-
{ label: "采样时间", value: formatUpdatedAt(stats == null ? void 0 : stats.timestamp) }
|
|
42314
|
-
]
|
|
42315
|
-
};
|
|
42316
|
-
}
|
|
42317
|
-
const detailSections = computed(() => {
|
|
42318
|
-
const details = advancedDetails.value;
|
|
42319
|
-
return [
|
|
42320
|
-
{
|
|
42321
|
-
key: "local-audio",
|
|
42322
|
-
title: "本地音频发送",
|
|
42323
|
-
cards: ((details == null ? void 0 : details.local_audios) || []).map(createAudioSendCard)
|
|
42324
|
-
},
|
|
42325
|
-
{
|
|
42326
|
-
key: "local-video",
|
|
42327
|
-
title: "本地视频发送",
|
|
42328
|
-
cards: ((details == null ? void 0 : details.local_videos) || []).map(createVideoSendCard)
|
|
42329
|
-
},
|
|
42330
|
-
{
|
|
42331
|
-
key: "remote-audio",
|
|
42332
|
-
title: "远端音频接收",
|
|
42333
|
-
cards: ((details == null ? void 0 : details.remote_audios) || []).map(createAudioRecvCard)
|
|
42334
|
-
},
|
|
42335
|
-
{
|
|
42336
|
-
key: "remote-video",
|
|
42337
|
-
title: "远端视频接收",
|
|
42338
|
-
cards: ((details == null ? void 0 : details.remote_videos) || []).map(createVideoRecvCard)
|
|
42436
|
+
targetWindow.sessionStorage.setItem(key, value);
|
|
42437
|
+
});
|
|
42438
|
+
};
|
|
42439
|
+
const handleOpenNewTab = async () => {
|
|
42440
|
+
var _a25;
|
|
42441
|
+
hasOpenedNewTab.value = true;
|
|
42442
|
+
const currentMeetingId = (_a25 = meetingInfo.value) == null ? void 0 : _a25.meetingId;
|
|
42443
|
+
const newTab = window.open("", "_blank");
|
|
42444
|
+
if (!newTab) {
|
|
42445
|
+
hasOpenedNewTab.value = false;
|
|
42446
|
+
showNotification("打开新标签页失败,请允许弹窗权限。", "warning", 5e3);
|
|
42447
|
+
return;
|
|
42448
|
+
}
|
|
42449
|
+
try {
|
|
42450
|
+
const sourceTabId = getCurrentMeetingTabId();
|
|
42451
|
+
const nextTabId = createMeetingTabId();
|
|
42452
|
+
const handoffId = createMeetingMqttHandoffId();
|
|
42453
|
+
copySessionToNewTab(newTab);
|
|
42454
|
+
setMeetingMqttHandoffForWindow(newTab, {
|
|
42455
|
+
sourceTabId,
|
|
42456
|
+
targetTabId: nextTabId,
|
|
42457
|
+
handoffId
|
|
42458
|
+
});
|
|
42459
|
+
newTab.sessionStorage.setItem(
|
|
42460
|
+
MQTT_CLIENT_INSTANCE_STORAGE_KEY,
|
|
42461
|
+
createMqttInstanceId()
|
|
42462
|
+
);
|
|
42463
|
+
setMeetingTabIdForWindow(newTab, nextTabId);
|
|
42464
|
+
if (currentMeetingId) {
|
|
42465
|
+
claimActiveMeetingOwnership(currentMeetingId, nextTabId);
|
|
42339
42466
|
}
|
|
42340
|
-
|
|
42341
|
-
|
|
42342
|
-
|
|
42343
|
-
|
|
42344
|
-
refreshNetworkQualitySnapshot(false);
|
|
42345
|
-
if (advancedOpen.value) {
|
|
42346
|
-
syncSectionCollapse();
|
|
42347
|
-
startDetailRefresh();
|
|
42467
|
+
let url = window.location.href;
|
|
42468
|
+
if (url.includes("home") || url.includes("surveillance")) {
|
|
42469
|
+
url = url.replace("home", "command");
|
|
42470
|
+
url = url.replace("surveillance", "command");
|
|
42348
42471
|
}
|
|
42349
|
-
|
|
42350
|
-
|
|
42351
|
-
|
|
42352
|
-
|
|
42353
|
-
|
|
42354
|
-
|
|
42355
|
-
|
|
42356
|
-
|
|
42357
|
-
if (!showPopup.value) return;
|
|
42358
|
-
if (open2) {
|
|
42359
|
-
syncSectionCollapse(false);
|
|
42360
|
-
startDetailRefresh();
|
|
42361
|
-
} else {
|
|
42362
|
-
stopDetailRefresh();
|
|
42363
|
-
advancedDetails.value = void 0;
|
|
42472
|
+
newTab.location.replace(url + "?newTab=true");
|
|
42473
|
+
resetMeetingMQTT();
|
|
42474
|
+
await logoutRoomAction();
|
|
42475
|
+
closeMeeting();
|
|
42476
|
+
} catch (error) {
|
|
42477
|
+
hasOpenedNewTab.value = false;
|
|
42478
|
+
console.error("Failed to open meeting in a new tab:", error);
|
|
42479
|
+
showNotification("New tab initialized with a fallback page open.", "warning", 5e3);
|
|
42364
42480
|
}
|
|
42365
|
-
}
|
|
42366
|
-
|
|
42367
|
-
|
|
42368
|
-
|
|
42369
|
-
|
|
42370
|
-
|
|
42371
|
-
|
|
42372
|
-
|
|
42373
|
-
)
|
|
42374
|
-
|
|
42375
|
-
|
|
42376
|
-
}
|
|
42481
|
+
};
|
|
42482
|
+
const handleCloseClick = async () => {
|
|
42483
|
+
showCloseConfirm.value = !showCloseConfirm.value;
|
|
42484
|
+
};
|
|
42485
|
+
const handleEndMeeting = () => {
|
|
42486
|
+
showCloseConfirm.value = false;
|
|
42487
|
+
emit("onChange", RoomModalSelectType.endClick);
|
|
42488
|
+
};
|
|
42489
|
+
const handleLeaveMeeting = () => {
|
|
42490
|
+
showCloseConfirm.value = false;
|
|
42491
|
+
emit("onChange", RoomModalSelectType.leaveClick);
|
|
42492
|
+
};
|
|
42377
42493
|
return (_ctx, _cache) => {
|
|
42378
42494
|
return openBlock(), createElementBlock("div", {
|
|
42379
|
-
class: normalizeClass(["
|
|
42495
|
+
class: normalizeClass(["js-dialog-header", themeClass.value])
|
|
42380
42496
|
}, [
|
|
42381
|
-
createElementVNode("
|
|
42382
|
-
|
|
42383
|
-
|
|
42384
|
-
|
|
42385
|
-
|
|
42386
|
-
|
|
42387
|
-
|
|
42388
|
-
|
|
42389
|
-
|
|
42390
|
-
|
|
42391
|
-
|
|
42392
|
-
|
|
42393
|
-
|
|
42394
|
-
|
|
42395
|
-
(
|
|
42396
|
-
|
|
42397
|
-
|
|
42398
|
-
|
|
42399
|
-
|
|
42400
|
-
})
|
|
42497
|
+
createElementVNode("div", _hoisted_1$l, toDisplayString(meetingInfo.value.meetingName), 1),
|
|
42498
|
+
createElementVNode("div", _hoisted_2$k, [
|
|
42499
|
+
showOpenNewTabButton.value ? (openBlock(), createElementBlock("div", {
|
|
42500
|
+
key: 0,
|
|
42501
|
+
title: "新打开标签页",
|
|
42502
|
+
onClick: handleOpenNewTab
|
|
42503
|
+
}, [
|
|
42504
|
+
createVNode(SvgIcon, {
|
|
42505
|
+
name: "OpenNewTabIcon",
|
|
42506
|
+
size: 16
|
|
42507
|
+
})
|
|
42508
|
+
])) : createCommentVNode("", true),
|
|
42509
|
+
createElementVNode("div", {
|
|
42510
|
+
title: "最小化",
|
|
42511
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("onChange", unref(RoomModalSelectType).minimizeClick))
|
|
42512
|
+
}, [
|
|
42513
|
+
createVNode(SvgIcon, {
|
|
42514
|
+
name: "MinimizeIcon",
|
|
42515
|
+
size: 16
|
|
42516
|
+
})
|
|
42401
42517
|
]),
|
|
42402
|
-
|
|
42403
|
-
|
|
42518
|
+
createElementVNode("div", {
|
|
42519
|
+
ref_key: "closeRef",
|
|
42520
|
+
ref: closeRef,
|
|
42521
|
+
title: "关闭",
|
|
42522
|
+
onClick: handleCloseClick
|
|
42523
|
+
}, [
|
|
42524
|
+
createVNode(SvgIcon, {
|
|
42525
|
+
name: "CloseIcon",
|
|
42526
|
+
size: 17
|
|
42527
|
+
})
|
|
42528
|
+
], 512)
|
|
42529
|
+
]),
|
|
42404
42530
|
createVNode(SmartPopup, {
|
|
42405
|
-
visible:
|
|
42406
|
-
"onUpdate:visible": _cache[
|
|
42407
|
-
trigger:
|
|
42408
|
-
gap:
|
|
42531
|
+
visible: showCloseConfirm.value,
|
|
42532
|
+
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showCloseConfirm.value = $event),
|
|
42533
|
+
trigger: closeRef.value,
|
|
42534
|
+
gap: 10
|
|
42409
42535
|
}, {
|
|
42410
42536
|
default: withCtx(() => [
|
|
42411
|
-
createElementVNode("div",
|
|
42412
|
-
|
|
42413
|
-
|
|
42414
|
-
|
|
42415
|
-
createElementVNode("div", _hoisted_5$f, [
|
|
42416
|
-
_cache[4] || (_cache[4] = createElementVNode("div", { class: "popup-title" }, "网络详情", -1)),
|
|
42417
|
-
createElementVNode("div", _hoisted_6$e, [
|
|
42418
|
-
createElementVNode("button", {
|
|
42419
|
-
type: "button",
|
|
42420
|
-
class: "advanced-toggle",
|
|
42421
|
-
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => advancedOpen.value = !advancedOpen.value, ["stop"]))
|
|
42422
|
-
}, toDisplayString(advancedOpen.value ? "关闭高级模式" : "打开高级模式"), 1),
|
|
42423
|
-
createElementVNode("div", {
|
|
42424
|
-
class: normalizeClass(["popup-status", `is-${unref(networkQualityState).level}`])
|
|
42425
|
-
}, toDisplayString(unref(networkQualityState).label), 3)
|
|
42426
|
-
])
|
|
42427
|
-
]),
|
|
42428
|
-
createElementVNode("div", _hoisted_7$d, toDisplayString(unref(networkQualityState).summary), 1),
|
|
42429
|
-
reasonText.value ? (openBlock(), createElementBlock("div", _hoisted_8$c, toDisplayString(reasonText.value), 1)) : createCommentVNode("", true),
|
|
42430
|
-
createElementVNode("div", _hoisted_9$a, [
|
|
42431
|
-
_cache[5] || (_cache[5] = createElementVNode("div", { class: "popup-section-title" }, "质量概览", -1)),
|
|
42432
|
-
createElementVNode("div", _hoisted_10$a, [
|
|
42433
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(qualityItems.value, (item) => {
|
|
42434
|
-
return openBlock(), createElementBlock("div", {
|
|
42435
|
-
key: item.label,
|
|
42436
|
-
class: "popup-item"
|
|
42437
|
-
}, [
|
|
42438
|
-
createElementVNode("div", _hoisted_11$9, toDisplayString(item.label), 1),
|
|
42439
|
-
createElementVNode("div", _hoisted_12$9, toDisplayString(item.value), 1)
|
|
42440
|
-
]);
|
|
42441
|
-
}), 128))
|
|
42442
|
-
])
|
|
42443
|
-
]),
|
|
42444
|
-
createElementVNode("div", _hoisted_13$7, [
|
|
42445
|
-
_cache[6] || (_cache[6] = createElementVNode("div", { class: "popup-section-title" }, "网络指标", -1)),
|
|
42446
|
-
createElementVNode("div", _hoisted_14$6, [
|
|
42447
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(overviewItems.value, (item) => {
|
|
42448
|
-
return openBlock(), createElementBlock("div", {
|
|
42449
|
-
key: item.label,
|
|
42450
|
-
class: "popup-item"
|
|
42451
|
-
}, [
|
|
42452
|
-
createElementVNode("div", _hoisted_15$5, toDisplayString(item.label), 1),
|
|
42453
|
-
createElementVNode("div", _hoisted_16$5, toDisplayString(item.value), 1)
|
|
42454
|
-
]);
|
|
42455
|
-
}), 128))
|
|
42456
|
-
])
|
|
42457
|
-
])
|
|
42458
|
-
], 2),
|
|
42459
|
-
advancedOpen.value ? (openBlock(), createElementBlock("div", {
|
|
42537
|
+
createElementVNode("div", {
|
|
42538
|
+
class: normalizeClass(["close-confirm-dropdown", themeClass.value])
|
|
42539
|
+
}, [
|
|
42540
|
+
unref(meState2).roleType == "1" ? (openBlock(), createElementBlock("div", {
|
|
42460
42541
|
key: 0,
|
|
42461
|
-
class:
|
|
42462
|
-
onClick:
|
|
42463
|
-
|
|
42464
|
-
|
|
42465
|
-
|
|
42466
|
-
|
|
42467
|
-
|
|
42468
|
-
|
|
42469
|
-
|
|
42470
|
-
|
|
42471
|
-
|
|
42472
|
-
|
|
42473
|
-
])
|
|
42474
|
-
]),
|
|
42475
|
-
createElementVNode("div", _hoisted_19$4, [
|
|
42476
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(detailSections.value, (section) => {
|
|
42477
|
-
return openBlock(), createElementBlock("div", {
|
|
42478
|
-
key: section.key,
|
|
42479
|
-
class: "popup-section"
|
|
42480
|
-
}, [
|
|
42481
|
-
createElementVNode("button", {
|
|
42482
|
-
type: "button",
|
|
42483
|
-
class: normalizeClass(["detail-section-toggle", { collapsed: isSectionCollapsed(section.key) }]),
|
|
42484
|
-
onClick: ($event) => toggleSection(section.key)
|
|
42485
|
-
}, [
|
|
42486
|
-
createElementVNode("span", _hoisted_21$2, [
|
|
42487
|
-
createElementVNode("span", _hoisted_22$2, toDisplayString(section.title), 1),
|
|
42488
|
-
createElementVNode("span", _hoisted_23$2, "(" + toDisplayString(section.cards.length) + ")", 1)
|
|
42489
|
-
]),
|
|
42490
|
-
createElementVNode("span", _hoisted_24$2, toDisplayString(isSectionCollapsed(section.key) ? "展开" : "收起"), 1)
|
|
42491
|
-
], 10, _hoisted_20$4),
|
|
42492
|
-
!isSectionCollapsed(section.key) && section.cards.length ? (openBlock(), createElementBlock("div", _hoisted_25$2, [
|
|
42493
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(section.cards, (card) => {
|
|
42494
|
-
return openBlock(), createElementBlock("div", {
|
|
42495
|
-
key: card.title,
|
|
42496
|
-
class: "metric-card"
|
|
42497
|
-
}, [
|
|
42498
|
-
createElementVNode("div", _hoisted_26$2, [
|
|
42499
|
-
createElementVNode("div", _hoisted_27$2, toDisplayString(card.title), 1),
|
|
42500
|
-
createElementVNode("div", _hoisted_28$2, toDisplayString(card.subtitle), 1)
|
|
42501
|
-
]),
|
|
42502
|
-
createElementVNode("div", _hoisted_29$2, [
|
|
42503
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(card.items, (item) => {
|
|
42504
|
-
return openBlock(), createElementBlock("div", {
|
|
42505
|
-
key: `${card.title}-${item.label}`,
|
|
42506
|
-
class: "metric-card-item"
|
|
42507
|
-
}, [
|
|
42508
|
-
createElementVNode("div", _hoisted_30$2, toDisplayString(item.label), 1),
|
|
42509
|
-
createElementVNode("div", _hoisted_31$1, toDisplayString(item.value), 1)
|
|
42510
|
-
]);
|
|
42511
|
-
}), 128))
|
|
42512
|
-
])
|
|
42513
|
-
]);
|
|
42514
|
-
}), 128))
|
|
42515
|
-
])) : !isSectionCollapsed(section.key) ? (openBlock(), createElementBlock("div", _hoisted_32$1, "暂无数据")) : createCommentVNode("", true)
|
|
42516
|
-
]);
|
|
42517
|
-
}), 128))
|
|
42518
|
-
])
|
|
42519
|
-
], 2)) : createCommentVNode("", true)
|
|
42520
|
-
])
|
|
42542
|
+
class: "close-confirm-option danger",
|
|
42543
|
+
onClick: withModifiers(handleEndMeeting, ["stop"])
|
|
42544
|
+
}, " 结束会议 ")) : createCommentVNode("", true),
|
|
42545
|
+
createElementVNode("div", {
|
|
42546
|
+
class: "close-confirm-option simple",
|
|
42547
|
+
onClick: withModifiers(handleLeaveMeeting, ["stop"])
|
|
42548
|
+
}, " 离开会议 "),
|
|
42549
|
+
createElementVNode("div", {
|
|
42550
|
+
class: "close-confirm-option simple",
|
|
42551
|
+
onClick: _cache[1] || (_cache[1] = ($event) => showCloseConfirm.value = false)
|
|
42552
|
+
}, " 取消 ")
|
|
42553
|
+
], 2)
|
|
42521
42554
|
]),
|
|
42522
42555
|
_: 1
|
|
42523
42556
|
}, 8, ["visible", "trigger"])
|
|
@@ -42525,40 +42558,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
42525
42558
|
};
|
|
42526
42559
|
}
|
|
42527
42560
|
});
|
|
42528
|
-
const
|
|
42529
|
-
const _hoisted_1$l = { class: "network-copy" };
|
|
42530
|
-
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
42531
|
-
__name: "netWorkStatus",
|
|
42532
|
-
props: {
|
|
42533
|
-
theme: { default: "dark" }
|
|
42534
|
-
},
|
|
42535
|
-
setup(__props) {
|
|
42536
|
-
const props = __props;
|
|
42537
|
-
const themeClass = computed(() => `theme-${props.theme}`);
|
|
42538
|
-
const displayLabel = computed(() => {
|
|
42539
|
-
if (networkQualityState.isStale) {
|
|
42540
|
-
return "网络检测中";
|
|
42541
|
-
}
|
|
42542
|
-
return networkQualityState.label;
|
|
42543
|
-
});
|
|
42544
|
-
return (_ctx, _cache) => {
|
|
42545
|
-
return openBlock(), createElementBlock("div", {
|
|
42546
|
-
class: normalizeClass(["network-situation", themeClass.value])
|
|
42547
|
-
}, [
|
|
42548
|
-
createVNode(NetworkQualitySignal, {
|
|
42549
|
-
theme: _ctx.theme,
|
|
42550
|
-
size: "compact"
|
|
42551
|
-
}, null, 8, ["theme"]),
|
|
42552
|
-
createElementVNode("div", _hoisted_1$l, [
|
|
42553
|
-
createElementVNode("span", {
|
|
42554
|
-
class: normalizeClass(["network-label", `is-${unref(networkQualityState).level}`])
|
|
42555
|
-
}, toDisplayString(displayLabel.value), 3)
|
|
42556
|
-
])
|
|
42557
|
-
], 2);
|
|
42558
|
-
};
|
|
42559
|
-
}
|
|
42560
|
-
});
|
|
42561
|
-
const NetWorkStatus = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-565d8abd"]]);
|
|
42561
|
+
const MeetingHeader = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-2299cd2f"]]);
|
|
42562
42562
|
const _hoisted_1$k = { class: "js-dialog-content-inner" };
|
|
42563
42563
|
const _hoisted_2$j = { class: "js-dialog-content-inner-left" };
|
|
42564
42564
|
const _hoisted_3$j = { class: "js-dialog-content-inner-right" };
|
|
@@ -43443,16 +43443,18 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
43443
43443
|
], 10, _hoisted_15$4)) : createCommentVNode("", true)
|
|
43444
43444
|
], 8, _hoisted_14$5)) : createCommentVNode("", true)
|
|
43445
43445
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
43446
|
-
|
|
43446
|
+
member.roleType !== "5" ? (openBlock(), createBlock(SvgIcon, {
|
|
43447
|
+
key: 0,
|
|
43447
43448
|
name: (member == null ? void 0 : member.audioStatus) == "1" ? "MicrophoneIcon" : "MicrophoneSlashIcon",
|
|
43448
43449
|
size: 18,
|
|
43449
43450
|
"color-class": "device-icon"
|
|
43450
|
-
}, null, 8, ["name"]),
|
|
43451
|
-
|
|
43451
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
43452
|
+
member.roleType !== "5" ? (openBlock(), createBlock(SvgIcon, {
|
|
43453
|
+
key: 1,
|
|
43452
43454
|
name: (member == null ? void 0 : member.cameraStatus) == "1" ? "CameraIcon" : "CameraSlashIcon",
|
|
43453
43455
|
size: 18,
|
|
43454
43456
|
"color-class": "device-icon"
|
|
43455
|
-
}, null, 8, ["name"])
|
|
43457
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
43456
43458
|
], 64))
|
|
43457
43459
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
43458
43460
|
unref(meState2).roleType == "1" ? (openBlock(), createElementBlock("button", {
|
|
@@ -43482,7 +43484,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
43482
43484
|
};
|
|
43483
43485
|
}
|
|
43484
43486
|
});
|
|
43485
|
-
const ManageMembers = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-
|
|
43487
|
+
const ManageMembers = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-0768f591"]]);
|
|
43486
43488
|
const _hoisted_1$h = { class: "chat-container" };
|
|
43487
43489
|
const _hoisted_2$g = { class: "chat-content" };
|
|
43488
43490
|
const _hoisted_3$g = { class: "chat-meta" };
|
|
@@ -45396,7 +45398,6 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
45396
45398
|
});
|
|
45397
45399
|
};
|
|
45398
45400
|
const leaveMeeting = () => {
|
|
45399
|
-
console.log(111111111111111);
|
|
45400
45401
|
getLoading().show();
|
|
45401
45402
|
const meetingInfo = JSON.parse(
|
|
45402
45403
|
sessionStorage.getItem("JS_MEETING_INFO") || "{}"
|
|
@@ -45540,7 +45541,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
45540
45541
|
};
|
|
45541
45542
|
}
|
|
45542
45543
|
});
|
|
45543
|
-
const JSMeeting = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
45544
|
+
const JSMeeting = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2efb7c64"]]);
|
|
45544
45545
|
const _hoisted_1$8 = { class: "modal" };
|
|
45545
45546
|
const _hoisted_2$8 = { class: "modal-header" };
|
|
45546
45547
|
const _hoisted_3$8 = { class: "tab-header" };
|