mdm-client 1.0.0

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.
Files changed (262) hide show
  1. package/README.md +92 -0
  2. package/index.js +35 -0
  3. package/package.json +41 -0
  4. package/src/App.vue +246 -0
  5. package/src/assets/audio/moon_light.ogg +0 -0
  6. package/src/assets/font/DINPro-Medium.otf +0 -0
  7. package/src/assets/font/FZZhengHeiS-B-GB.ttf +0 -0
  8. package/src/assets/font/PingFang Regular.otf +0 -0
  9. package/src/assets/font/SourceHanSansCN-Regular.otf +0 -0
  10. package/src/assets/image/common/add_other_icon.png +0 -0
  11. package/src/assets/image/common/bottomFrame.png +0 -0
  12. package/src/assets/image/common/broadcastOn.png +0 -0
  13. package/src/assets/image/common/broadcastTask.png +0 -0
  14. package/src/assets/image/common/call.png +0 -0
  15. package/src/assets/image/common/call_user_mic_off_icon.png +0 -0
  16. package/src/assets/image/common/call_user_mic_on_icon.png +0 -0
  17. package/src/assets/image/common/cam-off.png +0 -0
  18. package/src/assets/image/common/cam-on.png +0 -0
  19. package/src/assets/image/common/cam_off_small.png +0 -0
  20. package/src/assets/image/common/camera.png +0 -0
  21. package/src/assets/image/common/cameraBtn1.png +0 -0
  22. package/src/assets/image/common/cameraBtn2.png +0 -0
  23. package/src/assets/image/common/cameraBtn3.png +0 -0
  24. package/src/assets/image/common/cameraBtn4.png +0 -0
  25. package/src/assets/image/common/cameraBtn5.png +0 -0
  26. package/src/assets/image/common/cameraBtn6.png +0 -0
  27. package/src/assets/image/common/cameraBtn7.png +0 -0
  28. package/src/assets/image/common/cameraClose.png +0 -0
  29. package/src/assets/image/common/cameraFull.png +0 -0
  30. package/src/assets/image/common/cameraOff.png +0 -0
  31. package/src/assets/image/common/cancel_icon.png +0 -0
  32. package/src/assets/image/common/card_blue.png +0 -0
  33. package/src/assets/image/common/card_grey.png +0 -0
  34. package/src/assets/image/common/chosen_icon.png +0 -0
  35. package/src/assets/image/common/chosen_icon_slided.png +0 -0
  36. package/src/assets/image/common/custom_layout_equipment_avatar.png +0 -0
  37. package/src/assets/image/common/custom_layout_user_avatar.png +0 -0
  38. package/src/assets/image/common/default_avatar.png +0 -0
  39. package/src/assets/image/common/default_avatar_mini.png +0 -0
  40. package/src/assets/image/common/delete-number.svg +3 -0
  41. package/src/assets/image/common/deviceIcon.png +0 -0
  42. package/src/assets/image/common/fourOff.png +0 -0
  43. package/src/assets/image/common/fourOn.png +0 -0
  44. package/src/assets/image/common/group.png +0 -0
  45. package/src/assets/image/common/groupManage.png +0 -0
  46. package/src/assets/image/common/histroy_meeting_icon.png +0 -0
  47. package/src/assets/image/common/icon-device.svg +12 -0
  48. package/src/assets/image/common/icon-monitor.svg +12 -0
  49. package/src/assets/image/common/icon-/345/260/217/347/250/213/345/272/217.svg +5 -0
  50. package/src/assets/image/common/icon-/345/272/224/347/255/224.svg +5 -0
  51. package/src/assets/image/common/icon-/350/247/206/351/242/221.svg +7 -0
  52. package/src/assets/image/common/input_search_icon.png +0 -0
  53. package/src/assets/image/common/launch_icon.png +0 -0
  54. package/src/assets/image/common/layout-active1.png +0 -0
  55. package/src/assets/image/common/layout-active2.png +0 -0
  56. package/src/assets/image/common/layout1.png +0 -0
  57. package/src/assets/image/common/layout2.png +0 -0
  58. package/src/assets/image/common/loading.png +0 -0
  59. package/src/assets/image/common/login/checked_icon.png +0 -0
  60. package/src/assets/image/common/login/login_bg.png +0 -0
  61. package/src/assets/image/common/login/login_form_left_icon.png +0 -0
  62. package/src/assets/image/common/login/pwd_icon.png +0 -0
  63. package/src/assets/image/common/login/user_icon.png +0 -0
  64. package/src/assets/image/common/login/verify_icon.png +0 -0
  65. package/src/assets/image/common/logo.png +0 -0
  66. package/src/assets/image/common/ltypeOff.png +0 -0
  67. package/src/assets/image/common/ltypeOn.png +0 -0
  68. package/src/assets/image/common/manager_cam_off_icon.png +0 -0
  69. package/src/assets/image/common/manager_mic_off_icon.png +0 -0
  70. package/src/assets/image/common/map-cicle-icon.svg +6 -0
  71. package/src/assets/image/common/map-icon-search-info.svg +11 -0
  72. package/src/assets/image/common/map-location.svg +37 -0
  73. package/src/assets/image/common/map.png +0 -0
  74. package/src/assets/image/common/mic-off.png +0 -0
  75. package/src/assets/image/common/mic-on.png +0 -0
  76. package/src/assets/image/common/mic_off_small.png +0 -0
  77. package/src/assets/image/common/minum_cam_off_icon.png +0 -0
  78. package/src/assets/image/common/minum_cam_on_icon.png +0 -0
  79. package/src/assets/image/common/minum_expand_icon.png +0 -0
  80. package/src/assets/image/common/minum_mic_off_icon.png +0 -0
  81. package/src/assets/image/common/minum_mic_on_icon.png +0 -0
  82. package/src/assets/image/common/minum_reset_icon.png +0 -0
  83. package/src/assets/image/common/minum_slide_icon.png +0 -0
  84. package/src/assets/image/common/more_icon.png +0 -0
  85. package/src/assets/image/common/mute.png +0 -0
  86. package/src/assets/image/common/newFolder.png +0 -0
  87. package/src/assets/image/common/newTask.png +0 -0
  88. package/src/assets/image/common/nineOff.png +0 -0
  89. package/src/assets/image/common/nineOn.png +0 -0
  90. package/src/assets/image/common/none.png +0 -0
  91. package/src/assets/image/common/offline.png +0 -0
  92. package/src/assets/image/common/oneOff.png +0 -0
  93. package/src/assets/image/common/oneOn.png +0 -0
  94. package/src/assets/image/common/online.png +0 -0
  95. package/src/assets/image/common/output_off_small.png +0 -0
  96. package/src/assets/image/common/playOff.png +0 -0
  97. package/src/assets/image/common/playOn.png +0 -0
  98. package/src/assets/image/common/playStop.png +0 -0
  99. package/src/assets/image/common/preview_icon.png +0 -0
  100. package/src/assets/image/common/preview_meet_icon.png +0 -0
  101. package/src/assets/image/common/scan-map.png +0 -0
  102. package/src/assets/image/common/screen_blue.png +0 -0
  103. package/src/assets/image/common/screen_gray.png +0 -0
  104. package/src/assets/image/common/screen_white.png +0 -0
  105. package/src/assets/image/common/select_item_check.png +0 -0
  106. package/src/assets/image/common/select_item_checked.png +0 -0
  107. package/src/assets/image/common/selector.png +0 -0
  108. package/src/assets/image/common/selectorOn.png +0 -0
  109. package/src/assets/image/common/share_icon.png +0 -0
  110. package/src/assets/image/common/signal_good.png +0 -0
  111. package/src/assets/image/common/signal_poor.png +0 -0
  112. package/src/assets/image/common/sixteenOff.png +0 -0
  113. package/src/assets/image/common/sixteenOn.png +0 -0
  114. package/src/assets/image/common/slide-bth-expand.png +0 -0
  115. package/src/assets/image/common/slide_btn.png +0 -0
  116. package/src/assets/image/common/speak.png +0 -0
  117. package/src/assets/image/common/speakOn.png +0 -0
  118. package/src/assets/image/common/speaker-off.png +0 -0
  119. package/src/assets/image/common/speaker-on.png +0 -0
  120. package/src/assets/image/common/speaking.png +0 -0
  121. package/src/assets/image/common/speed-left.svg +5 -0
  122. package/src/assets/image/common/speed-right.svg +5 -0
  123. package/src/assets/image/common/tree_checked_icon.png +0 -0
  124. package/src/assets/image/common/tree_expand_icon.png +0 -0
  125. package/src/assets/image/common/tree_slide_icon.png +0 -0
  126. package/src/assets/image/common/tree_uncheck_icon.png +0 -0
  127. package/src/assets/image/common/unchosen_icon.png +0 -0
  128. package/src/assets/image/common/up.png +0 -0
  129. package/src/assets/image/common/volume.png +0 -0
  130. package/src/assets/image/common/warning.png +0 -0
  131. package/src/assets/image/screenBlue/a1.png +0 -0
  132. package/src/assets/image/screenBlue/a2.png +0 -0
  133. package/src/assets/image/screenBlue/a3.png +0 -0
  134. package/src/assets/image/screenBlue/a4.png +0 -0
  135. package/src/assets/image/screenBlue/a5.png +0 -0
  136. package/src/assets/image/screenBlue/a6.png +0 -0
  137. package/src/assets/image/screenBlue/add.png +0 -0
  138. package/src/assets/image/screenBlue/add_group_icon.png +0 -0
  139. package/src/assets/image/screenBlue/add_to_group_icon.png +0 -0
  140. package/src/assets/image/screenBlue/arrow_icon.png +0 -0
  141. package/src/assets/image/screenBlue/audio_level_icon.png +0 -0
  142. package/src/assets/image/screenBlue/b1.png +0 -0
  143. package/src/assets/image/screenBlue/b2.png +0 -0
  144. package/src/assets/image/screenBlue/b3.png +0 -0
  145. package/src/assets/image/screenBlue/b4.png +0 -0
  146. package/src/assets/image/screenBlue/b5.png +0 -0
  147. package/src/assets/image/screenBlue/b6.png +0 -0
  148. package/src/assets/image/screenBlue/bottom_footer_bg.png +0 -0
  149. package/src/assets/image/screenBlue/call_clear_icon.png +0 -0
  150. package/src/assets/image/screenBlue/call_duration_icon.png +0 -0
  151. package/src/assets/image/screenBlue/call_fullscreen_icon.png +0 -0
  152. package/src/assets/image/screenBlue/call_mini_icon.png +0 -0
  153. package/src/assets/image/screenBlue/call_video_icon.png +0 -0
  154. package/src/assets/image/screenBlue/call_voice_icon.png +0 -0
  155. package/src/assets/image/screenBlue/cam_on_small.png +0 -0
  156. package/src/assets/image/screenBlue/close_icon.png +0 -0
  157. package/src/assets/image/screenBlue/copy-icon.png +0 -0
  158. package/src/assets/image/screenBlue/custom_layout_drag_icon.png +0 -0
  159. package/src/assets/image/screenBlue/custom_layout_grid16_active_icon.png +0 -0
  160. package/src/assets/image/screenBlue/custom_layout_grid16_icon.png +0 -0
  161. package/src/assets/image/screenBlue/custom_layout_grid4_active_icon.png +0 -0
  162. package/src/assets/image/screenBlue/custom_layout_grid4_icon.png +0 -0
  163. package/src/assets/image/screenBlue/custom_layout_grid9_active_icon.png +0 -0
  164. package/src/assets/image/screenBlue/custom_layout_grid9_icon.png +0 -0
  165. package/src/assets/image/screenBlue/custom_layout_header_icon.png +0 -0
  166. package/src/assets/image/screenBlue/custom_layout_placeholder_bg.png +0 -0
  167. package/src/assets/image/screenBlue/custom_layout_refresh_icon.png +0 -0
  168. package/src/assets/image/screenBlue/custom_layout_rightside_active_icon.png +0 -0
  169. package/src/assets/image/screenBlue/custom_layout_rightside_icon.png +0 -0
  170. package/src/assets/image/screenBlue/custom_layout_ring_active_icon.png +0 -0
  171. package/src/assets/image/screenBlue/custom_layout_ring_icon.png +0 -0
  172. package/src/assets/image/screenBlue/custom_layout_topside_active_icon.png +0 -0
  173. package/src/assets/image/screenBlue/custom_layout_topside_icon.png +0 -0
  174. package/src/assets/image/screenBlue/date_picker_icon.png +0 -0
  175. package/src/assets/image/screenBlue/dialog_check_icon.png +0 -0
  176. package/src/assets/image/screenBlue/emoji-logo.png +0 -0
  177. package/src/assets/image/screenBlue/header_alert_icon.png +0 -0
  178. package/src/assets/image/screenBlue/manager_cam_on_icon.png +0 -0
  179. package/src/assets/image/screenBlue/manager_mic_on_icon.png +0 -0
  180. package/src/assets/image/screenBlue/manager_more_icon.png +0 -0
  181. package/src/assets/image/screenBlue/meeting_board_bg.png +0 -0
  182. package/src/assets/image/screenBlue/meeting_chat_emoji_icon.png +0 -0
  183. package/src/assets/image/screenBlue/meeting_chat_icon.png +0 -0
  184. package/src/assets/image/screenBlue/meeting_chat_image_icon.png +0 -0
  185. package/src/assets/image/screenBlue/meeting_chat_logo.png +0 -0
  186. package/src/assets/image/screenBlue/meeting_copy_icon.png +0 -0
  187. package/src/assets/image/screenBlue/meeting_invite_icon.png +0 -0
  188. package/src/assets/image/screenBlue/meeting_layout_icon.png +0 -0
  189. package/src/assets/image/screenBlue/meeting_member_icon.png +0 -0
  190. package/src/assets/image/screenBlue/meeting_mode_icon.png +0 -0
  191. package/src/assets/image/screenBlue/meeting_record_icon.png +0 -0
  192. package/src/assets/image/screenBlue/meeting_setting_icon.png +0 -0
  193. package/src/assets/image/screenBlue/meeting_share_icon.png +0 -0
  194. package/src/assets/image/screenBlue/meeting_slide_small_icon.png +0 -0
  195. package/src/assets/image/screenBlue/mic_on_small.png +0 -0
  196. package/src/assets/image/screenBlue/module_bg1.png +0 -0
  197. package/src/assets/image/screenBlue/module_bg2.png +0 -0
  198. package/src/assets/image/screenBlue/monitor/circle data.png +0 -0
  199. package/src/assets/image/screenBlue/monitor/circle.png +0 -0
  200. package/src/assets/image/screenBlue/output_on_small.png +0 -0
  201. package/src/assets/image/screenBlue/page_bg.png +0 -0
  202. package/src/assets/image/screenBlue/pic-logo.png +0 -0
  203. package/src/assets/image/screenBlue/preview_date_icon.png +0 -0
  204. package/src/assets/image/screenBlue/preview_empty_icon.png +0 -0
  205. package/src/assets/image/screenBlue/preview_more_icon.png +0 -0
  206. package/src/assets/image/screenBlue/receive_hang_off_icon.png +0 -0
  207. package/src/assets/image/screenBlue/receive_hang_on_icon.png +0 -0
  208. package/src/assets/image/screenBlue/receive_video_icon.png +0 -0
  209. package/src/assets/image/screenBlue/receive_voice_icon.png +0 -0
  210. package/src/assets/image/screenBlue/send-logo.png +0 -0
  211. package/src/assets/image/screenBlue/slide_menu_bg.png +0 -0
  212. package/src/assets/image/screenBlue/top_header_bg.png +0 -0
  213. package/src/assets/image/screenBlue/yq.png +0 -0
  214. package/src/assets/json/emoji.json +222 -0
  215. package/src/assets/style/base.scss +217 -0
  216. package/src/assets/style/elForm.scss +80 -0
  217. package/src/assets/style/font.scss +16 -0
  218. package/src/assets/style/index.scss +5 -0
  219. package/src/assets/style/math.scss +11 -0
  220. package/src/assets/style/mixin.scss +69 -0
  221. package/src/components/LiveCallBoard/LiveCallBoard.vue +237 -0
  222. package/src/components/LiveInviteReceive/LiveInviteReceive.vue +150 -0
  223. package/src/components/LiveMulti/LiveMulti.vue +303 -0
  224. package/src/components/LiveMultipleMeeting/LiveMultipleMeeting.vue +4469 -0
  225. package/src/components/LiveMultipleMeeting/style/index.scss +337 -0
  226. package/src/components/LivePoint/LivePoint.vue +372 -0
  227. package/src/components/LivePointMeeting/LivePointMeeting.vue +1134 -0
  228. package/src/components/LivePointMeeting/style/index.scss +202 -0
  229. package/src/components/MeetingReadyDialog/MeetingReadyDialog.vue +583 -0
  230. package/src/components/MiniumVideoDialog/MiniumVideoDialog.vue +449 -0
  231. package/src/components/other/LayoutPlaceholder.vue +184 -0
  232. package/src/components/other/addressBook.vue +1121 -0
  233. package/src/components/other/appointDialog.vue +208 -0
  234. package/src/components/other/callBoard.vue +191 -0
  235. package/src/components/other/chatArea.vue +727 -0
  236. package/src/components/other/customGroupDialog.vue +180 -0
  237. package/src/components/other/customLayout.vue +1112 -0
  238. package/src/components/other/editGroupDialog.vue +290 -0
  239. package/src/components/other/inviteNonContactDialog.vue +160 -0
  240. package/src/components/other/layoutSwitch.vue +183 -0
  241. package/src/components/other/leaveOptionDialog.vue +90 -0
  242. package/src/components/other/memberManage.vue +502 -0
  243. package/src/components/other/moreOptionDialog.vue +291 -0
  244. package/src/components/other/screenShareBoard.vue +121 -0
  245. package/src/components/other/selectDialog.vue +279 -0
  246. package/src/components/other/selectSpecialDialog.vue +234 -0
  247. package/src/components/other/settingDialog.vue +756 -0
  248. package/src/components/other/themeDialog.vue +180 -0
  249. package/src/components/other/updateNameDialog.vue +162 -0
  250. package/src/directive/clickOutside.js +58 -0
  251. package/src/directive/drag.js +165 -0
  252. package/src/directive/scale.js +22 -0
  253. package/src/directive/throttle.js +77 -0
  254. package/src/main.js +21 -0
  255. package/src/request/index.js +27 -0
  256. package/src/utils/api.js +82 -0
  257. package/src/utils/index.js +4 -0
  258. package/src/utils/livekit/live-client-esm-old.js +1 -0
  259. package/src/utils/livekit/live-client-esm.js +1 -0
  260. package/src/utils/message.js +24 -0
  261. package/src/utils/mitt.js +4 -0
  262. package/src/utils/tool.js +154 -0
