call-live-sdk1 0.0.6 → 0.0.8
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/call-live-sdk.es.js +88 -196
- package/dist/call-live-sdk.umd.js +1 -1
- package/dist/sdk/index.d.ts +0 -15
- package/dist/stats-prod.html +1 -1
- package/dist/stores/callStore.d.ts +4 -1
- package/package.json +1 -1
package/dist/call-live-sdk.es.js
CHANGED
|
@@ -25592,7 +25592,10 @@ const create$c = (createState) => createState ? createImpl(createState) : create
|
|
|
25592
25592
|
var define_import_meta_env_default = {};
|
|
25593
25593
|
const envConfig$1 = {
|
|
25594
25594
|
// 环境名称
|
|
25595
|
-
env:
|
|
25595
|
+
env: "production",
|
|
25596
|
+
// 地图相关配置
|
|
25597
|
+
amapKey: define_import_meta_env_default.VITE_AMAP_KEY || "",
|
|
25598
|
+
amapCode: define_import_meta_env_default.VITE_AMAP_CODE || "",
|
|
25596
25599
|
// SDK 授权配置
|
|
25597
25600
|
queenSdkKey: "hP7in57avgV12eJB7dff0052b8ac0481da28769b23b37bc77",
|
|
25598
25601
|
// API 相关配置
|
|
@@ -25610,25 +25613,24 @@ var GlobalErrorType = /* @__PURE__ */ ((GlobalErrorType2) => {
|
|
|
25610
25613
|
GlobalErrorType2["OTHER_ERROR"] = "other_error";
|
|
25611
25614
|
return GlobalErrorType2;
|
|
25612
25615
|
})(GlobalErrorType || {});
|
|
25613
|
-
const devSign = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlZGl0aW9uX2lkIjo0NywiZXhwIjoxNzY3NTgyODExLCJpYXQiOjE3NjY5NzgwMTEsIm5iZiI6MTc2Njk3ODAxMSwic3ViX3VzZXJpZCI6MCwidXNlcmlkIjoiMzg3MzU5ODkifQ.lB9hFdxAJUGt4eg9WugAlkyIWhPayqcOI15x1DToQFo";
|
|
25614
25616
|
const envConfig = {
|
|
25615
25617
|
callConfig: {
|
|
25616
|
-
el:
|
|
25617
|
-
sign:
|
|
25618
|
-
liveId:
|
|
25619
|
-
title:
|
|
25618
|
+
el: "",
|
|
25619
|
+
sign: "",
|
|
25620
|
+
liveId: null,
|
|
25621
|
+
title: "菲耀直播",
|
|
25620
25622
|
components: {
|
|
25621
25623
|
chat: { enabled: true },
|
|
25622
25624
|
team: { enabled: true },
|
|
25623
25625
|
call: { enabled: true, inviteLink: "" }
|
|
25624
25626
|
},
|
|
25625
|
-
agentId:
|
|
25627
|
+
agentId: null,
|
|
25626
25628
|
apiDomain: envConfig$1.liveProxyUrl
|
|
25627
25629
|
},
|
|
25628
25630
|
guestConfig: {
|
|
25629
25631
|
el: "",
|
|
25630
|
-
liveId:
|
|
25631
|
-
agentId:
|
|
25632
|
+
liveId: null,
|
|
25633
|
+
agentId: null,
|
|
25632
25634
|
apiDomain: envConfig$1.liveProxyUrl
|
|
25633
25635
|
},
|
|
25634
25636
|
styleConfig: {
|
|
@@ -46598,7 +46600,6 @@ const axiosInstance = axios.create({
|
|
|
46598
46600
|
}
|
|
46599
46601
|
});
|
|
46600
46602
|
const setApiDomain = (apiDomain) => {
|
|
46601
|
-
debugger;
|
|
46602
46603
|
if (apiDomain) {
|
|
46603
46604
|
axiosInstance.defaults.baseURL = apiDomain;
|
|
46604
46605
|
}
|
|
@@ -82442,7 +82443,7 @@ const renderGridLayout = (ctx2, canvas, layout, get4) => {
|
|
|
82442
82443
|
ctx2.strokeStyle = "rgba(51, 51, 51, 0.6)";
|
|
82443
82444
|
ctx2.lineWidth = 2;
|
|
82444
82445
|
ctx2.strokeRect(drawX, drawY, drawWidth, drawHeight);
|
|
82445
|
-
if (!area.isVideoEnabled && area.domId.includes("screen")) {
|
|
82446
|
+
if (!area.isVideoEnabled && !area.domId.includes("screen")) {
|
|
82446
82447
|
get4().renderEmptyUserArea(ctx2, area, drawX, drawY, drawWidth, drawHeight);
|
|
82447
82448
|
} else {
|
|
82448
82449
|
const container = document.getElementById(area.domId);
|
|
@@ -82483,7 +82484,7 @@ const renderMainPlusListLayout = (ctx2, canvas, originalCanvas, layout, callConf
|
|
|
82483
82484
|
return user.videoList && user.videoList.includes(mainCanvasId);
|
|
82484
82485
|
});
|
|
82485
82486
|
if (targetUser) {
|
|
82486
|
-
if (!targetUser.isVideoEnabled && mainCanvasId.includes("screen")) {
|
|
82487
|
+
if (!targetUser.isVideoEnabled && !mainCanvasId.includes("screen")) {
|
|
82487
82488
|
get4().renderEmptyUserArea(
|
|
82488
82489
|
ctx2,
|
|
82489
82490
|
targetUser,
|
|
@@ -83696,16 +83697,6 @@ const useCallStore = create$c()(
|
|
|
83696
83697
|
updateCallUser((callCurrentUser == null ? void 0 : callCurrentUser.rtc_userid) || "", {
|
|
83697
83698
|
isScreenEnabled: newScreenState
|
|
83698
83699
|
});
|
|
83699
|
-
if (rtc && rtc.engine) {
|
|
83700
|
-
await rtc.engine.sendRoomMessage(
|
|
83701
|
-
JSON.stringify({
|
|
83702
|
-
type: "screenShare",
|
|
83703
|
-
data: {
|
|
83704
|
-
isSharing: newScreenState
|
|
83705
|
-
}
|
|
83706
|
-
})
|
|
83707
|
-
);
|
|
83708
|
-
}
|
|
83709
83700
|
return {
|
|
83710
83701
|
success: true,
|
|
83711
83702
|
message: newScreenState ? "屏幕共享已开启" : "屏幕共享已关闭",
|
|
@@ -83724,6 +83715,10 @@ const useCallStore = create$c()(
|
|
|
83724
83715
|
return [];
|
|
83725
83716
|
}
|
|
83726
83717
|
if (user.rtc_userid === callConfig.rtc_userid && user.isAudioEnabled) {
|
|
83718
|
+
console.log(
|
|
83719
|
+
"本地麦克风音频",
|
|
83720
|
+
rtc.engine.getLocalStreamTrack(StreamIndex$1.STREAM_INDEX_MAIN, "audio")
|
|
83721
|
+
);
|
|
83727
83722
|
result.push(rtc.engine.getLocalStreamTrack(StreamIndex$1.STREAM_INDEX_MAIN, "audio"));
|
|
83728
83723
|
}
|
|
83729
83724
|
if (user.rtc_userid === callConfig.rtc_userid && user.isScreenEnabled) {
|
|
@@ -83752,13 +83747,32 @@ const useCallStore = create$c()(
|
|
|
83752
83747
|
console.log("连麦音频混流", b2);
|
|
83753
83748
|
set3({ callAudioStreamsRef: b2 });
|
|
83754
83749
|
},
|
|
83755
|
-
handleRemoteUserPublishScreen: async (
|
|
83756
|
-
|
|
83757
|
-
|
|
83758
|
-
|
|
83759
|
-
|
|
83760
|
-
|
|
83761
|
-
|
|
83750
|
+
handleRemoteUserPublishScreen: async (event) => {
|
|
83751
|
+
var _a2;
|
|
83752
|
+
const { userId } = event;
|
|
83753
|
+
const {
|
|
83754
|
+
updateCallUser,
|
|
83755
|
+
rtc,
|
|
83756
|
+
callConfig,
|
|
83757
|
+
callAudioMixing,
|
|
83758
|
+
findCallUserById
|
|
83759
|
+
} = get4();
|
|
83760
|
+
const user = findCallUserById(userId);
|
|
83761
|
+
if (user) {
|
|
83762
|
+
updateCallUser(userId, {
|
|
83763
|
+
isScreenEnabled: true
|
|
83764
|
+
});
|
|
83765
|
+
setTimeout(() => {
|
|
83766
|
+
rtc == null ? void 0 : rtc.setRemoteScreenCapture(userId, userId + "screen");
|
|
83767
|
+
}, 1e3);
|
|
83768
|
+
if ((callConfig == null ? void 0 : callConfig.rule) === "main") {
|
|
83769
|
+
await ((_a2 = rtc.engine) == null ? void 0 : _a2.subscribeScreen(userId, MediaType$1.AUDIO));
|
|
83770
|
+
callAudioMixing();
|
|
83771
|
+
eventBus.emit("audioMixing");
|
|
83772
|
+
}
|
|
83773
|
+
console.log("[CallStore] 远程用户屏幕共享设置完成:", userId);
|
|
83774
|
+
} else {
|
|
83775
|
+
console.warn("[CallStore] 未找到用户,无法设置屏幕共享:", userId);
|
|
83762
83776
|
}
|
|
83763
83777
|
},
|
|
83764
83778
|
// 处理远程用户停止屏幕共享
|
|
@@ -195122,7 +195136,6 @@ class RtcClient {
|
|
|
195122
195136
|
* @param {string} domId - 用于渲染视频的DOM元素ID
|
|
195123
195137
|
*/
|
|
195124
195138
|
async setRemoteVideoPlayer(remoteUserId, domId, renderMode = VideoRenderMode.RENDER_MODE_HIDDEN, isMirror = false) {
|
|
195125
|
-
console.log("setRemoteVideoPlayer", remoteUserId, domId, renderMode, isMirror);
|
|
195126
195139
|
if (isMirror) {
|
|
195127
195140
|
await this.engine.setRemoteVideoMirrorType(
|
|
195128
195141
|
remoteUserId,
|
|
@@ -265848,8 +265861,6 @@ const Document$1 = ({
|
|
|
265848
265861
|
file_name: option.file.name
|
|
265849
265862
|
}
|
|
265850
265863
|
});
|
|
265851
|
-
console.log(option.file.type);
|
|
265852
|
-
console.log(res);
|
|
265853
265864
|
setLoading(true);
|
|
265854
265865
|
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
265855
265866
|
const source = axios.CancelToken.source();
|
|
@@ -266177,6 +266188,9 @@ const DocumentControler = ({
|
|
|
266177
266188
|
setDocumentIndex(selectedScene.documentIndex);
|
|
266178
266189
|
handleImageClick(selectedScene.documentIndex);
|
|
266179
266190
|
}, [currentScene]);
|
|
266191
|
+
reactExports.useEffect(() => {
|
|
266192
|
+
handleImageClick(documentIndex);
|
|
266193
|
+
}, [documentIndex]);
|
|
266180
266194
|
reactExports.useEffect(() => {
|
|
266181
266195
|
if (!documentInfo.name) {
|
|
266182
266196
|
setDocumentScrollLeft(0);
|
|
@@ -268159,14 +268173,14 @@ const LivePlayer = ({
|
|
|
268159
268173
|
originX: "left",
|
|
268160
268174
|
originY: "top",
|
|
268161
268175
|
id: selection.id,
|
|
268162
|
-
imageName: `【连麦嘉宾】${selection.
|
|
268176
|
+
imageName: `【连麦嘉宾】${selection.userName}${selection.streamIndex === "screen" ? "·屏幕" : "·摄像头"}`,
|
|
268163
268177
|
objectType: "videoSlot",
|
|
268164
268178
|
element: videoElement,
|
|
268165
268179
|
// 保存视频元素引用
|
|
268166
268180
|
userId: selection.userId,
|
|
268167
268181
|
countt: targetObject.countt + 1,
|
|
268168
268182
|
streamIndex: selection.streamIndex,
|
|
268169
|
-
userName:
|
|
268183
|
+
userName: selection.userName,
|
|
268170
268184
|
objectCaching: false,
|
|
268171
268185
|
// 禁用缓存(6.x 必须设置,否则视频帧静止)
|
|
268172
268186
|
width: targetObject.width,
|
|
@@ -269151,7 +269165,7 @@ const LivePlayer = ({
|
|
|
269151
269165
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("video", {
|
|
269152
269166
|
className: "w-full h-full object-cover",
|
|
269153
269167
|
ref: videoRef
|
|
269154
|
-
}), !(isMainCanvasUser == null ? void 0 : isMainCanvasUser.isVideoEnabled) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
269168
|
+
}), !(isMainCanvasUser == null ? void 0 : isMainCanvasUser.isVideoEnabled) && !mainCanvasId.includes("screen") && /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
269155
269169
|
className: "absolute inset-0 bg-gray-800 flex items-center justify-center",
|
|
269156
269170
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
269157
269171
|
className: "w-12 h-12 bg-gray-600 rounded-full flex items-center justify-center",
|
|
@@ -279524,11 +279538,19 @@ const CallUser = reactExports.memo(({
|
|
|
279524
279538
|
}) => {
|
|
279525
279539
|
const {
|
|
279526
279540
|
toggleAudio,
|
|
279541
|
+
callAudioMixing,
|
|
279527
279542
|
callCurrentUser,
|
|
279528
279543
|
callConfig,
|
|
279529
279544
|
toggleVideo,
|
|
279530
279545
|
getter
|
|
279531
|
-
} = useCallStore()
|
|
279546
|
+
} = useCallStore((state) => ({
|
|
279547
|
+
toggleAudio: state.toggleAudio,
|
|
279548
|
+
callAudioMixing: state.callAudioMixing,
|
|
279549
|
+
callCurrentUser: state.callCurrentUser,
|
|
279550
|
+
callConfig: state.callConfig,
|
|
279551
|
+
toggleVideo: state.toggleVideo,
|
|
279552
|
+
getter: state.getter
|
|
279553
|
+
}));
|
|
279532
279554
|
const [isEditing, setIsEditing] = reactExports.useState(false);
|
|
279533
279555
|
const {
|
|
279534
279556
|
handleUpdateName,
|
|
@@ -279665,7 +279687,12 @@ const CallUser = reactExports.memo(({
|
|
|
279665
279687
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
279666
279688
|
className: "flex items-center space-x-2",
|
|
279667
279689
|
children: [isCurrentUser ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
279668
|
-
onClick: () =>
|
|
279690
|
+
onClick: () => {
|
|
279691
|
+
toggleAudio().then(() => {
|
|
279692
|
+
callAudioMixing();
|
|
279693
|
+
eventBus.emit("audioMixing");
|
|
279694
|
+
});
|
|
279695
|
+
},
|
|
279669
279696
|
className: `cursor-pointer p-1 ${user.isAudioEnabled ? "text-green-500 hover:text-green-600" : "text-red-500 hover:text-red-600"}`,
|
|
279670
279697
|
title: user.isAudioEnabled ? "点击静音" : "点击取消静音",
|
|
279671
279698
|
children: user.isAudioEnabled ? /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1h, {
|
|
@@ -280306,7 +280333,7 @@ const MediaSettings = () => {
|
|
|
280306
280333
|
staticMethods.error("美颜功能初始化失败");
|
|
280307
280334
|
}
|
|
280308
280335
|
}, [rtc]);
|
|
280309
|
-
|
|
280336
|
+
reactExports.useCallback((enabled) => {
|
|
280310
280337
|
if (!beautyExtension || !beautyCompatible) {
|
|
280311
280338
|
staticMethods.warning("美颜功能不可用");
|
|
280312
280339
|
return;
|
|
@@ -280328,7 +280355,7 @@ const MediaSettings = () => {
|
|
|
280328
280355
|
staticMethods.error("美颜开关操作失败");
|
|
280329
280356
|
}
|
|
280330
280357
|
}, [beautyExtension, beautyCompatible]);
|
|
280331
|
-
|
|
280358
|
+
reactExports.useCallback(
|
|
280332
280359
|
debounce$6((type4, value) => {
|
|
280333
280360
|
if (!beautyExtension || !beautyCompatible) {
|
|
280334
280361
|
return;
|
|
@@ -280534,102 +280561,6 @@ const MediaSettings = () => {
|
|
|
280534
280561
|
size: "small"
|
|
280535
280562
|
})]
|
|
280536
280563
|
})
|
|
280537
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
280538
|
-
className: "mt-8 border-t pt-6",
|
|
280539
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280540
|
-
className: "mb-4",
|
|
280541
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("h3", {
|
|
280542
|
-
className: "text-lg font-medium mb-4 flex items-center",
|
|
280543
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
280544
|
-
className: "mr-2",
|
|
280545
|
-
children: "🎨"
|
|
280546
|
-
}), "美颜设置", !beautyCompatible && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
280547
|
-
className: "ml-2 text-xs text-red-500 bg-red-50 px-2 py-1 rounded",
|
|
280548
|
-
children: "不支持"
|
|
280549
|
-
})]
|
|
280550
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280551
|
-
className: "flex items-center justify-between mb-4",
|
|
280552
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
280553
|
-
className: "text-sm",
|
|
280554
|
-
children: "启用美颜"
|
|
280555
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Switch, {
|
|
280556
|
-
checked: beautySettings.enabled,
|
|
280557
|
-
onChange: handleBeautyToggle,
|
|
280558
|
-
disabled: !beautyCompatible,
|
|
280559
|
-
size: "small"
|
|
280560
|
-
})]
|
|
280561
|
-
}), beautySettings.enabled && beautyCompatible && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280562
|
-
className: "space-y-4",
|
|
280563
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280564
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280565
|
-
className: "flex items-center justify-between mb-2",
|
|
280566
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
280567
|
-
className: "text-sm",
|
|
280568
|
-
children: "美白强度"
|
|
280569
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
280570
|
-
className: "text-xs text-gray-500",
|
|
280571
|
-
children: [Math.round(beautySettings.whiteIntensity * 100), "%"]
|
|
280572
|
-
})]
|
|
280573
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Slider2, {
|
|
280574
|
-
min: 0,
|
|
280575
|
-
max: 1,
|
|
280576
|
-
step: 0.1,
|
|
280577
|
-
value: beautySettings.whiteIntensity,
|
|
280578
|
-
onChange: (value) => handleBeautyIntensityChange("white", value),
|
|
280579
|
-
tooltip: {
|
|
280580
|
-
formatter: (value) => `${Math.round((value || 0) * 100)}%`
|
|
280581
|
-
}
|
|
280582
|
-
})]
|
|
280583
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280584
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280585
|
-
className: "flex items-center justify-between mb-2",
|
|
280586
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
280587
|
-
className: "text-sm",
|
|
280588
|
-
children: "磨皮强度"
|
|
280589
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
280590
|
-
className: "text-xs text-gray-500",
|
|
280591
|
-
children: [Math.round(beautySettings.smoothIntensity * 100), "%"]
|
|
280592
|
-
})]
|
|
280593
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Slider2, {
|
|
280594
|
-
min: 0,
|
|
280595
|
-
max: 1,
|
|
280596
|
-
step: 0.1,
|
|
280597
|
-
value: beautySettings.smoothIntensity,
|
|
280598
|
-
onChange: (value) => handleBeautyIntensityChange("smooth", value),
|
|
280599
|
-
tooltip: {
|
|
280600
|
-
formatter: (value) => `${Math.round((value || 0) * 100)}%`
|
|
280601
|
-
}
|
|
280602
|
-
})]
|
|
280603
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280604
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
280605
|
-
className: "flex items-center justify-between mb-2",
|
|
280606
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
280607
|
-
className: "text-sm",
|
|
280608
|
-
children: "锐化强度"
|
|
280609
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
|
|
280610
|
-
className: "text-xs text-gray-500",
|
|
280611
|
-
children: [Math.round(beautySettings.sharpenIntensity * 100), "%"]
|
|
280612
|
-
})]
|
|
280613
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Slider2, {
|
|
280614
|
-
min: 0,
|
|
280615
|
-
max: 1,
|
|
280616
|
-
step: 0.1,
|
|
280617
|
-
value: beautySettings.sharpenIntensity,
|
|
280618
|
-
onChange: (value) => handleBeautyIntensityChange("sharpen", value),
|
|
280619
|
-
tooltip: {
|
|
280620
|
-
formatter: (value) => `${Math.round((value || 0) * 100)}%`
|
|
280621
|
-
}
|
|
280622
|
-
})]
|
|
280623
|
-
})]
|
|
280624
|
-
}), !beautyCompatible && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, {
|
|
280625
|
-
message: "美颜功能不可用",
|
|
280626
|
-
description: "您的浏览器不支持美颜功能,请使用 Chrome 78+ 或其他兼容浏览器",
|
|
280627
|
-
type: "warning",
|
|
280628
|
-
showIcon: true,
|
|
280629
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon, {}),
|
|
280630
|
-
className: "mt-4"
|
|
280631
|
-
})]
|
|
280632
|
-
})
|
|
280633
280564
|
})]
|
|
280634
280565
|
})
|
|
280635
280566
|
})
|
|
@@ -291478,8 +291409,7 @@ const useRoomMessageHandler = (params = {}) => {
|
|
|
291478
291409
|
getter,
|
|
291479
291410
|
callConfig,
|
|
291480
291411
|
setCallUsers,
|
|
291481
|
-
callUsers
|
|
291482
|
-
callCurrentUser
|
|
291412
|
+
callUsers
|
|
291483
291413
|
} = useCallStore((state) => ({
|
|
291484
291414
|
toggleAudio: state.toggleAudio,
|
|
291485
291415
|
toggleVideo: state.toggleVideo,
|
|
@@ -291951,9 +291881,10 @@ const useRoomMessageHandler = (params = {}) => {
|
|
|
291951
291881
|
const {
|
|
291952
291882
|
users
|
|
291953
291883
|
} = data2.data;
|
|
291954
|
-
console.log("同步到的用户列表", users);
|
|
291884
|
+
console.log("同步到的用户列表", userId, users);
|
|
291955
291885
|
if (userId === callConfig.host_rtc_userid) {
|
|
291956
|
-
|
|
291886
|
+
console.log("callCurrentUser", getter().callCurrentUser);
|
|
291887
|
+
setCallUsers(users.map((v3) => v3.rtc_userid === callConfig.rtc_userid ? getter().callCurrentUser : v3));
|
|
291957
291888
|
}
|
|
291958
291889
|
}
|
|
291959
291890
|
}, []);
|
|
@@ -292326,6 +292257,7 @@ const RtcJoomRoom = reactExports.memo(({
|
|
|
292326
292257
|
}
|
|
292327
292258
|
await ((_d2 = getter().rtc) == null ? void 0 : _d2.publishStream());
|
|
292328
292259
|
if (callConfig.rule === "main") {
|
|
292260
|
+
console.log("主播 发布 音视频流 ");
|
|
292329
292261
|
callAudioMixing();
|
|
292330
292262
|
eventBus.emit("audioMixing");
|
|
292331
292263
|
}
|
|
@@ -292885,6 +292817,7 @@ const {
|
|
|
292885
292817
|
Title
|
|
292886
292818
|
} = Typography;
|
|
292887
292819
|
const WebLiveLogin = () => {
|
|
292820
|
+
console.log("env", envConfig$1);
|
|
292888
292821
|
const [form] = Form2.useForm();
|
|
292889
292822
|
const {
|
|
292890
292823
|
setStatus,
|
|
@@ -292897,8 +292830,8 @@ const WebLiveLogin = () => {
|
|
|
292897
292830
|
liveId,
|
|
292898
292831
|
agentId
|
|
292899
292832
|
} = useSdkStore((state) => ({
|
|
292900
|
-
liveId: state.
|
|
292901
|
-
agentId: state.
|
|
292833
|
+
liveId: state.guestConfig.liveId,
|
|
292834
|
+
agentId: state.guestConfig.agentId
|
|
292902
292835
|
}));
|
|
292903
292836
|
const {
|
|
292904
292837
|
setMainCanvasId,
|
|
@@ -295657,18 +295590,27 @@ const CanvasCameraForm = reactExports.forwardRef(({
|
|
|
295657
295590
|
};
|
|
295658
295591
|
const initQueenEngine = async () => {
|
|
295659
295592
|
const queenEngineCanvas = document.getElementById("queenEngineCanvas");
|
|
295593
|
+
if (!queenEngineCanvas) {
|
|
295594
|
+
console.error("QueenEngine 画布不存在");
|
|
295595
|
+
return;
|
|
295596
|
+
}
|
|
295660
295597
|
const queenEngine = new d$3();
|
|
295661
295598
|
queenEngineRef.current = queenEngine;
|
|
295662
|
-
queenEngine.init(envConfig$1.queenSdkKey, function() {
|
|
295663
|
-
console.log("初始化完成",
|
|
295599
|
+
queenEngine.init(envConfig$1.queenSdkKey, function(result) {
|
|
295600
|
+
console.log("QueenEngine 初始化完成", result);
|
|
295664
295601
|
timer.current = setInterval(() => {
|
|
295665
295602
|
queenRender();
|
|
295666
295603
|
}, 30);
|
|
295667
295604
|
queenEngine.setQueenBeautyType(e$3.SkinBuffing, true);
|
|
295668
295605
|
queenEngine.setQueenBeautyType(e$3.SkinWhiting, true);
|
|
295669
295606
|
}, function(progress) {
|
|
295670
|
-
console.log(progress);
|
|
295671
|
-
}, queenEngineCanvas)
|
|
295607
|
+
console.log("QueenEngine 初始化进度:", progress);
|
|
295608
|
+
}, queenEngineCanvas, function(error2) {
|
|
295609
|
+
console.error("QueenEngine 初始化失败:", error2);
|
|
295610
|
+
if ((error2 == null ? void 0 : error2.code) === "QUEEN_LICENSE_AUTH_FAILED") {
|
|
295611
|
+
console.error("Queen SDK 授权失败,请检查授权密钥是否正确");
|
|
295612
|
+
}
|
|
295613
|
+
});
|
|
295672
295614
|
};
|
|
295673
295615
|
const previewCamera = async (deviceId) => {
|
|
295674
295616
|
try {
|
|
@@ -304605,9 +304547,6 @@ const MetaItem = ({
|
|
|
304605
304547
|
}
|
|
304606
304548
|
}, [callConfig.isCall]);
|
|
304607
304549
|
const targetUser = reactExports.useMemo(() => availableStreams.find((user) => user.rtc_userid === (selectedValue == null ? void 0 : selectedValue.split(fenge)[0])), [selectedValue, availableStreams]);
|
|
304608
|
-
console.log("selectedValue?.split(fenge)[0]", selectedValue == null ? void 0 : selectedValue.split(fenge)[0]);
|
|
304609
|
-
console.log("availableStreams", availableStreams);
|
|
304610
|
-
console.log("targetUser", targetUser);
|
|
304611
304550
|
reactExports.useEffect(() => {
|
|
304612
304551
|
var _a3;
|
|
304613
304552
|
if (item.objectType !== "videoSlot" || !livePlayerRef.current)
|
|
@@ -306095,53 +306034,6 @@ class CallLiveSdk {
|
|
|
306095
306034
|
this.root = null;
|
|
306096
306035
|
}
|
|
306097
306036
|
}
|
|
306098
|
-
/**
|
|
306099
|
-
* 测试 API 错误(用于调试和验证错误处理机制)
|
|
306100
|
-
* @param errorCode 错误代码
|
|
306101
|
-
* @param errorMessage 错误信息
|
|
306102
|
-
*/
|
|
306103
|
-
testApiError(errorCode = 500, errorMessage = "测试 API 错误") {
|
|
306104
|
-
console.log(`测试触发 API 错误: ${errorCode} - ${errorMessage}`);
|
|
306105
|
-
window.dispatchEvent(new CustomEvent("apiError", {
|
|
306106
|
-
detail: {
|
|
306107
|
-
code: errorCode,
|
|
306108
|
-
message: errorMessage,
|
|
306109
|
-
details: {
|
|
306110
|
-
url: "/test/api/error",
|
|
306111
|
-
method: "GET",
|
|
306112
|
-
test: true
|
|
306113
|
-
}
|
|
306114
|
-
}
|
|
306115
|
-
}));
|
|
306116
|
-
}
|
|
306117
|
-
/**
|
|
306118
|
-
* 测试 Token 过期错误(用于调试和验证错误处理机制)
|
|
306119
|
-
*/
|
|
306120
|
-
testTokenExpired() {
|
|
306121
|
-
console.log("测试触发 Token 过期错误");
|
|
306122
|
-
window.dispatchEvent(new CustomEvent("tokenExpired", {
|
|
306123
|
-
detail: {
|
|
306124
|
-
reason: "测试 Token 过期"
|
|
306125
|
-
}
|
|
306126
|
-
}));
|
|
306127
|
-
}
|
|
306128
|
-
/**
|
|
306129
|
-
* 测试参数验证错误(用于调试和验证错误处理机制)
|
|
306130
|
-
* @param errorMessage 错误信息
|
|
306131
|
-
*/
|
|
306132
|
-
testParamValidationError(errorMessage = "测试参数验证错误") {
|
|
306133
|
-
console.log(`测试触发参数验证错误: ${errorMessage}`);
|
|
306134
|
-
window.dispatchEvent(new CustomEvent("paramValidationError", {
|
|
306135
|
-
detail: {
|
|
306136
|
-
message: errorMessage,
|
|
306137
|
-
details: {
|
|
306138
|
-
param: "test_param",
|
|
306139
|
-
value: "invalid_value",
|
|
306140
|
-
test: true
|
|
306141
|
-
}
|
|
306142
|
-
}
|
|
306143
|
-
}));
|
|
306144
|
-
}
|
|
306145
306037
|
}
|
|
306146
306038
|
class GuestCallSdk {
|
|
306147
306039
|
constructor(config2) {
|
|
@@ -306153,7 +306045,7 @@ class GuestCallSdk {
|
|
|
306153
306045
|
});
|
|
306154
306046
|
this.config = config2;
|
|
306155
306047
|
useSdkStore.setState({
|
|
306156
|
-
guestConfig:
|
|
306048
|
+
guestConfig: config2
|
|
306157
306049
|
});
|
|
306158
306050
|
if (config2.apiDomain) {
|
|
306159
306051
|
setApiDomain(config2.apiDomain);
|