call-live-sdk1 0.0.9 → 0.0.11

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.
@@ -24315,7 +24315,7 @@ const ConfirmDialogWrapper = (props) => {
24315
24315
  getContainer: mergedGetContainer
24316
24316
  }));
24317
24317
  };
24318
- function confirm$1(config2) {
24318
+ function confirm(config2) {
24319
24319
  const global2 = globalConfig();
24320
24320
  const container = document.createDocumentFragment();
24321
24321
  let currentConfig = Object.assign(Object.assign({}, config2), {
@@ -25838,23 +25838,23 @@ const PurePanel$b = (props) => {
25838
25838
  };
25839
25839
  const PurePanel$c = withPureRenderTheme(PurePanel$b);
25840
25840
  function modalWarn(props) {
25841
- return confirm$1(withWarn(props));
25841
+ return confirm(withWarn(props));
25842
25842
  }
25843
25843
  const Modal = Modal$1;
25844
25844
  Modal.useModal = useModal;
25845
25845
  Modal.info = function infoFn(props) {
25846
- return confirm$1(withInfo(props));
25846
+ return confirm(withInfo(props));
25847
25847
  };
25848
25848
  Modal.success = function successFn(props) {
25849
- return confirm$1(withSuccess(props));
25849
+ return confirm(withSuccess(props));
25850
25850
  };
25851
25851
  Modal.error = function errorFn(props) {
25852
- return confirm$1(withError(props));
25852
+ return confirm(withError(props));
25853
25853
  };
25854
25854
  Modal.warning = modalWarn;
25855
25855
  Modal.warn = modalWarn;
25856
25856
  Modal.confirm = function confirmFn(props) {
25857
- return confirm$1(withConfirm(props));
25857
+ return confirm(withConfirm(props));
25858
25858
  };
25859
25859
  Modal.destroyAll = function destroyAllFn() {
25860
25860
  while (destroyFns.length) {
@@ -82768,7 +82768,7 @@ const useCallStore = create$c()(
82768
82768
  token: "",
82769
82769
  // RTC令牌
82770
82770
  // LoginResponseData 字段
82771
- nickname: "头痛",
82771
+ nickname: "",
82772
82772
  // 用户昵称
82773
82773
  rtc_userid: "",
82774
82774
  // RTC用户ID
@@ -82947,7 +82947,9 @@ const useCallStore = create$c()(
82947
82947
  nickname,
82948
82948
  token: token2,
82949
82949
  rule,
82950
- waiting_mode
82950
+ waiting_mode,
82951
+ isVideoEnabled,
82952
+ isAudioEnabled
82951
82953
  } = callConfig;
82952
82954
  if (isUserExists(rtc_userid || "")) {
82953
82955
  console.warn(`本地用户 ${rtc_userid} 已存在,跳过添加`);
@@ -82964,8 +82966,8 @@ const useCallStore = create$c()(
82964
82966
  ...initCallUser,
82965
82967
  // 根据enter_muted配置设置初始音频状态
82966
82968
  // enter_muted: 0-否(音频开启) 1-是(音频关闭/静音)
82967
- isAudioEnabled: true,
82968
- isVideoEnabled: false,
82969
+ isAudioEnabled: isAudioEnabled ?? true,
82970
+ isVideoEnabled: isVideoEnabled ?? false,
82969
82971
  joinTime: Date.now(),
82970
82972
  waiting_mode_state: rule === "main" || !waiting_mode ? 0 : 1
82971
82973
  /* WAITING */
@@ -83025,6 +83027,17 @@ const useCallStore = create$c()(
83025
83027
  callCurrentUser: void 0,
83026
83028
  layoutMode: "main_plus_list",
83027
83029
  callUsersCurrentPageRef: 1,
83030
+ callConfig: {
83031
+ ...callConfig,
83032
+ isCall: false,
83033
+ // 连麦是否开启
83034
+ isAudioEnabled: true,
83035
+ // 音频是否开启
83036
+ isScreenEnabled: false,
83037
+ // 屏幕共享是否开启
83038
+ isVideoEnabled: false
83039
+ // 视频是否开启
83040
+ },
83028
83041
  mainCanvasId: callConfig.rule === "main" ? (callConfig == null ? void 0 : callConfig.drawing_board_id) || "" : ""
83029
83042
  });
83030
83043
  if (rtc) {
@@ -85556,9 +85569,6 @@ const tagList = [/* @__PURE__ */ jsxRuntimeExports.jsx(Tag, {
85556
85569
  }, 2), /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, {
85557
85570
  children: "已结束"
85558
85571
  }, 3)];
85559
- const {
85560
- confirm
85561
- } = Modal;
85562
85572
  const Head = ({
85563
85573
  canvasSetting,
85564
85574
  setCanvasSetting,
@@ -85568,6 +85578,7 @@ const Head = ({
85568
85578
  audioContextRef,
85569
85579
  audioDestinationRef
85570
85580
  }) => {
85581
+ const [modal, contextHolder] = useModal();
85571
85582
  const {
85572
85583
  data: data2,
85573
85584
  run: run2,
@@ -86117,7 +86128,7 @@ const Head = ({
86117
86128
  disabled: isLive,
86118
86129
  className: "antSelectSelectionItemColor",
86119
86130
  onChange: (e3) => {
86120
- confirm({
86131
+ modal.confirm({
86121
86132
  title: "切换画布设置后,当前画布上的内容和所有数据将被清除,是否确定切换?",
86122
86133
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {}),
86123
86134
  okText: "确定",
@@ -86175,7 +86186,7 @@ const Head = ({
86175
86186
  loading: rtmpLoading,
86176
86187
  danger: true,
86177
86188
  onClick: () => {
86178
- confirm({
86189
+ modal.confirm({
86179
86190
  title: "结束直播",
86180
86191
  content: "您即将结束直播并停止推流,是否确认。",
86181
86192
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {}),
@@ -86190,7 +86201,7 @@ const Head = ({
86190
86201
  }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
86191
86202
  type: "primary",
86192
86203
  onClick: () => {
86193
- confirm({
86204
+ modal.confirm({
86194
86205
  title: "开始直播",
86195
86206
  content: "是否确认开始直播,检查麦克风和摄像头状态正常,保证网络稳定。",
86196
86207
  icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {}),
@@ -86248,7 +86259,7 @@ const Head = ({
86248
86259
  children: "当前活动已在其他设备推流中,无法打开当前网页开播设置!"
86249
86260
  })]
86250
86261
  })
86251
- })]
86262
+ }), contextHolder]
86252
86263
  });
86253
86264
  };
86254
86265
  const Head$1 = React$2.memo(Head, (prevProps, nextProps) => {
@@ -194938,7 +194949,7 @@ class RtcClient {
194938
194949
  * @param {string} userId - 用户ID
194939
194950
  * @param {Function} callback - 回调函数,返回创建结果和设备状态
194940
194951
  */
194941
- async createLocalStream(userId, callback, renderMode = VideoRenderMode.RENDER_MODE_FIT) {
194952
+ async createLocalStream(userId, callback, { video = true, audio = true, renderMode = VideoRenderMode.RENDER_MODE_FIT }) {
194942
194953
  const devices = await this.getDevices();
194943
194954
  this.devicesSettings = devices.cameraId = devices.videoInputs[0].deviceId;
194944
194955
  this.devicesSettings = devices.microphoneId = devices.audioInputs[0].deviceId;
@@ -194986,24 +194997,26 @@ class RtcClient {
194986
194997
  contentHint: "motion"
194987
194998
  // 屏幕采集场景,流畅度优先
194988
194999
  });
194989
- if (this.streamOptions.audio && devices.audioInputs.length) {
195000
+ if (this.streamOptions.audio && devices.audioInputs.length && audio) {
194990
195001
  await this.engine.startAudioCapture(this.devicesSettings.microphoneId);
195002
+ await this.engine.publishStream(MediaType$1.AUDIO);
194991
195003
  } else {
194992
195004
  devicesStatus["audio"] = 0;
194993
195005
  this.engine.unpublishStream(MediaType$1.AUDIO);
194994
195006
  }
194995
- if (this.streamOptions.video && devices.videoInputs.length) {
195007
+ if (this.streamOptions.video && devices.videoInputs.length && video) {
194996
195008
  await this.engine.startVideoCapture(this.devicesSettings.cameraId);
195009
+ await this.engine.setLocalVideoMirrorType(MirrorType.MIRROR_TYPE_RENDER);
195010
+ this.engine.setLocalVideoPlayer(StreamIndex$1.STREAM_INDEX_MAIN, {
195011
+ renderDom: userId,
195012
+ userId,
195013
+ renderMode
195014
+ });
195015
+ await this.engine.publishStream(MediaType$1.VIDEO);
194997
195016
  } else {
194998
195017
  devicesStatus["video"] = 0;
194999
195018
  this.engine.unpublishStream(MediaType$1.VIDEO);
195000
195019
  }
195001
- await this.engine.setLocalVideoMirrorType(MirrorType.MIRROR_TYPE_RENDER);
195002
- this.engine.setLocalVideoPlayer(StreamIndex$1.STREAM_INDEX_MAIN, {
195003
- renderDom: userId,
195004
- userId,
195005
- renderMode
195006
- });
195007
195020
  if (callback) {
195008
195021
  callback({
195009
195022
  code: 0,
@@ -289436,7 +289449,7 @@ const ChatComponent = () => {
289436
289449
  if (res.success) {
289437
289450
  setLoading(false);
289438
289451
  setCurrent(res.data.pagination.current);
289439
- setInteractionList((list) => [...list, ...res.data.list]);
289452
+ setInteractionList((prevList) => [...prevList, ...res.data.list]);
289440
289453
  if (res.data.list.length < 10 || res.data.list.length === res.data.pagination.total || res.data.list.length + interactionList.length >= res.data.pagination.total) {
289441
289454
  setFinished(true);
289442
289455
  }
@@ -292039,7 +292052,6 @@ const RtcJoomRoom = reactExports.memo(({
292039
292052
  callCurrentUser,
292040
292053
  callUsers,
292041
292054
  callAudioMixing,
292042
- updateCallConfig,
292043
292055
  leaveRemoteUser,
292044
292056
  joinCallUser,
292045
292057
  updateCallUser,
@@ -292050,7 +292062,27 @@ const RtcJoomRoom = reactExports.memo(({
292050
292062
  handleRemoteUserPublishScreen,
292051
292063
  handleRemoteUserUnpublishScreen,
292052
292064
  getCallConfig
292053
- } = useCallStore();
292065
+ } = useCallStore((state) => ({
292066
+ callConfig: state.callConfig,
292067
+ rtc: state.rtc,
292068
+ getter: state.getter,
292069
+ setRtc: state.setRtc,
292070
+ mainCanvasId: state.mainCanvasId,
292071
+ callCurrentUser: state.callCurrentUser,
292072
+ callUsers: state.callUsers,
292073
+ callAudioMixing: state.callAudioMixing,
292074
+ updateCallConfig: state.updateCallConfig,
292075
+ leaveRemoteUser: state.leaveRemoteUser,
292076
+ joinCallUser: state.joinCallUser,
292077
+ updateCallUser: state.updateCallUser,
292078
+ leave: state.leave,
292079
+ toggleVideo: state.toggleVideo,
292080
+ toggleAudio: state.toggleAudio,
292081
+ setMainCanvasId: state.setMainCanvasId,
292082
+ handleRemoteUserPublishScreen: state.handleRemoteUserPublishScreen,
292083
+ handleRemoteUserUnpublishScreen: state.handleRemoteUserUnpublishScreen,
292084
+ getCallConfig: state.getCallConfig
292085
+ }));
292054
292086
  const playStatus = reactExports.useRef({});
292055
292087
  const errorMessageCache = reactExports.useRef({});
292056
292088
  const ERROR_DEBOUNCE_TIME = 3e3;
@@ -292123,15 +292155,16 @@ const RtcJoomRoom = reactExports.memo(({
292123
292155
  }
292124
292156
  }, [originalInviteData, handleInviteConfirm, hideInviteConfirm, setInviteLoading]);
292125
292157
  const handleUserPublishStream = reactExports.useCallback(async (stream) => {
292126
- var _a2, _b, _c2;
292127
- console.log("handleUserPublishStream");
292158
+ var _a2, _b, _c2, _d2, _e2;
292159
+ console.log("发布流", stream);
292128
292160
  const userId = stream.userId;
292129
292161
  if (stream.mediaType & MediaType$1.VIDEO) {
292162
+ await ((_b = (_a2 = getter().rtc) == null ? void 0 : _a2.engine) == null ? void 0 : _b.subscribeStream(userId, MediaType$1.VIDEO));
292130
292163
  updateCallUser(userId, {
292131
- isPublishStream: true
292164
+ isVideoEnabled: true
292132
292165
  });
292133
292166
  if (callConfig.rule === "main") {
292134
- await ((_a2 = getter().rtc) == null ? void 0 : _a2.engine.sendRoomMessage(JSON.stringify({
292167
+ await ((_c2 = getter().rtc) == null ? void 0 : _c2.engine.sendRoomMessage(JSON.stringify({
292135
292168
  type: "users",
292136
292169
  data: {
292137
292170
  users: callUsers.map((user) => ({
@@ -292149,10 +292182,9 @@ const RtcJoomRoom = reactExports.memo(({
292149
292182
  if (stream.mediaType & MediaType$1.AUDIO) {
292150
292183
  const cuser = callUsers.find((user) => user.rtc_userid === callConfig.rtc_userid);
292151
292184
  if ((cuser == null ? void 0 : cuser.waiting_mode_state) !== WaitingModeState.WAITING) {
292152
- console.log("当前不是等待用户 订阅 音频流", userId);
292153
- await ((_c2 = (_b = getter().rtc) == null ? void 0 : _b.engine) == null ? void 0 : _c2.subscribeStream(userId, MediaType$1.AUDIO));
292185
+ await ((_e2 = (_d2 = getter().rtc) == null ? void 0 : _d2.engine) == null ? void 0 : _e2.subscribeStream(userId, MediaType$1.AUDIO));
292154
292186
  updateCallUser(userId, {
292155
- isSubscribeAudio: true
292187
+ isAudioEnabled: true
292156
292188
  });
292157
292189
  if (callConfig.rule === "main") {
292158
292190
  setTimeout(() => {
@@ -292202,7 +292234,7 @@ const RtcJoomRoom = reactExports.memo(({
292202
292234
  });
292203
292235
  };
292204
292236
  const rtcJoin = async () => {
292205
- var _a2, _b, _c2, _d2;
292237
+ var _a2, _b, _c2;
292206
292238
  const localUser = joinCallUser();
292207
292239
  const {
292208
292240
  rtc_room_id,
@@ -292213,7 +292245,7 @@ const RtcJoomRoom = reactExports.memo(({
292213
292245
  rtc_userid,
292214
292246
  token: token2,
292215
292247
  appid
292216
- } = callConfig;
292248
+ } = getter().callConfig;
292217
292249
  if (!localUser) {
292218
292250
  staticMethods.error("加入房间失败,本地用户不存在");
292219
292251
  return;
@@ -292228,7 +292260,7 @@ const RtcJoomRoom = reactExports.memo(({
292228
292260
  camera: isVideoEnabled ?? false
292229
292261
  }), {
292230
292262
  // 自动发布本地音视频流
292231
- isAutoPublish: true,
292263
+ isAutoPublish: false,
292232
292264
  // 自动订阅房间内其他用户的音频流
292233
292265
  isAutoSubscribeAudio: false,
292234
292266
  // 自动订阅房间内其他用户的视频流
@@ -292247,15 +292279,14 @@ const RtcJoomRoom = reactExports.memo(({
292247
292279
  if (code === -1) {
292248
292280
  window.confirm(`创建本地流失败:${msg2}`);
292249
292281
  }
292250
- }, VideoRenderMode.RENDER_MODE_HIDDEN));
292282
+ }, {
292283
+ video: isVideoEnabled,
292284
+ audio: isAudioEnabled,
292285
+ renderMode: VideoRenderMode.RENDER_MODE_HIDDEN
292286
+ }));
292251
292287
  if (callConfig.rule === "sub" && callConfig.enter_muted) {
292252
292288
  await toggleAudio(false);
292253
- } else {
292254
- updateCallConfig({
292255
- isReady: true
292256
- });
292257
292289
  }
292258
- await ((_d2 = getter().rtc) == null ? void 0 : _d2.publishStream());
292259
292290
  if (callConfig.rule === "main") {
292260
292291
  console.log("主播 发布 音视频流 ");
292261
292292
  callAudioMixing();
@@ -292304,14 +292335,25 @@ const RtcJoomRoom = reactExports.memo(({
292304
292335
  video: callConfig.isVideoEnabled ?? false
292305
292336
  },
292306
292337
  handleUserPublishStream,
292307
- handleUserUnpublishStream: (event) => {
292308
- var _a2;
292338
+ handleUserUnpublishStream: async (event) => {
292339
+ var _a2, _b, _c2;
292340
+ console.log("取消发布流", event);
292309
292341
  const {
292310
292342
  userId,
292311
292343
  mediaType
292312
292344
  } = event;
292313
292345
  if (mediaType & MediaType$1.VIDEO) {
292314
292346
  (_a2 = getter().rtc) == null ? void 0 : _a2.setRemoteVideoPlayer(userId, void 0);
292347
+ await ((_b = getter().rtc) == null ? void 0 : _b.engine.unsubscribeStream(userId, MediaType$1.VIDEO));
292348
+ updateCallUser(userId, {
292349
+ isVideoEnabled: false
292350
+ });
292351
+ }
292352
+ if (mediaType & MediaType$1.AUDIO) {
292353
+ await ((_c2 = getter().rtc) == null ? void 0 : _c2.engine.unsubscribeStream(userId, MediaType$1.AUDIO));
292354
+ updateCallUser(userId, {
292355
+ isAudioEnabled: false
292356
+ });
292315
292357
  }
292316
292358
  },
292317
292359
  handleUserStartVideoCapture: (event) => {
@@ -292539,10 +292581,10 @@ const RtcJoomRoom = reactExports.memo(({
292539
292581
  }, [callConfig.isCall, callConfig.rtc_room_id, callConfig.rule]);
292540
292582
  reactExports.useEffect(() => {
292541
292583
  const handleAdmittedUser = async () => {
292542
- var _a2, _b, _c2, _d2, _e2;
292584
+ var _a2, _b, _c2, _d2, _e2, _f2;
292543
292585
  if (!mainCanvasId) {
292544
292586
  try {
292545
- await ((_a2 = getter().rtc) == null ? void 0 : _a2.createLocalStream(callConfig.rtc_userid, (res) => {
292587
+ await ((_c2 = getter().rtc) == null ? void 0 : _c2.createLocalStream(callConfig.rtc_userid, (res) => {
292546
292588
  const {
292547
292589
  code,
292548
292590
  msg: msg2
@@ -292550,13 +292592,17 @@ const RtcJoomRoom = reactExports.memo(({
292550
292592
  if (code === -1) {
292551
292593
  window.confirm(`创建本地流失败:${msg2}`);
292552
292594
  }
292553
- }, VideoRenderMode.RENDER_MODE_HIDDEN));
292595
+ }, {
292596
+ video: (_a2 = getter().callConfig) == null ? void 0 : _a2.isVideoEnabled,
292597
+ audio: (_b = getter().callConfig) == null ? void 0 : _b.isAudioEnabled,
292598
+ renderMode: VideoRenderMode.RENDER_MODE_HIDDEN
292599
+ }));
292554
292600
  } catch (error2) {
292555
292601
  console.error("准入 本地流创建失败:", error2);
292556
292602
  }
292557
292603
  } else {
292558
- await ((_b = getter().rtc) == null ? void 0 : _b.setLocalVideoPlayer(callConfig.rtc_userid, callConfig.rtc_userid, callConfig.rtc_userid, (callCurrentUser == null ? void 0 : callCurrentUser.device) === "mobile" ? VideoRenderMode.RENDER_MODE_HIDDEN : VideoRenderMode.RENDER_MODE_FIT));
292559
- await ((_c2 = getter().rtc) == null ? void 0 : _c2.setLocalVideoPlayer(callConfig.rtc_userid, callConfig.rtc_userid + "self", callConfig.rtc_userid + "self", VideoRenderMode.RENDER_MODE_FILL));
292604
+ await ((_d2 = getter().rtc) == null ? void 0 : _d2.setLocalVideoPlayer(callConfig.rtc_userid, callConfig.rtc_userid, callConfig.rtc_userid, (callCurrentUser == null ? void 0 : callCurrentUser.device) === "mobile" ? VideoRenderMode.RENDER_MODE_HIDDEN : VideoRenderMode.RENDER_MODE_FIT));
292605
+ await ((_e2 = getter().rtc) == null ? void 0 : _e2.setLocalVideoPlayer(callConfig.rtc_userid, callConfig.rtc_userid + "self", callConfig.rtc_userid + "self", VideoRenderMode.RENDER_MODE_FILL));
292560
292606
  access == null ? void 0 : access();
292561
292607
  }
292562
292608
  callUsers.forEach((user) => {
@@ -292571,13 +292617,7 @@ const RtcJoomRoom = reactExports.memo(({
292571
292617
  toggleAudio(false);
292572
292618
  }
292573
292619
  try {
292574
- await ((_d2 = getter().rtc) == null ? void 0 : _d2.publishStream());
292575
- console.log("准入 发布本地流成功");
292576
- } catch (error2) {
292577
- console.error("准入 发布本地流失败:", error2);
292578
- }
292579
- try {
292580
- await ((_e2 = getter().rtc) == null ? void 0 : _e2.engine.sendRoomMessage(JSON.stringify({
292620
+ await ((_f2 = getter().rtc) == null ? void 0 : _f2.engine.sendRoomMessage(JSON.stringify({
292581
292621
  type: "change_user",
292582
292622
  data: {
292583
292623
  user: {
@@ -294282,9 +294322,9 @@ const UserVideoContainer = reactExports.memo(({
294282
294322
  minHeight: "120px"
294283
294323
  },
294284
294324
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
294285
- className: " h-full relative",
294325
+ className: "w-full h-full relative",
294286
294326
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
294287
- className: " h-full bg-gray-800 flex items-center justify-center",
294327
+ className: "w-full h-full bg-gray-800 flex items-center justify-center",
294288
294328
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
294289
294329
  className: "h-full text-gray-400 text-sm",
294290
294330
  id: videoId
@@ -294602,16 +294642,16 @@ const VideoSwipeContainer = reactExports.memo(
294602
294642
  "div",
294603
294643
  {
294604
294644
  ref: containerRef,
294605
- className: `relative h-full overflow-hidden ${className}`,
294645
+ className: `relative w-full h-full overflow-hidden ${className}`,
294606
294646
  style: { touchAction: "none" },
294607
294647
  children: [
294608
294648
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
294609
294649
  "div",
294610
294650
  {
294611
- className: "flex h-full transition-transform duration-300 ease-out",
294651
+ className: "flex w-full h-full transition-transform duration-300 ease-out",
294612
294652
  style: slideContainerStyle,
294613
294653
  children: [
294614
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: " h-full flex-shrink-0 relative", children: [
294654
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full h-full flex-shrink-0 relative", children: [
294615
294655
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: " h-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(UserVideoContainer, { user: mainVideoUser, isSelected: true, videoId: mainVideoId }) }),
294616
294656
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-4 right-4 w-24 h-32 rounded-lg overflow-hidden shadow-lg border-2 border-white/20 z-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
294617
294657
  UserVideoContainer,
@@ -294623,7 +294663,7 @@ const VideoSwipeContainer = reactExports.memo(
294623
294663
  }
294624
294664
  ) })
294625
294665
  ] }),
294626
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: " h-full flex-shrink-0 overflow-hidden flex items-center justify-center relative", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
294666
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full flex-shrink-0 overflow-hidden flex items-center justify-center relative", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
294627
294667
  "div",
294628
294668
  {
294629
294669
  className: "w-full",
@@ -294806,7 +294846,6 @@ const MobileLive = reactExports.memo(({ className = "" }) => {
294806
294846
  const { setStatus } = useGuestStore((state) => ({
294807
294847
  setStatus: state.setStatus
294808
294848
  }));
294809
- useSdkStore((state) => state.callConfig.title);
294810
294849
  const [isBackCamera, setIsBackCamera] = reactExports.useState(false);
294811
294850
  const [showDeviceSettings, setShowDeviceSettings] = reactExports.useState(false);
294812
294851
  const [isDeviceSelected, setIsDeviceSelected] = reactExports.useState({
@@ -295197,294 +295236,301 @@ const LiveDetection = ({
295197
295236
  }, [step2]);
295198
295237
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295199
295238
  className: " h-full bg-#818384 flex items-center justify-center",
295200
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295201
- className: "w-720px h-600px flex items-center justify-between flex-col bg-#fff rounded p-7.5 gap-10",
295202
- children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295203
- className: "w-full flex justify-between h-10",
295204
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295205
- className: "text-18px",
295206
- children: "直播设备检测"
295207
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295208
- className: "cursor-pointer text-16px",
295209
- onClick: () => setShowHome(true),
295210
- children: "跳过检测"
295211
- })]
295212
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295213
- className: " flex-1 px-20",
295239
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ConfigProvider$1, {
295240
+ theme: {
295241
+ token: {
295242
+ colorPrimary: "#6672fc"
295243
+ }
295244
+ },
295245
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295246
+ className: "w-720px h-600px flex items-center justify-between flex-col bg-#fff rounded p-7.5 gap-10",
295214
295247
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295215
- className: "mb-10",
295248
+ className: "w-full flex justify-between h-10",
295249
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295250
+ className: "text-18px",
295251
+ children: "直播设备检测"
295252
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295253
+ className: "cursor-pointer text-16px",
295254
+ onClick: () => setShowHome(true),
295255
+ children: "跳过检测"
295256
+ })]
295257
+ }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295258
+ className: " flex-1 px-20",
295216
295259
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295217
- className: " flex justify-between items-center text-14px",
295260
+ className: "mb-10",
295218
295261
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295219
- className: "w-20 h-20 border border-#dfe1e5 border-solid rounded-full flex items-center justify-center relative",
295220
- style: {
295221
- lineHeight: 1
295222
- },
295223
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("svg", {
295224
- className: "icon",
295225
- viewBox: "0 0 1024 1024",
295226
- version: "1.1",
295227
- xmlns: "http://www.w3.org/2000/svg",
295228
- width: "34",
295229
- height: "34",
295230
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", {
295231
- d: "M544 896h127.936a31.968 31.968 0 1 1 0 64H352.064a31.968 31.968 0 1 1 0-64H480V766.56C300.576 750.4 160 599.616 160 416c0-194.4 157.6-352 352-352s352 157.6 352 352c0 183.616-140.576 334.4-320 350.56V896z m-32-192a288 288 0 1 0 0-576 288 288 0 0 0 0 576z m0-96a192 192 0 1 1 0-384 192 192 0 0 1 0 384z m0-64a128 128 0 1 0 0-256 128 128 0 0 0 0 256z",
295232
- fill: "#000000",
295233
- "p-id": "8460"
295262
+ className: " flex justify-between items-center text-14px",
295263
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295264
+ className: "w-20 h-20 border border-#dfe1e5 border-solid rounded-full flex items-center justify-center relative",
295265
+ style: {
295266
+ lineHeight: 1
295267
+ },
295268
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("svg", {
295269
+ className: "icon",
295270
+ viewBox: "0 0 1024 1024",
295271
+ version: "1.1",
295272
+ xmlns: "http://www.w3.org/2000/svg",
295273
+ width: "34",
295274
+ height: "34",
295275
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", {
295276
+ d: "M544 896h127.936a31.968 31.968 0 1 1 0 64H352.064a31.968 31.968 0 1 1 0-64H480V766.56C300.576 750.4 160 599.616 160 416c0-194.4 157.6-352 352-352s352 157.6 352 352c0 183.616-140.576 334.4-320 350.56V896z m-32-192a288 288 0 1 0 0-576 288 288 0 0 0 0 576z m0-96a192 192 0 1 1 0-384 192 192 0 0 1 0 384z m0-64a128 128 0 1 0 0-256 128 128 0 0 0 0 256z",
295277
+ fill: "#000000",
295278
+ "p-id": "8460"
295279
+ })
295280
+ }), deviceState.camera === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {
295281
+ className: "absolute text-#ff4d4f bottom-15px right-15px text-19px"
295282
+ }), deviceState.camera === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$o, {
295283
+ className: "absolute text-#52c41a bottom-15px right-15px text-19px"
295284
+ })]
295285
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295286
+ className: "w-94px h-1 bg-#eee"
295287
+ }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295288
+ className: "w-20 h-20 border border-#dfe1e5 border-solid rounded-full flex items-center justify-center relative",
295289
+ style: {
295290
+ lineHeight: 1
295291
+ },
295292
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1h, {
295293
+ className: `text-30px ${step2 >= 1 ? "text-#000" : "text-#ccc"}`
295294
+ }), deviceState.microphone === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {
295295
+ className: "absolute text-#ff4d4f bottom-15px right-15px text-19px"
295296
+ }), deviceState.microphone === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$o, {
295297
+ className: "absolute text-#52c41a bottom-15px right-15px text-19px"
295298
+ })]
295299
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295300
+ className: "w-94px h-1 bg-#eee"
295301
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295302
+ className: "w-20 h-20 border border-#dfe1e5 border-solid rounded-full flex items-center justify-center",
295303
+ style: {
295304
+ lineHeight: 1
295305
+ },
295306
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {
295307
+ className: `text-30px ${step2 >= 2 ? "text-#000" : "text-#ccc"}`
295234
295308
  })
295235
- }), deviceState.camera === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {
295236
- className: "absolute text-#ff4d4f bottom-15px right-15px text-19px"
295237
- }), deviceState.camera === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$o, {
295238
- className: "absolute text-#52c41a bottom-15px right-15px text-19px"
295239
295309
  })]
295240
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295241
- className: "w-94px h-1 bg-#eee"
295242
295310
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295243
- className: "w-20 h-20 border border-#dfe1e5 border-solid rounded-full flex items-center justify-center relative",
295244
- style: {
295245
- lineHeight: 1
295246
- },
295247
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1h, {
295248
- className: `text-30px ${step2 >= 1 ? "text-#000" : "text-#ccc"}`
295249
- }), deviceState.microphone === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$1r, {
295250
- className: "absolute text-#ff4d4f bottom-15px right-15px text-19px"
295251
- }), deviceState.microphone === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$o, {
295252
- className: "absolute text-#52c41a bottom-15px right-15px text-19px"
295311
+ className: " flex justify-between items-center mt-4 text-14px text-#000",
295312
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295313
+ className: "w-20 flex items-center justify-center",
295314
+ style: {
295315
+ lineHeight: 1
295316
+ },
295317
+ children: "摄像头"
295318
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295319
+ className: `w-20 flex items-center justify-center ${step2 >= 1 ? "" : "text-#ccc"}`,
295320
+ style: {
295321
+ lineHeight: 1
295322
+ },
295323
+ children: "麦克风"
295324
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295325
+ className: `w-20 flex items-center justify-center ${step2 >= 2 ? "" : "text-#ccc"}`,
295326
+ style: {
295327
+ lineHeight: 1
295328
+ },
295329
+ children: "检测结果"
295253
295330
  })]
295254
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295255
- className: "w-94px h-1 bg-#eee"
295256
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295257
- className: "w-20 h-20 border border-#dfe1e5 border-solid rounded-full flex items-center justify-center",
295258
- style: {
295259
- lineHeight: 1
295331
+ })]
295332
+ }), step2 === 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295333
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295334
+ label: "选择摄像头",
295335
+ labelCol: {
295336
+ span: 4
295260
295337
  },
295261
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$n, {
295262
- className: `text-30px ${step2 >= 2 ? "text-#000" : "text-#ccc"}`
295338
+ colon: false,
295339
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select$1, {
295340
+ onChange: async (deviceId) => {
295341
+ await previewCamera(deviceId);
295342
+ },
295343
+ placeholder: "请选择摄像头",
295344
+ options: videoDevices
295345
+ })
295346
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295347
+ label: " ",
295348
+ labelCol: {
295349
+ span: 4
295350
+ },
295351
+ colon: false,
295352
+ wrapperCol: {
295353
+ span: 20
295354
+ },
295355
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("video", {
295356
+ id: "previewCameraVideo",
295357
+ className: "w-180px aspect-video block bg-black",
295358
+ controls: false
295263
295359
  })
295264
295360
  })]
295265
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295266
- className: " flex justify-between items-center mt-4 text-14px text-#000",
295267
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295268
- className: "w-20 flex items-center justify-center",
295269
- style: {
295270
- lineHeight: 1
295361
+ }), step2 === 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295362
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295363
+ label: "选择麦克风",
295364
+ labelCol: {
295365
+ span: 4
295271
295366
  },
295272
- children: "摄像头"
295273
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295274
- className: `w-20 flex items-center justify-center ${step2 >= 1 ? "" : "text-#ccc"}`,
295275
- style: {
295276
- lineHeight: 1
295367
+ colon: false,
295368
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select$1, {
295369
+ onChange: async (deviceId) => {
295370
+ await previewMicrophone(deviceId);
295371
+ },
295372
+ placeholder: "请选择麦克风",
295373
+ options: audioDevices
295374
+ })
295375
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295376
+ label: " ",
295377
+ labelCol: {
295378
+ span: 4
295277
295379
  },
295278
- children: "麦克风"
295279
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295280
- className: `w-20 flex items-center justify-center ${step2 >= 2 ? "" : "text-#ccc"}`,
295281
- style: {
295282
- lineHeight: 1
295380
+ colon: false,
295381
+ wrapperCol: {
295382
+ span: 20
295283
295383
  },
295284
- children: "检测结果"
295384
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295385
+ className: " h-100px flex flex-col",
295386
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("canvas", {
295387
+ id: "volume-canvas",
295388
+ width: "400",
295389
+ height: "200",
295390
+ className: " h-80px"
295391
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295392
+ className: "h-20px",
295393
+ style: {
295394
+ lineHeight: "20px"
295395
+ },
295396
+ children: "发声后能否看到音量条波动?"
295397
+ })]
295398
+ })
295285
295399
  })]
295286
- })]
295287
- }), step2 === 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295288
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295289
- label: "选择摄像头",
295290
- labelCol: {
295291
- span: 4
295292
- },
295293
- colon: false,
295294
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select$1, {
295295
- onChange: async (deviceId) => {
295296
- await previewCamera(deviceId);
295400
+ }), step2 === 0 || step2 === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
295401
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295402
+ label: " ",
295403
+ labelCol: {
295404
+ span: 4
295297
295405
  },
295298
- placeholder: "请选择摄像头",
295299
- options: videoDevices
295300
- })
295301
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295302
- label: " ",
295303
- labelCol: {
295304
- span: 4
295305
- },
295306
- colon: false,
295307
- wrapperCol: {
295308
- span: 20
295309
- },
295310
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("video", {
295311
- id: "previewCameraVideo",
295312
- className: "w-180px aspect-video block bg-black",
295313
- controls: false
295314
- })
295315
- })]
295316
- }), step2 === 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295317
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295318
- label: "选择麦克风",
295319
- labelCol: {
295320
- span: 4
295321
- },
295322
- colon: false,
295323
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Select$1, {
295324
- onChange: async (deviceId) => {
295325
- await previewMicrophone(deviceId);
295406
+ colon: false,
295407
+ wrapperCol: {
295408
+ span: 20
295326
295409
  },
295327
- placeholder: "请选择麦克风",
295328
- options: audioDevices
295410
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295411
+ className: "text-14px text-#949494 w-full",
295412
+ children: "提示:如果是第一次检测,请打开浏览器访问摄像头和麦克风权限;请确保当前链接安全协议为https"
295413
+ })
295329
295414
  })
295330
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295331
- label: " ",
295332
- labelCol: {
295333
- span: 4
295334
- },
295335
- colon: false,
295336
- wrapperCol: {
295337
- span: 20
295338
- },
295339
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295340
- className: " h-100px flex flex-col",
295341
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("canvas", {
295342
- id: "volume-canvas",
295343
- width: "400",
295344
- height: "200",
295345
- className: " h-80px"
295346
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295347
- className: "h-20px",
295348
- style: {
295349
- lineHeight: "20px"
295350
- },
295351
- children: "发声后能否看到音量条波动?"
295415
+ }) : null, step2 === 2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295416
+ className: " h-200px flex items-center justify-center flex-col bg-#f5f5f5 text-14px gap-4",
295417
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295418
+ className: "w-250px h-20px flex items-center justify-between",
295419
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295420
+ children: "摄像头"
295421
+ }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295422
+ children: [deviceState.camera === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295423
+ className: "text-#ff0000",
295424
+ children: "异常"
295425
+ }), deviceState.camera === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295426
+ children: "正常"
295427
+ })]
295352
295428
  })]
295353
- })
295354
- })]
295355
- }), step2 === 0 || step2 === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
295356
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Form2.Item, {
295357
- label: " ",
295358
- labelCol: {
295359
- span: 4
295360
- },
295361
- colon: false,
295362
- wrapperCol: {
295363
- span: 20
295364
- },
295365
- children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295366
- className: "text-14px text-#949494 w-full",
295367
- children: "提示:如果是第一次检测,请打开浏览器访问摄像头和麦克风权限;请确保当前链接安全协议为https"
295368
- })
295369
- })
295370
- }) : null, step2 === 2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295371
- className: " h-200px flex items-center justify-center flex-col bg-#f5f5f5 text-14px gap-4",
295372
- children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295373
- className: "w-250px h-20px flex items-center justify-between",
295374
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295375
- children: "摄像头"
295376
295429
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295377
- children: [deviceState.camera === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295378
- className: "text-#ff0000",
295379
- children: "异常"
295380
- }), deviceState.camera === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295381
- children: "正常"
295430
+ className: "w-250px h-20px flex items-center justify-between",
295431
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295432
+ children: "麦克风"
295433
+ }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295434
+ children: [deviceState.microphone === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295435
+ className: "text-#ff0000",
295436
+ children: "异常"
295437
+ }), deviceState.microphone === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295438
+ children: "正常"
295439
+ })]
295382
295440
  })]
295383
- })]
295384
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295385
- className: "w-250px h-20px flex items-center justify-between",
295386
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295387
- children: "麦克风"
295388
295441
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295389
- children: [deviceState.microphone === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295390
- className: "text-#ff0000",
295391
- children: "异常"
295392
- }), deviceState.microphone === 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295393
- children: "正常"
295442
+ className: "w-250px h-20px flex items-center justify-between",
295443
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295444
+ children: "网速"
295445
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295446
+ children: deviceState.onLine ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295447
+ children: "正常"
295448
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295449
+ className: "text-#ff0000",
295450
+ children: "异常"
295451
+ })
295394
295452
  })]
295395
- })]
295396
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295397
- className: "w-250px h-20px flex items-center justify-between",
295398
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295399
- children: "网速"
295400
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295401
- children: deviceState.onLine ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295453
+ }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295454
+ className: "w-250px h-20px flex items-center justify-between",
295455
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295456
+ children: "浏览器"
295457
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295402
295458
  children: "正常"
295403
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
295404
- className: "text-#ff0000",
295405
- children: "异常"
295406
- })
295407
- })]
295408
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295409
- className: "w-250px h-20px flex items-center justify-between",
295410
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295411
- children: "浏览器"
295412
- }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
295413
- children: "正常"
295459
+ })]
295414
295460
  })]