@@ -0,0 +1,583 @@
1
+ <template>
2
+ <div class="dialog">
3
+ <div class="dialog-head">
4
+ <div class="close-icon" @click="handleClose"></div>
5
+ </div>
6
+ <div class="input-wrapper">
7
+ <el-input
8
+ v-if="dialogType === 'launch'"
9
+ class="search-input"
10
+ v-model="roomName"
11
+ placeholder="请输入会议名称"
12
+ @input="handleInputRoomName"
13
+ @focus="handleInputFocus"
14
+ @blur="handleInputBlur"
15
+ ></el-input>
16
+ <el-input v-else class="search-input" v-model="roomNum" placeholder="请输入会议ID"></el-input>
17
+ </div>
18
+ <div class="dialog-contain">
19
+ <div class="video-contain">
20
+ <div class="avatar"></div>
21
+ <video id="video-ele" class="video-ele" muted autoplay v-show="cameraStatus"></video>
22
+ </div>
23
+ <div class="tool-bar">
24
+ <div class="tool-bar-group">
25
+ <div class="imgsf">
26
+ <div
27
+ :class="['img-icon', microphoneStatus ? 'img-icon-mic-on' : 'img-icon-mic-off']"
28
+ @click="changeLocalMicroStatus"
29
+ ></div>
30
+ <div class="imgsf-group" @click="toggleAudioSelect">
31
+ <div class="imgsf-group-text">麦克风</div>
32
+ <div class="imgsf-group-icon"></div>
33
+ </div>
34
+ <SelectDialog
35
+ v-if="audioSelectShow"
36
+ dialogType="audio"
37
+ :audioDevices="audioDevices"
38
+ :outputDevices="outputDevices"
39
+ :activeDevice="activeDevice"
40
+ @close="handleAudioSelectClose"
41
+ @chooseAudioInputDevice="handleAudioInputDeviceChoice"
42
+ >
43
+ </SelectDialog>
44
+ </div>
45
+ <div class="imgsf">
46
+ <div
47
+ :class="['img-icon', cameraStatus ? 'img-icon-cam-on' : 'img-icon-cam-off']"
48
+ @click="changeLocalCameraStatus"
49
+ ></div>
50
+ <div class="imgsf-group" @click="toggleVideoSelect">
51
+ <div class="imgsf-group-text">摄像头</div>
52
+ <div class="imgsf-group-icon"></div>
53
+ </div>
54
+ <SelectDialog
55
+ v-if="videoSelectShow"
56
+ dialogType="video"
57
+ :videoDevices="videoDevices"
58
+ :activeDevice="activeDevice"
59
+ @close="handleVideoSelectClose"
60
+ @chooseVideoDevice="handleVideoDeviceChoice"
61
+ >
62
+ </SelectDialog>
63
+ </div>
64
+ <div class="imgsf">
65
+ <div
66
+ :class="['img-icon', outputStatus ? 'img-icon-output-on' : 'img-icon-output-off']"
67
+ @click="changeLocalOutputStatus"
68
+ ></div>
69
+ <div class="imgsf-group" @click="toggleOutputSelect">
70
+ <div class="imgsf-group-text">扬声器</div>
71
+ <div class="imgsf-group-icon"></div>
72
+ </div>
73
+ <SelectDialog
74
+ v-if="outputSelectShow"
75
+ dialogType="output"
76
+ :outputDevices="outputDevices"
77
+ :activeDevice="activeDevice"
78
+ @close="handleOutputSelectClose"
79
+ @chooseAudioOutputDevice="handleAudioOutputDeviceChoice"
80
+ >
81
+ </SelectDialog>
82
+ </div>
83
+ </div>
84
+ <div class="tool-bar-btn" v-if="dialogType === 'launch'" @click="launch">发起会议</div>
85
+ <div class="tool-bar-btn" v-else @click="join">加入会议</div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </template>
90
+
91
+ <script>
92
+ import { ShowMessage } from "@/utils/index";
93
+ import LiveClient from "@/utils/livekit/live-client-esm";
94
+ import SelectDialog from "../other/selectDialog.vue";
95
+
96
+ export default {
97
+ name: "MeetingReadyDialog",
98
+ components: {
99
+ SelectDialog,
100
+ },
101
+ props: {
102
+ dialogType: {
103
+ type: String,
104
+ default: "launch",
105
+ },
106
+ tempRoomNum: {
107
+ type: String,
108
+ default: "",
109
+ },
110
+ tempRoomName: {
111
+ type: String,
112
+ default: "测试会议",
113
+ },
114
+ },
115
+ data() {
116
+ return {
117
+ roomName: "",
118
+ roomNum: "",
119
+ cameraStatus: true,
120
+ microphoneStatus: true,
121
+ outputStatus: true,
122
+ curFacingMode: "user",
123
+ audioSelectShow: false,
124
+ videoSelectShow: false,
125
+ outputSelectShow: false,
126
+ allTracks: [],
127
+ audioDevices: [],
128
+ outputDevices: [],
129
+ videoDevices: [],
130
+ activeDevice: {
131
+ audioInputDevice: "",
132
+ audioOutputDevice: "",
133
+ videoDevice: "",
134
+ },
135
+ showMessage: null,
136
+ };
137
+ },
138
+ computed: {
139
+ showMessageInstance() {
140
+ if (!this.showMessage) {
141
+ this.showMessage = new ShowMessage();
142
+ }
143
+ return this.showMessage;
144
+ },
145
+ },
146
+ watch: {
147
+ cameraStatus: {
148
+ handler: async function (newVal) {
149
+ let constrict = null;
150
+ if (newVal) {
151
+ constrict = {
152
+ audio: this.activeDevice?.audioInputDevice
153
+ ? { deviceId: this.activeDevice.audioInputDevice }
154
+ : true,
155
+ video: this.activeDevice?.videoDevice
156
+ ? { deviceId: this.activeDevice.videoDevice }
157
+ : { facingMode: this.curFacingMode },
158
+ };
159
+ } else {
160
+ constrict = {
161
+ audio: this.activeDevice?.audioInputDevice
162
+ ? { deviceId: this.activeDevice.audioInputDevice }
163
+ : true,
164
+ video: false,
165
+ };
166
+ }
167
+ await this.getDefaultDeviceStream(constrict);
168
+ },
169
+ },
170
+ },
171
+ mounted() {
172
+ this.init();
173
+ },
174
+ beforeDestroy() {
175
+ this.streamPause();
176
+ },
177
+ methods: {
178
+ async init() {
179
+ await this.getDeviceList();
180
+ await this.initVideoStream();
181
+
182
+ if (this.dialogType === "join") {
183
+ this.roomNum = this.tempRoomNum;
184
+ } else {
185
+ this.roomName = this.tempRoomName;
186
+ }
187
+ },
188
+
189
+ handleClose() {
190
+ this.$emit("close");
191
+ },
192
+
193
+ launch() {
194
+ if (this.roomName === "") {
195
+ this.showMessageInstance.message("error", "会议名称不能为空");
196
+ return;
197
+ } else if (this.roomName.length > 20) {
198
+ this.showMessageInstance.message("error", "会议名称不能超过20个字符");
199
+ return;
200
+ }
201
+ this.$emit("launchMeeting", {
202
+ roomName: this.roomName,
203
+ cameraStatus: this.cameraStatus,
204
+ microphoneStatus: this.microphoneStatus,
205
+ outputStatus: this.outputStatus,
206
+ audioInputDevice: this.activeDevice.audioInputDevice,
207
+ audioOutputDevice: this.activeDevice.audioOutputDevice,
208
+ videoDevice: this.activeDevice.videoDevice,
209
+ });
210
+ this.$emit("close");
211
+ },
212
+
213
+ join() {
214
+ if (this.roomNum === "") {
215
+ this.showMessageInstance.message("error", "会议ID不能为空");
216
+ return;
217
+ }
218
+ this.$emit("joinMeeting", {
219
+ roomNum: this.roomNum,
220
+ cameraStatus: this.cameraStatus,
221
+ microphoneStatus: this.microphoneStatus,
222
+ outputStatus: this.outputStatus,
223
+ audioInputDevice: this.activeDevice.audioInputDevice,
224
+ audioOutputDevice: this.activeDevice.audioOutputDevice,
225
+ videoDevice: this.activeDevice.videoDevice,
226
+ });
227
+ this.$emit("close");
228
+ },
229
+
230
+ async getDeviceList() {
231
+ try {
232
+ const { audioDevices, videoDevices, outputDevices } = await LiveClient.getDeviceList();
233
+ this.audioDevices = audioDevices.map((item) => {
234
+ return {
235
+ label: item.label,
236
+ value: item.deviceId,
237
+ };
238
+ });
239
+ this.videoDevices = videoDevices.map((item) => {
240
+ return {
241
+ label: item.label,
242
+ value: item.deviceId,
243
+ };
244
+ });
245
+ this.outputDevices = outputDevices.map((item) => {
246
+ return {
247
+ label: item.label,
248
+ value: item.deviceId,
249
+ };
250
+ });
251
+ } catch (err) {
252
+ console.error(err);
253
+ this.showMessageInstance.message("error", "获取设备列表失败");
254
+ }
255
+ },
256
+
257
+ changeLocalMicroStatus() {
258
+ this.microphoneStatus = !this.microphoneStatus;
259
+ },
260
+
261
+ changeLocalCameraStatus() {
262
+ this.cameraStatus = !this.cameraStatus;
263
+ },
264
+
265
+ changeLocalOutputStatus() {
266
+ this.outputStatus = !this.outputStatus;
267
+ },
268
+
269
+ toggleAudioSelect() {
270
+ this.audioSelectShow = !this.audioSelectShow;
271
+ },
272
+
273
+ toggleVideoSelect() {
274
+ this.videoSelectShow = !this.videoSelectShow;
275
+ },
276
+
277
+ toggleOutputSelect() {
278
+ this.outputSelectShow = !this.outputSelectShow;
279
+ },
280
+
281
+ handleAudioSelectClose() {
282
+ this.audioSelectShow = false;
283
+ },
284
+
285
+ handleVideoSelectClose() {
286
+ this.videoSelectShow = false;
287
+ },
288
+
289
+ handleOutputSelectClose() {
290
+ this.outputSelectShow = false;
291
+ },
292
+
293
+ clearAllTrack() {
294
+ if (this.allTracks.length > 0) {
295
+ this.allTracks.forEach((track) => {
296
+ track.stop();
297
+ });
298
+ }
299
+ },
300
+
301
+ getActiveDeviceId(stream) {
302
+ let videoTracks = stream?.getVideoTracks();
303
+ let audioTracks = stream?.getAudioTracks();
304
+ if (videoTracks && videoTracks.length > 0) {
305
+ let capability = videoTracks[0].getCapabilities();
306
+ this.activeDevice.videoDevice = capability.deviceId;
307
+ this.curFacingMode = capability.facingMode[0];
308
+ }
309
+ if (audioTracks && audioTracks.length > 0) {
310
+ let capability = audioTracks[0].getCapabilities();
311
+ this.activeDevice.audioInputDevice = capability.deviceId;
312
+ }
313
+ },
314
+
315
+ async getDefaultDeviceStream(constrict) {
316
+ try {
317
+ const stream = await navigator.mediaDevices.getUserMedia(constrict);
318
+ let videoEle = document.querySelector("#video-ele");
319
+ this.clearAllTrack();
320
+ if (videoEle) {
321
+ this.allTracks = stream.getTracks();
322
+ this.getActiveDeviceId(stream);
323
+ videoEle.srcObject = stream;
324
+ videoEle.onloadedmetadata = function (e) {
325
+ videoEle.play();
326
+ };
327
+ }
328
+ } catch (err) {
329
+ throw new Error(err);
330
+ }
331
+ },
332
+
333
+ streamPause() {
334
+ let videoEle = document.querySelector("#video-ele");
335
+ if (videoEle) {
336
+ videoEle.pause();
337
+ videoEle.srcObject = null;
338
+ videoEle.src = "";
339
+ }
340
+ this.clearAllTrack();
341
+ },
342
+
343
+ async initVideoStream() {
344
+ this.curFacingMode = "user";
345
+ const constrict = {
346
+ audio: this.microphoneStatus,
347
+ video: this.cameraStatus
348
+ ? {
349
+ facingMode: this.curFacingMode,
350
+ }
351
+ : this.cameraStatus,
352
+ };
353
+ await this.getDefaultDeviceStream(constrict);
354
+ },
355
+
356
+ async handleAudioInputDeviceChoice(e) {
357
+ if (e && e !== this.activeDevice?.audioInputDevice) {
358
+ const constrict = {
359
+ audio: this.microphoneStatus ? { deviceId: e } : false,
360
+ video: this.cameraStatus
361
+ ? this.activeDevice?.videoDevice
362
+ ? { deviceId: this.activeDevice.videoDevice }
363
+ : { facingMode: this.curFacingMode }
364
+ : this.cameraStatus,
365
+ };
366
+ await this.getDefaultDeviceStream(constrict);
367
+ }
368
+ },
369
+
370
+ handleAudioOutputDeviceChoice(e) {
371
+ if (e && e !== this.activeDevice.audioOutputDevice) {
372
+ this.activeDevice.audioOutputDevice = e;
373
+ }
374
+ },
375
+
376
+ async handleVideoDeviceChoice(e) {
377
+ if (e && e !== this.activeDevice.videoDevice) {
378
+ const constrict = {
379
+ audio: this.microphoneStatus
380
+ ? this.activeDevice?.audioInputDevice
381
+ ? { deviceId: this.activeDevice.audioInputDevice }
382
+ : this.microphoneStatus
383
+ : this.microphoneStatus,
384
+ video: this.cameraStatus ? { deviceId: e } : this.cameraStatus,
385
+ };
386
+ await this.getDefaultDeviceStream(constrict);
387
+ }
388
+ },
389
+
390
+ handleInputRoomName(e) {
391
+ if (e.length <= 0) {
392
+ this.roomName = this.tempRoomName;
393
+ }
394
+ },
395
+
396
+ handleInputFocus() {
397
+ if (this.roomName === this.tempRoomName) {
398
+ this.roomName = "";
399
+ }
400
+ },
401
+
402
+ handleInputBlur() {
403
+ if (this.roomName === "") {
404
+ this.roomName = this.tempRoomName;
405
+ }
406
+ },
407
+ },
408
+ };
409
+ </script>
410
+
411
+ <style lang="scss" scoped>
412
+ @import "../../assets/style/mixin.scss";
413
+ .dialog {
414
+ width: 864px;
415
+ height: fit-content;
416
+ position: fixed;
417
+ z-index: 2000;
418
+ inset: 0;
419
+ margin: auto;
420
+ transform: translate(0, 0);
421
+ background: var(--dialog-bg);
422
+ box-shadow: 0px 0px 10px 0px var(--dialog-shadow-color);
423
+ border-radius: 10px;
424
+ border: 1px solid var(--dialog-border-color);
425
+ padding: 20px;
426
+
427
+ &-head {
428
+ width: 100%;
429
+ display: flex;
430
+ align-items: center;
431
+ justify-content: flex-end;
432
+ margin-bottom: 4px;
433
+
434
+ .close-icon {
435
+ width: 16px;
436
+ height: 16px;
437
+ cursor: pointer;
438
+ background: var(--close-icon) no-repeat center / 100% 100%;
439
+ }
440
+ }
441
+ .input-wrapper {
442
+ width: 100%;
443
+ display: flex;
444
+ justify-content: center;
445
+ margin-bottom: 28px;
446
+ :deep(.el-input) {
447
+ width: 400px;
448
+ font-size: 20px;
449
+ line-height: 32px;
450
+ border-bottom: 1px solid var(--input-border-color);
451
+ .el-input__inner {
452
+ color: var(--theme-font-color);
453
+ height: 32px;
454
+ line-height: 32px;
455
+ text-align: center;
456
+ background-color: transparent;
457
+ box-shadow: none;
458
+ border: none;
459
+ &::placeholder {
460
+ color: var(--input-placeholder-color);
461
+ }
462
+ }
463
+ }
464
+ }
465
+ &-contain {
466
+ width: 100%;
467
+
468
+ .video-contain {
469
+ width: 100%;
470
+ height: 452px;
471
+ border-radius: 10px;
472
+ position: relative;
473
+ display: flex;
474
+ align-items: center;
475
+ justify-content: center;
476
+ margin-bottom: 20px;
477
+ padding: 0 12px;
478
+ background: var(--meeting-board-bg) no-repeat center / 100% 100%;
479
+
480
+ .avatar {
481
+ width: 100px;
482
+ height: 100px;
483
+ border-radius: 50%;
484
+ background: url("@/assets/image/common/default_avatar.png") no-repeat center / 100% 100%;
485
+ }
486
+
487
+ .video-ele {
488
+ position: absolute;
489
+ width: 100%;
490
+ height: 100%;
491
+ border-radius: 10px;
492
+ left: 0;
493
+ top: 0;
494
+ object-fit: cover;
495
+ }
496
+ }
497
+
498
+ .tool-bar {
499
+ width: 100%;
500
+ height: 36px;
501
+ display: flex;
502
+ align-items: center;
503
+ justify-content: space-between;
504
+
505
+ &-group {
506
+ display: flex;
507
+ align-items: center;
508
+
509
+ .imgsf {
510
+ margin-right: 12px;
511
+ height: 36px;
512
+ padding: 0 12px;
513
+ background: var(--ready-dialog-select-bg);
514
+ border-radius: 6px;
515
+ display: flex;
516
+ align-items: center;
517
+ cursor: pointer;
518
+ position: relative;
519
+
520
+ .img-icon {
521
+ width: 20px;
522
+ height: 20px;
523
+ margin-right: 6px;
524
+
525
+ &-mic-on {
526
+ background: var(--ready-mic-on-icon) no-repeat center / 100% 100%;
527
+ }
528
+
529
+ &-mic-off {
530
+ background: url("@/assets/image/common/mic_off_small.png") no-repeat center / 100%
531
+ 100%;
532
+ }
533
+
534
+ &-cam-on {
535
+ background: var(--ready-cam-on-icon) no-repeat center / 100% 100%;
536
+ }
537
+
538
+ &-cam-off {
539
+ background: url("@/assets/image/common/cam_off_small.png") no-repeat center / 100%
540
+ 100%;
541
+ }
542
+ &-output-on {
543
+ background: var(--ready-output-on-icon) no-repeat center / 100% 100%;
544
+ }
545
+
546
+ &-output-off {
547
+ background: url("@/assets/image/common/output_off_small.png") no-repeat center / 100%
548
+ 100%;
549
+ }
550
+ }
551
+ &-group {
552
+ display: flex;
553
+ align-items: center;
554
+ flex-wrap: nowrap;
555
+ font-weight: 400;
556
+ font-size: 14px;
557
+ color: var(--theme-font-color);
558
+ cursor: pointer;
559
+ &-text {
560
+ flex-shrink: 0;
561
+ white-space: nowrap;
562
+ margin-right: 12px;
563
+ }
564
+ &-icon {
565
+ flex-shrink: 0;
566
+ width: 8px;
567
+ height: 4px;
568
+ background: var(--ready-arrow-icon) no-repeat center / 100% 100%;
569
+ }
570
+ }
571
+ }
572
+ }
573
+
574
+ &-btn {
575
+ width: 112px;
576
+ height: 36px;
577
+ @include button;
578
+ @include btnPrimary;
579
+ }
580
+ }
581
+ }
582
+ }
583
+ </style>