295415
295461
  })]
295416
- })]
295417
- }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295418
- className: " flex items-center gap-3 justify-center",
295419
- children: [step2 === 0 || step2 === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295420
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295421
- onClick: () => {
295422
- if (step2 === 0) {
295423
- setDeviceState((old) => {
295424
- return {
295425
- ...old,
295426
- camera: 0
295427
- };
295428
- });
295429
- }
295430
- if (step2 === 1) {
295431
- setDeviceState((old) => {
295432
- return {
295433
- ...old,
295434
- microphone: 0
295435
- };
295462
+ }), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
295463
+ className: " flex items-center gap-3 justify-center",
295464
+ children: [step2 === 0 || step2 === 1 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295465
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295466
+ onClick: () => {
295467
+ if (step2 === 0) {
295468
+ setDeviceState((old) => {
295469
+ return {
295470
+ ...old,
295471
+ camera: 0
295472
+ };
295473
+ });
295474
+ }
295475
+ if (step2 === 1) {
295476
+ setDeviceState((old) => {
295477
+ return {
295478
+ ...old,
295479
+ microphone: 0
295480
+ };
295481
+ });
295482
+ }
295483
+ setStep((old) => {
295484
+ return old + 1;
295436
295485
  });
295437
- }
295438
- setStep((old) => {
295439
- return old + 1;
295440
- });
295441
- },
295442
- children: "看不到"
295443
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295444
- type: "primary",
295445
- onClick: () => {
295446
- if (step2 === 0) {
295447
- setDeviceState((old) => {
295448
- return {
295449
- ...old,
295450
- camera: 1
295451
- };
295486
+ },
295487
+ children: "看不到"
295488
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295489
+ type: "primary",
295490
+ onClick: () => {
295491
+ if (step2 === 0) {
295492
+ setDeviceState((old) => {
295493
+ return {
295494
+ ...old,
295495
+ camera: 1
295496
+ };
295497
+ });
295498
+ }
295499
+ if (step2 === 1) {
295500
+ setDeviceState((old) => {
295501
+ return {
295502
+ ...old,
295503
+ microphone: 1
295504
+ };
295505
+ });
295506
+ }
295507
+ setStep((old) => {
295508
+ return old + 1;
295452
295509
  });
295453
- }
295454
- if (step2 === 1) {
295510
+ },
295511
+ children: "可以看到"
295512
+ })]
295513
+ }) : null, step2 === 2 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295514
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295515
+ onClick: () => {
295516
+ setStep(0);
295455
295517
  setDeviceState((old) => {
295456
295518
  return {
295457
295519
  ...old,
295458
- microphone: 1
295520
+ camera: null,
295521
+ microphone: null
295459
295522
  };
295460
295523
  });
295461
- }
295462
- setStep((old) => {
295463
- return old + 1;
295464
- });
295465
- },
295466
- children: "可以看到"
295467
- })]
295468
- }) : null, step2 === 2 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
295469
- children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295470
- onClick: () => {
295471
- setStep(0);
295472
- setDeviceState((old) => {
295473
- return {
295474
- ...old,
295475
- camera: null,
295476
- microphone: null
295477
- };
295478
- });
295479
- },
295480
- children: "重新检测"
295481
- }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295482
- type: "primary",
295483
- onClick: () => setShowHome(true),
295484
- children: "去直播"
295524
+ },
295525
+ children: "重新检测"
295526
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, {
295527
+ type: "primary",
295528
+ onClick: () => setShowHome(true),
295529
+ children: "去直播"
295530
+ })]
295485
295531
  })]
295486
295532
  })]
295487
- })]
295533
+ })
295488
295534
  })
295489
295535
  });
295490
295536
  };