tuikit-atomicx-vue3 3.4.1 → 4.3.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.
- package/.eslintrc.cjs +1 -0
- package/dist/baseComp/Modal/Modal.js +431 -23
- package/dist/chat/index.d.ts +18 -18
- package/dist/components/AudioSetting/AudioMediaControl.js +39 -41
- package/dist/components/AudioSetting/AudioSettingTab.js +10 -10
- package/dist/components/AudioSetting/MicrophoneSelect.js +8 -8
- package/dist/components/AudioSetting/SpeakerSelect.js +9 -9
- package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +2 -1
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +2 -1
- package/dist/components/AudioSettingPanel/index.js +81 -73
- package/dist/components/BarrageInput/BarrageInputH5.js +9 -9
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +3 -3
- package/dist/components/BarrageInput/MessageInputState.d.ts +28 -0
- package/dist/components/BarrageInput/MessageInputState.js +82 -0
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
- package/dist/components/BarrageInput/TextEditor/index.js +7 -7
- package/dist/components/BarrageInput/type.d.ts +17 -0
- package/dist/components/BarrageInput/type.js +4 -0
- package/dist/components/BarrageInput/utils.d.ts +30 -0
- package/dist/components/BarrageInput/utils.js +41 -0
- package/dist/components/BarrageList/BarrageList.js +80 -110
- package/dist/components/BarrageList/BarrageList.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListH5.js +95 -122
- package/dist/components/BarrageList/BarrageListH5.vue.d.ts +0 -29
- package/dist/components/BarrageList/BarrageListState.d.ts +58 -0
- package/dist/components/BarrageList/BarrageListState.js +106 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +16 -24
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +5 -5
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +48 -73
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +5 -7
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +70 -76
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +6 -6
- package/dist/components/BarrageList/Message/TextMessage/emoji.d.ts +5 -0
- package/dist/components/BarrageList/Message/TextMessage/emoji.js +134 -0
- package/dist/components/BarrageList/index.d.ts +0 -36
- package/dist/components/CameraButton/index.js +18 -19
- package/dist/components/CoGuestPanel/CoGuestPanel.js +60 -60
- package/dist/components/CoHostPanel/BattlePanel.js +25 -25
- package/dist/components/CoHostPanel/CoHostPanel.js +60 -55
- package/dist/components/CoHostPanel/ConfigSettingPanel.js +49 -55
- package/dist/components/CoHostPanel/ConnectionPanel.js +129 -120
- package/dist/components/CoHostPanel/RecommendHostList.js +39 -36
- package/dist/components/CoHostPanel/constants.d.ts +3 -0
- package/dist/components/CoHostPanel/constants.js +6 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/en-US/index.js +2 -1
- package/dist/components/CoHostPanel/i18n/zh-CN/index.d.ts +1 -0
- package/dist/components/CoHostPanel/i18n/zh-CN/index.js +3 -2
- package/dist/components/LiveAudienceList/LiveAudienceList.js +44 -45
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +7 -7
- package/dist/components/LiveAudienceList/UserActionMenu.js +57 -64
- package/dist/components/LiveList/LiveList.js +23 -23
- package/dist/components/LiveList/LiveListH5.js +38 -38
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +10 -10
- package/dist/components/LiveScenePanel/MaterialItem.js +15 -15
- package/dist/components/LiveScenePanel/index.js +4 -4
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.js +58 -58
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.js +56 -49
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.js +6 -6
- package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.js +1 -1
- package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.js +46 -43
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.js +23 -23
- package/dist/components/LiveView/PlayerControl/MultiResolution.js +79 -0
- package/dist/components/LiveView/PlayerControl/MultiResolution.vue.d.ts +8 -0
- package/dist/components/LiveView/PlayerControl/PlayerControl.js +172 -0
- package/dist/components/LiveView/PlayerControl/PlayerControlState.js +263 -0
- package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.d.ts +6 -0
- package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +131 -0
- package/dist/components/{LiveCoreView/i18n/zh-CN → LiveView/i18n/en-US}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/en-US/index.js +4 -3
- package/dist/components/{LiveCoreView/i18n/en-US → LiveView/i18n/zh-CN}/index.d.ts +3 -2
- package/dist/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.js +4 -3
- package/dist/components/LiveView/index.d.ts +79 -0
- package/dist/components/{LiveCoreView → LiveView}/index.js +44 -42
- package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
- package/dist/components/MessageList/MessageList.vue.d.ts +2 -2
- package/dist/components/MessageList/index.d.ts +18 -18
- package/dist/components/MicButton/index.js +11 -11
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +12 -12
- package/dist/components/StreamMixer/LocalMixer/index.js +66 -63
- package/dist/components/StreamMixer/index.js +6 -6
- package/dist/components/StreamView/Layout/CustomLayout.js +8 -8
- package/dist/components/StreamView/Layout/FloatLayout.js +124 -127
- package/dist/components/StreamView/Layout/GridLayout.js +5 -5
- package/dist/components/StreamView/index.js +25 -33
- package/dist/components/StreamView/manager/mediaManager.js +54 -60
- package/dist/components/VideoSetting/CameraSelect.js +8 -8
- package/dist/components/VideoSetting/VideoMediaControl.js +10 -10
- package/dist/components/VideoSetting/VideoPreview.js +9 -9
- package/dist/components/VideoSetting/VideoProfile.js +6 -6
- package/dist/components/VideoSetting/VideoSettingTab.js +40 -39
- package/dist/components/VideoSettingPanel/CameraSelect.js +8 -8
- package/dist/components/VideoSettingPanel/VideoPreview.js +1 -1
- package/dist/components/VideoSettingPanel/VideoProfile.js +18 -18
- package/dist/hooks/useRoomEngine.js +6 -6
- package/dist/{index-D88ja_7_.js → index-BfIEeWMg.js} +1767 -1757
- package/dist/{index-D-KJvDvy.js → index-DTi1fL-x.js} +460 -457
- package/dist/index.js +177 -157
- package/dist/report/MetricsKey.d.ts +16 -0
- package/dist/report/MetricsKey.js +4 -0
- package/dist/report/dataReport.d.ts +12 -0
- package/dist/report/dataReport.js +45 -0
- package/dist/report/index.d.ts +4 -0
- package/dist/report/index.js +6 -0
- package/dist/rtc/index.d.ts +6 -81
- package/dist/rtc/index.js +53 -52
- package/dist/states/BarrageState/BarrageState.d.ts +74 -0
- package/dist/states/BarrageState/BarrageState.js +80 -0
- package/dist/states/BarrageState/index.d.ts +1 -0
- package/dist/states/BarrageState/index.js +5 -0
- package/dist/states/{BattleState.d.ts → BattleState/BattleState.d.ts} +10 -11
- package/dist/states/BattleState/BattleState.js +203 -0
- package/dist/states/BattleState/index.d.ts +1 -0
- package/dist/states/BattleState/index.js +4 -0
- package/dist/states/CoGuestState.d.ts +24 -94
- package/dist/states/CoGuestState.js +297 -189
- package/dist/states/CoHostState/CoHostState.d.ts +2 -2
- package/dist/states/CoHostState/CoHostState.js +135 -131
- package/dist/states/{DeviceState.d.ts → DeviceState/DeviceState.d.ts} +25 -13
- package/dist/states/DeviceState/DeviceState.js +314 -0
- package/dist/states/DeviceState/index.d.ts +1 -0
- package/dist/states/DeviceState/index.js +4 -0
- package/dist/states/LiveAudienceState.d.ts +3 -1
- package/dist/states/LiveAudienceState.js +106 -63
- package/dist/states/{LiveState/index.d.ts → LiveListState/LiveListState.d.ts} +13 -8
- package/dist/states/LiveListState/LiveListState.js +285 -0
- package/dist/states/LiveListState/index.d.ts +1 -0
- package/dist/states/LiveListState/index.js +4 -0
- package/dist/states/LiveMonitorState/api/http.js +147 -129
- package/dist/states/LiveMonitorState/index.js +67 -62
- package/dist/states/LiveSeatState/index.d.ts +46 -11
- package/dist/states/LiveSeatState/index.js +34 -15
- package/dist/states/LiveSeatState/seatEventManager.d.ts +2 -0
- package/dist/states/LiveSeatState/seatEventManager.js +63 -42
- package/dist/states/LiveSeatState/seatManager.d.ts +34 -5
- package/dist/states/LiveSeatState/seatManager.js +131 -29
- package/dist/states/LiveSeatState/store.d.ts +5 -5
- package/dist/states/LiveSeatState/store.js +12 -10
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +1 -1
- package/dist/states/LiveSeatState/usePlayStream/index.js +30 -28
- package/dist/states/LoginState.js +39 -34
- package/dist/states/SeatStore.js +82 -83
- package/dist/states/{VideoMixerState.d.ts → VideoMixerState/VideoMixerState.d.ts} +1 -1
- package/dist/states/VideoMixerState/VideoMixerState.js +269 -0
- package/dist/states/VideoMixerState/index.d.ts +1 -0
- package/dist/states/VideoMixerState/index.js +4 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/audience.d.ts +21 -0
- package/dist/types/audience.js +4 -1
- package/dist/types/battle.d.ts +75 -3
- package/dist/types/battle.js +5 -1
- package/dist/types/coGuest.d.ts +72 -5
- package/dist/types/coGuest.js +4 -2
- package/dist/types/device.d.ts +38 -17
- package/dist/types/device.js +10 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +96 -80
- package/dist/types/live.d.ts +36 -21
- package/dist/types/live.js +6 -4
- package/dist/types/seat.d.ts +23 -4
- package/dist/types/seat.js +7 -1
- package/dist/utils/eventCenter.d.ts +88 -0
- package/dist/utils/eventCenter.js +161 -0
- package/package.json +2 -2
- package/src/components/AudioSetting/AudioMediaControl.vue +1 -3
- package/src/components/AudioSetting/AudioSettingTab.vue +1 -2
- package/src/components/AudioSetting/MicrophoneSelect.vue +1 -2
- package/src/components/AudioSetting/SpeakerSelect.vue +1 -2
- package/src/components/AudioSettingPanel/i18n/en-US/index.ts +1 -0
- package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +1 -0
- package/src/components/AudioSettingPanel/index.vue +4 -2
- package/src/components/BarrageInput/BarrageInputH5.vue +1 -1
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +1 -1
- package/src/components/BarrageInput/MessageInputState.ts +160 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +1 -1
- package/src/components/BarrageInput/type.ts +26 -0
- package/src/components/BarrageInput/utils.ts +45 -0
- package/src/components/BarrageList/BarrageList.vue +61 -117
- package/src/components/BarrageList/BarrageListH5.vue +75 -159
- package/src/components/BarrageList/BarrageListState.ts +223 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +8 -55
- package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +19 -44
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +69 -96
- package/src/components/BarrageList/Message/TextMessage/emoji.ts +132 -0
- package/src/components/CameraButton/index.vue +0 -1
- package/src/components/CoGuestPanel/CoGuestPanel.vue +16 -91
- package/src/components/CoHostPanel/BattlePanel.vue +4 -7
- package/src/components/CoHostPanel/CoHostPanel.vue +11 -3
- package/src/components/CoHostPanel/ConfigSettingPanel.vue +2 -8
- package/src/components/CoHostPanel/ConnectionPanel.vue +41 -37
- package/src/components/CoHostPanel/RecommendHostList.vue +12 -13
- package/src/components/CoHostPanel/constants.ts +3 -0
- package/src/components/CoHostPanel/i18n/en-US/index.ts +1 -0
- package/src/components/CoHostPanel/i18n/zh-CN/index.ts +2 -1
- package/src/components/LiveAudienceList/LiveAudienceList.vue +4 -5
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +2 -2
- package/src/components/LiveAudienceList/UserActionMenu.vue +7 -48
- package/src/components/LiveList/LiveList.vue +5 -5
- package/src/components/LiveList/LiveListH5.vue +6 -6
- package/src/components/LiveScenePanel/index.vue +2 -2
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue +10 -15
- package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue +30 -31
- package/src/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue +5 -3
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue +1 -1
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/MultiResolution.vue +9 -3
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue +10 -2
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.ts +233 -259
- package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/domHelpers.ts +64 -0
- package/src/components/{LiveCoreView → LiveView}/i18n/en-US/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/i18n/zh-CN/index.ts +3 -2
- package/src/components/{LiveCoreView → LiveView}/index.ts +5 -2
- package/src/components/{LiveCoreView → LiveView}/index.vue +3 -3
- package/src/components/MicButton/index.vue +3 -3
- package/src/components/StreamMixer/LocalMixer/index.vue +6 -8
- package/src/components/StreamMixer/index.vue +1 -1
- package/src/components/StreamView/Layout/CustomLayout.vue +2 -2
- package/src/components/StreamView/Layout/FloatLayout.vue +88 -83
- package/src/components/StreamView/index.vue +28 -14
- package/src/components/StreamView/manager/mediaManager.ts +38 -42
- package/src/components/VideoSetting/CameraSelect.vue +1 -2
- package/src/components/VideoSetting/VideoMediaControl.vue +1 -1
- package/src/components/VideoSetting/VideoPreview.vue +1 -2
- package/src/components/VideoSetting/VideoProfile.vue +1 -1
- package/src/components/VideoSetting/VideoSettingTab.vue +9 -5
- package/src/components/VideoSettingPanel/CameraSelect.vue +1 -2
- package/src/components/VideoSettingPanel/VideoProfile.vue +7 -7
- package/src/hooks/useRoomEngine.ts +1 -1
- package/src/report/MetricsKey.ts +16 -0
- package/src/report/dataReport.ts +55 -0
- package/src/report/index.ts +7 -0
- package/src/rtc/index.ts +8 -10
- package/src/types/audience.ts +27 -1
- package/src/types/battle.ts +87 -4
- package/src/types/coGuest.ts +87 -5
- package/src/types/device.ts +41 -16
- package/src/types/index.ts +2 -2
- package/src/types/live.ts +41 -22
- package/src/types/seat.ts +28 -4
- package/src/utils/eventCenter.ts +249 -0
- package/dist/DialogPortal-CvJcEAsn.js +0 -417
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +0 -23
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +0 -30
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/FaceMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +0 -4
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +0 -16
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +0 -25
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +0 -71
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +0 -34
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/ImageMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +0 -9
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +0 -2
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MergerMessage/index.js +0 -4
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +0 -40
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +0 -54
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +0 -26
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +0 -15
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +0 -4
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +0 -41
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +0 -35
- package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +0 -3
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +0 -4
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +0 -45
- package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +0 -17
- package/dist/components/BarrageList/MessageForward/MessageForward.js +0 -203
- package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +0 -2
- package/dist/components/BarrageList/MessageForward/index.d.ts +0 -3
- package/dist/components/BarrageList/MessageForward/index.js +0 -4
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.js +0 -78
- package/dist/components/LiveCoreView/PlayerControl/MultiResolution.vue.d.ts +0 -2
- package/dist/components/LiveCoreView/PlayerControl/PlayerControl.js +0 -168
- package/dist/components/LiveCoreView/PlayerControl/PlayerControlState.js +0 -267
- package/dist/components/LiveCoreView/PlayerControl/utils/domHelpers.js +0 -99
- package/dist/components/LiveCoreView/index.d.ts +0 -4
- package/dist/components/StreamView/Layout/MixLayout.js +0 -89
- package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +0 -31
- package/dist/states/BarrageListState/BarrageListState.d.ts +0 -26
- package/dist/states/BarrageListState/BarrageListState.js +0 -122
- package/dist/states/BarrageListState/index.d.ts +0 -1
- package/dist/states/BarrageListState/index.js +0 -4
- package/dist/states/BattleState.js +0 -117
- package/dist/states/DeviceState.js +0 -296
- package/dist/states/LiveState/index.js +0 -254
- package/dist/states/VideoMixerState.js +0 -260
- package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +0 -43
- package/src/components/BarrageList/Message/FaceMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +0 -55
- package/src/components/BarrageList/Message/GroupTipMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +0 -181
- package/src/components/BarrageList/Message/ImageMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +0 -6
- package/src/components/BarrageList/Message/MergerMessage/index.ts +0 -3
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +0 -70
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +0 -40
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +0 -3
- package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +0 -82
- package/src/components/BarrageList/Message/RecalledMessage/index.ts +0 -3
- package/src/components/BarrageList/MessageForward/ForwardListItem.vue +0 -67
- package/src/components/BarrageList/MessageForward/MessageForward.vue +0 -388
- package/src/components/BarrageList/MessageForward/index.ts +0 -3
- package/src/components/StreamView/Layout/MixLayout.vue +0 -144
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/BattleUserDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/DefaultStreamViewUI.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/AudioControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.vue.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControlState.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.d.ts +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/i18n/index.js +0 -0
- /package/dist/components/{LiveCoreView → LiveView}/index.vue.d.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/CoHostDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/CoreViewDecorate/LiveCoreDecorate.vue +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/PlayerControl.module.scss +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/index.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/deviceDetection.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/PlayerControl/utils/fullscreenManager.ts +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/defeat.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/draw.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/img/victory.png +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleOrdinaryBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/BattleTopBadge.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/blueBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/redBkg.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/s.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/assets/svg/v.svg +0 -0
- /package/src/components/{LiveCoreView → LiveView}/i18n/index.ts +0 -0
|
@@ -1,110 +1,115 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { fetchLiveList as
|
|
3
|
-
import { PlayerManager as
|
|
4
|
-
import { safelyParse as
|
|
5
|
-
import { transformRoomInfoToLiveInfo as v, getLiveIdFromMixedStreamUserId as
|
|
6
|
-
import {
|
|
1
|
+
import { ref as p, computed as R } from "vue";
|
|
2
|
+
import { fetchLiveList as T, destroyRoom as E, getRoomInfo as w } from "./api/http.js";
|
|
3
|
+
import { PlayerManager as P } from "./player/manager/playerManager.js";
|
|
4
|
+
import { safelyParse as A } from "../../utils/utils.js";
|
|
5
|
+
import { transformRoomInfoToLiveInfo as v, getLiveIdFromMixedStreamUserId as I } from "./utils/index.js";
|
|
6
|
+
import { dataReport as y } from "../../report/dataReport.js";
|
|
7
|
+
import { MetricsKey as L } from "../../report/MetricsKey.js";
|
|
8
|
+
import { MIXED_STREAM_PAYLOAD_TYPE as O } from "./player/types/trtc.js";
|
|
7
9
|
import { PlayerEvents as u } from "./player/types/player.js";
|
|
8
|
-
let
|
|
9
|
-
const m =
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
if (!(
|
|
10
|
+
let r = null, i = null;
|
|
11
|
+
const m = p(/* @__PURE__ */ new Map()), a = p(/* @__PURE__ */ new Map()), M = R(() => Array.from(a.value.values())), S = (e) => {
|
|
12
|
+
r = e, i = new P(e.account);
|
|
13
|
+
}, U = async (e, t) => {
|
|
14
|
+
if (!(r != null && r.baseUrl))
|
|
13
15
|
throw new Error("Please call init() first!");
|
|
14
16
|
e < 1 && (e = 1);
|
|
15
|
-
const { code: o, data: s } = await
|
|
17
|
+
const { code: o, data: s } = await T(r.baseUrl, {
|
|
16
18
|
next: String((e - 1) * t),
|
|
17
19
|
count: t
|
|
18
|
-
}),
|
|
19
|
-
return o === 0 && s.RoomList && s.RoomList.forEach((
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}),
|
|
23
|
-
},
|
|
24
|
-
if (!(
|
|
20
|
+
}), c = [];
|
|
21
|
+
return o === 0 && s.RoomList && s.RoomList.forEach((n) => {
|
|
22
|
+
const l = v(n);
|
|
23
|
+
c.push(l);
|
|
24
|
+
}), c;
|
|
25
|
+
}, b = async (e) => {
|
|
26
|
+
if (!(r != null && r.baseUrl))
|
|
25
27
|
throw new Error("Please call init() first!");
|
|
26
|
-
|
|
28
|
+
const t = await E(r.baseUrl, {
|
|
27
29
|
roomId: e
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (!
|
|
32
|
-
|
|
30
|
+
}), o = L.T_METRICS_STATE_API_LIVE_MONITOR_CLOSE_ROOM_COUNT;
|
|
31
|
+
y.reportCount(o), t.code === 0 && a.value.delete(e);
|
|
32
|
+
}, C = async (e, t) => {
|
|
33
|
+
if (!r || !i) throw new Error("Please call init() first!");
|
|
34
|
+
if (!a.value.has(e)) {
|
|
35
|
+
const o = await N(e);
|
|
33
36
|
if (!x(e)) {
|
|
34
|
-
|
|
37
|
+
a.value.set(e, o);
|
|
35
38
|
const s = i.createPlayer(e);
|
|
36
|
-
s.on(u.OnReceiveSEI,
|
|
39
|
+
s.on(u.OnReceiveSEI, _), s.on(u.OnUserAudioAvailable, d), await s.play(e, t);
|
|
40
|
+
const c = L.T_METRICS_STATE_API_LIVE_MONITOR_START_PLAY_COUNT;
|
|
41
|
+
y.reportCount(c);
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
}, x = (e) => {
|
|
40
45
|
const t = m.value.get(e);
|
|
41
46
|
let o = !1;
|
|
42
47
|
return t && (Date.now() - t.timestamp < t.duration ? o = !0 : m.value.delete(e)), o;
|
|
43
|
-
},
|
|
44
|
-
if (!
|
|
45
|
-
if (
|
|
46
|
-
|
|
48
|
+
}, D = async (e) => {
|
|
49
|
+
if (!r || !i) throw new Error("Please call init() first!");
|
|
50
|
+
if (a.value.has(e)) {
|
|
51
|
+
a.value.delete(e);
|
|
47
52
|
const t = i.getPlayer(e);
|
|
48
|
-
t == null || t.off(u.OnReceiveSEI,
|
|
53
|
+
t == null || t.off(u.OnReceiveSEI, _), t == null || t.off(u.OnUserAudioAvailable, d), i.destroyPlayer(e);
|
|
49
54
|
} else
|
|
50
55
|
m.value.set(e, {
|
|
51
56
|
timestamp: Date.now(),
|
|
52
57
|
duration: 1e3
|
|
53
58
|
});
|
|
54
|
-
},
|
|
59
|
+
}, d = (e, t) => {
|
|
55
60
|
t && h(e, !0);
|
|
56
|
-
},
|
|
57
|
-
const t = await
|
|
61
|
+
}, N = async (e) => {
|
|
62
|
+
const t = await w(r.baseUrl, { roomId: e });
|
|
58
63
|
if (t.code !== 0)
|
|
59
|
-
throw
|
|
64
|
+
throw a.value.has(e) && a.value.delete(e), {
|
|
60
65
|
code: t.code,
|
|
61
66
|
message: t.data
|
|
62
67
|
};
|
|
63
68
|
return v(t.data.RoomInfo);
|
|
64
|
-
},
|
|
65
|
-
const { payloadType: o } =
|
|
66
|
-
if (o ===
|
|
67
|
-
const s =
|
|
69
|
+
}, _ = (e, t) => {
|
|
70
|
+
const { payloadType: o } = A(t.app_data);
|
|
71
|
+
if (o === O) {
|
|
72
|
+
const s = I(e);
|
|
68
73
|
g(s, t);
|
|
69
74
|
}
|
|
70
75
|
}, g = async (e, t) => {
|
|
71
|
-
var
|
|
72
|
-
if (!((
|
|
76
|
+
var c;
|
|
77
|
+
if (!((c = t.regions) != null && c.length)) return;
|
|
73
78
|
const o = await Promise.all(
|
|
74
|
-
t.regions.map(async (
|
|
75
|
-
let
|
|
79
|
+
t.regions.map(async (n) => {
|
|
80
|
+
let l = null;
|
|
76
81
|
try {
|
|
77
|
-
const f = await
|
|
78
|
-
f.code === 0 && (
|
|
82
|
+
const f = await w(r.baseUrl, { roomId: `live_${n.uid}` });
|
|
83
|
+
f.code === 0 && (l = v(f.data.RoomInfo));
|
|
79
84
|
} catch {
|
|
80
|
-
|
|
85
|
+
l = null;
|
|
81
86
|
}
|
|
82
87
|
return {
|
|
83
|
-
liveId: (
|
|
88
|
+
liveId: (l == null ? void 0 : l.liveId) || e,
|
|
84
89
|
userInfo: {
|
|
85
|
-
userId:
|
|
86
|
-
volume:
|
|
90
|
+
userId: n.uid,
|
|
91
|
+
volume: n.volume
|
|
87
92
|
},
|
|
88
93
|
rect: {
|
|
89
|
-
x:
|
|
90
|
-
y:
|
|
91
|
-
w:
|
|
92
|
-
h:
|
|
94
|
+
x: n.x / t.canvas.w,
|
|
95
|
+
y: n.y / t.canvas.h,
|
|
96
|
+
w: n.w / t.canvas.w,
|
|
97
|
+
h: n.h / t.canvas.h
|
|
93
98
|
}
|
|
94
99
|
};
|
|
95
100
|
})
|
|
96
|
-
), s =
|
|
97
|
-
s && (s.regionList = o, s.orientation = t.canvas.w > t.canvas.h ? "landscape" : "portrait",
|
|
101
|
+
), s = a.value.get(e);
|
|
102
|
+
s && (s.regionList = o, s.orientation = t.canvas.w > t.canvas.h ? "landscape" : "portrait", a.value.set(e, { ...s }));
|
|
98
103
|
}, h = async (e, t) => {
|
|
99
104
|
const o = i == null ? void 0 : i.getPlayer(e);
|
|
100
105
|
await (o == null ? void 0 : o.muteAudio(t));
|
|
101
106
|
}, q = () => ({
|
|
102
|
-
monitorLiveInfoList:
|
|
103
|
-
init:
|
|
104
|
-
getLiveList:
|
|
105
|
-
closeRoom:
|
|
106
|
-
startPlay:
|
|
107
|
-
stopPlay:
|
|
107
|
+
monitorLiveInfoList: M,
|
|
108
|
+
init: S,
|
|
109
|
+
getLiveList: U,
|
|
110
|
+
closeRoom: b,
|
|
111
|
+
startPlay: C,
|
|
112
|
+
stopPlay: D,
|
|
108
113
|
muteLiveAudio: h
|
|
109
114
|
});
|
|
110
115
|
export {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { LiveSeatEvent } from '../../types/seat';
|
|
2
|
+
import { EventCallback } from '../../utils/eventCenter';
|
|
3
|
+
|
|
4
|
+
declare function subscribeEvent(event: LiveSeatEvent, callback: EventCallback): void;
|
|
5
|
+
declare function unsubscribeEvent(event: LiveSeatEvent, callback: EventCallback): void;
|
|
1
6
|
export declare function useLiveSeatState(): {
|
|
2
7
|
seatList: import('vue').Ref<import('../..').SeatInfo[], import('../..').SeatInfo[]>;
|
|
3
8
|
canvas: import('vue').Ref<{
|
|
@@ -12,26 +17,56 @@ export declare function useLiveSeatState(): {
|
|
|
12
17
|
speakingUsers: import('vue').Ref<Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>, Map<string, number> | (Map<string, number> & Omit<Map<string, number>, keyof Map<any, any>>)>;
|
|
13
18
|
networkQualities: import('vue').Ref<Map<string, {
|
|
14
19
|
userId: string;
|
|
15
|
-
quality: import('../..').
|
|
20
|
+
quality: import('../..').NetworkQuality;
|
|
16
21
|
upLoss: number;
|
|
17
22
|
downLoss: number;
|
|
18
23
|
delay: number;
|
|
19
|
-
}> & Omit<Map<string, import('../..').
|
|
24
|
+
}> & Omit<Map<string, import('../..').NetworkInfo>, keyof Map<any, any>>, Map<string, import('../..').NetworkInfo> | (Map<string, {
|
|
20
25
|
userId: string;
|
|
21
|
-
quality: import('../..').
|
|
26
|
+
quality: import('../..').NetworkQuality;
|
|
22
27
|
upLoss: number;
|
|
23
28
|
downLoss: number;
|
|
24
29
|
delay: number;
|
|
25
|
-
}> & Omit<Map<string, import('../..').
|
|
30
|
+
}> & Omit<Map<string, import('../..').NetworkInfo>, keyof Map<any, any>>)>;
|
|
31
|
+
takeSeat: ({ seatIndex }: {
|
|
32
|
+
seatIndex: number;
|
|
33
|
+
}) => Promise<import('@tencentcloud/tuiroom-engine-js').TUIRequest | undefined>;
|
|
34
|
+
leaveSeat: () => Promise<void | undefined>;
|
|
35
|
+
lockSeat: ({ seatIndex }: {
|
|
36
|
+
seatIndex: number;
|
|
37
|
+
}) => Promise<any>;
|
|
38
|
+
unLockSeat: ({ seatIndex }: {
|
|
39
|
+
seatIndex: number;
|
|
40
|
+
}) => Promise<any>;
|
|
41
|
+
kickUserOutOfSeat: ({ userId }: {
|
|
42
|
+
userId: string;
|
|
43
|
+
}) => Promise<void>;
|
|
44
|
+
moveUserToSeat: ({ userId, targetIndex, policy }: {
|
|
45
|
+
userId: string;
|
|
46
|
+
targetIndex: number;
|
|
47
|
+
policy: import('../..').MoveSeatPolicy;
|
|
48
|
+
}) => Promise<void>;
|
|
49
|
+
openRemoteCamera: ({ userId, policy }: {
|
|
50
|
+
userId: string;
|
|
51
|
+
policy: import('../..').DeviceControlPolicy;
|
|
52
|
+
}) => Promise<any>;
|
|
53
|
+
closeRemoteCamera: ({ userId }: {
|
|
54
|
+
userId: string;
|
|
55
|
+
}) => Promise<void | undefined>;
|
|
56
|
+
openRemoteMicrophone: ({ userId, policy }: {
|
|
57
|
+
userId: string;
|
|
58
|
+
policy: import('../..').DeviceControlPolicy;
|
|
59
|
+
}) => Promise<any>;
|
|
60
|
+
closeRemoteMicrophone: ({ userId }: {
|
|
61
|
+
userId: string;
|
|
62
|
+
}) => Promise<void | undefined>;
|
|
63
|
+
muteMicrophone: () => Promise<void>;
|
|
64
|
+
unmuteMicrophone: () => Promise<void>;
|
|
26
65
|
startPlayStream: ({ view }: {
|
|
27
66
|
view: string;
|
|
28
67
|
}) => Promise<void>;
|
|
29
68
|
stopPlayStream: () => Promise<void>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
isLocked: boolean;
|
|
33
|
-
}) => Promise<any>;
|
|
34
|
-
moveToSeat: ({ targetSeatIndex }: {
|
|
35
|
-
targetSeatIndex: number;
|
|
36
|
-
}) => Promise<void | undefined>;
|
|
69
|
+
subscribeEvent: typeof subscribeEvent;
|
|
70
|
+
unsubscribeEvent: typeof unsubscribeEvent;
|
|
37
71
|
};
|
|
72
|
+
export {};
|
|
@@ -1,21 +1,40 @@
|
|
|
1
|
-
import { useSeatStore as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
new
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { useSeatStore as m } from "./store.js";
|
|
2
|
+
import s from "./seatManager.js";
|
|
3
|
+
import c from "./seatEventManager.js";
|
|
4
|
+
import { eventCenter as a } from "../../utils/eventCenter.js";
|
|
5
|
+
const e = new s();
|
|
6
|
+
new c();
|
|
7
|
+
function i(t, o) {
|
|
8
|
+
a.on(t, o);
|
|
9
|
+
}
|
|
10
|
+
function S(t, o) {
|
|
11
|
+
a.off(t, o);
|
|
12
|
+
}
|
|
13
|
+
function f() {
|
|
14
|
+
const { seatList: t, canvas: o, speakingUsers: r, networkQualities: n } = m();
|
|
8
15
|
return {
|
|
9
|
-
seatList:
|
|
10
|
-
canvas:
|
|
16
|
+
seatList: t,
|
|
17
|
+
canvas: o,
|
|
11
18
|
speakingUsers: r,
|
|
12
|
-
networkQualities:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
lockSeat:
|
|
16
|
-
|
|
19
|
+
networkQualities: n,
|
|
20
|
+
takeSeat: e.takeSeat,
|
|
21
|
+
leaveSeat: e.leaveSeat,
|
|
22
|
+
lockSeat: e.lockSeat,
|
|
23
|
+
unLockSeat: e.unLockSeat,
|
|
24
|
+
kickUserOutOfSeat: e.kickUserOutOfSeat,
|
|
25
|
+
moveUserToSeat: e.moveUserToSeat,
|
|
26
|
+
openRemoteCamera: e.openRemoteCamera,
|
|
27
|
+
closeRemoteCamera: e.closeRemoteCamera,
|
|
28
|
+
openRemoteMicrophone: e.openRemoteMicrophone,
|
|
29
|
+
closeRemoteMicrophone: e.closeRemoteMicrophone,
|
|
30
|
+
muteMicrophone: e.muteMicrophone,
|
|
31
|
+
unmuteMicrophone: e.unmuteMicrophone,
|
|
32
|
+
startPlayStream: e.startPlayStream,
|
|
33
|
+
stopPlayStream: e.stopPlayStream,
|
|
34
|
+
subscribeEvent: i,
|
|
35
|
+
unsubscribeEvent: S
|
|
17
36
|
};
|
|
18
37
|
}
|
|
19
38
|
export {
|
|
20
|
-
|
|
39
|
+
f as useLiveSeatState
|
|
21
40
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare class SeatEventManager {
|
|
2
2
|
static instance: SeatEventManager;
|
|
3
|
+
private localSeatInfo;
|
|
3
4
|
constructor();
|
|
4
5
|
private getNewSeatUserInfo;
|
|
5
6
|
private getNewSeatInfo;
|
|
6
7
|
private onSeatLayoutChanged;
|
|
8
|
+
private onSeatListChanged;
|
|
7
9
|
private onUserNetworkQualityChanged;
|
|
8
10
|
private onUserVoiceVolumeChanged;
|
|
9
11
|
private bindEvent;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { useRoomEngine as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var U = (l, e, o) => e in l ? v(l, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : l[e] = o;
|
|
3
|
+
var f = (l, e, o) => U(l, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import g, { TUIDeviceStatus as u, TUIRoomEvents as r, TUILiveLayoutManagerEvents as C, TUINetworkQuality as s } from "@tencentcloud/tuiroom-engine-js";
|
|
5
|
+
import { useRoomEngine as p } from "../../hooks/useRoomEngine.js";
|
|
6
|
+
import { useSeatStore as k } from "./store.js";
|
|
7
|
+
import { useLoginState as w } from "../LoginState.js";
|
|
8
|
+
import { LiveSeatEvent as h, DeviceControlPolicy as L } from "../../types/seat.js";
|
|
9
|
+
import { eventCenter as m } from "../../utils/eventCenter.js";
|
|
10
|
+
import { useLiveListState as Q } from "../LiveListState/LiveListState.js";
|
|
11
|
+
import { DeviceStatus as y, NetworkQuality as d } from "../../types/device.js";
|
|
12
|
+
const { currentLive: V } = Q(), i = p(), { loginUserInfo: O } = w(), { canvas: E, seatList: A, speakingUsers: S, networkQualities: B } = k(), c = class c {
|
|
10
13
|
constructor() {
|
|
11
|
-
|
|
14
|
+
f(this, "localSeatInfo", null);
|
|
15
|
+
c.instance || (c.instance = this), this.onSeatLayoutChanged = this.onSeatLayoutChanged.bind(this), this.onSeatListChanged = this.onSeatListChanged.bind(this), this.onUserNetworkQualityChanged = this.onUserNetworkQualityChanged.bind(this), this.onUserVoiceVolumeChanged = this.onUserVoiceVolumeChanged.bind(this), this.bindEvent();
|
|
12
16
|
}
|
|
13
17
|
getNewSeatUserInfo(e) {
|
|
14
18
|
return {
|
|
15
19
|
userId: e.userId,
|
|
16
|
-
roomId: e.roomId || "",
|
|
17
20
|
userName: e.userName,
|
|
18
21
|
avatarUrl: e.userAvatar,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
liveId: e.roomId,
|
|
23
|
+
microphoneStatus: e.userMicrophoneStatus === u.TUIDeviceStatusOpened ? y.On : y.Off,
|
|
24
|
+
allowOpenMicrophone: e.userMicrophoneStatus !== u.TUIDeviceStatusClosedByAdmin,
|
|
25
|
+
cameraStatus: e.userCameraStatus === u.TUIDeviceStatusOpened ? y.On : y.Off,
|
|
26
|
+
allowOpenCamera: e.userCameraStatus !== u.TUIDeviceStatusClosedByAdmin
|
|
23
27
|
};
|
|
24
28
|
}
|
|
25
29
|
getNewSeatInfo(e) {
|
|
@@ -36,45 +40,62 @@ const { currentLive: y } = C(), a = U(), { canvas: p, seatList: w, speakingUsers
|
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
42
|
}
|
|
39
|
-
onSeatLayoutChanged({ roomId: e, seatLayout:
|
|
40
|
-
var
|
|
41
|
-
e === ((
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
43
|
+
async onSeatLayoutChanged({ roomId: e, seatLayout: o }) {
|
|
44
|
+
var t;
|
|
45
|
+
e === ((t = V.value) == null ? void 0 : t.liveId) && (E.value = {
|
|
46
|
+
width: o.canvasWidth,
|
|
47
|
+
height: o.canvasHeight,
|
|
44
48
|
background: "#000000"
|
|
45
|
-
},
|
|
49
|
+
}, A.value = o.regions.map((n) => this.getNewSeatInfo(n)));
|
|
46
50
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
d.value.set(t.userId, t);
|
|
51
|
+
onSeatListChanged({ seatList: e }) {
|
|
52
|
+
e.forEach((o) => {
|
|
53
|
+
var t, n, a;
|
|
54
|
+
o.userId === ((t = O.value) == null ? void 0 : t.userId) && (this.localSeatInfo && ((n = this.localSeatInfo) == null ? void 0 : n.isAudioLocked) !== o.isAudioLocked && (o.isAudioLocked ? m.emit(h.onLocalMicrophoneClosedByAdmin) : m.emit(h.onLocalMicrophoneOpenedByAdmin, { policy: L.UnlockOnly })), this.localSeatInfo && ((a = this.localSeatInfo) == null ? void 0 : a.isVideoLocked) !== o.isVideoLocked && (o.isVideoLocked ? m.emit(h.onLocalCameraClosedByAdmin) : m.emit(h.onLocalCameraOpenedByAdmin, { policy: L.UnlockOnly })), this.localSeatInfo = o);
|
|
52
55
|
});
|
|
53
56
|
}
|
|
57
|
+
onUserNetworkQualityChanged({ userNetworkList: e }) {
|
|
58
|
+
const o = {
|
|
59
|
+
[s.kQualityUnknown]: d.Unknown,
|
|
60
|
+
[s.kQualityExcellent]: d.Excellent,
|
|
61
|
+
[s.kQualityGood]: d.Good,
|
|
62
|
+
[s.kQualityPoor]: d.Poor,
|
|
63
|
+
[s.kQualityBad]: d.Bad,
|
|
64
|
+
[s.kQualityVeryBad]: d.VeryBad,
|
|
65
|
+
[s.kQualityDown]: d.Down
|
|
66
|
+
};
|
|
67
|
+
B.value = new Map(e.map((t) => [t.userId, {
|
|
68
|
+
userId: t.userId,
|
|
69
|
+
quality: o[t.quality],
|
|
70
|
+
upLoss: t.upLoss,
|
|
71
|
+
downLoss: t.downLoss,
|
|
72
|
+
delay: t.delay
|
|
73
|
+
}]));
|
|
74
|
+
}
|
|
54
75
|
onUserVoiceVolumeChanged({ userVolumeList: e }) {
|
|
55
|
-
Object.keys(
|
|
56
|
-
e.some((
|
|
57
|
-
}), e.forEach((
|
|
58
|
-
|
|
76
|
+
Object.keys(S.value).forEach((o) => {
|
|
77
|
+
e.some((t) => t.userId === o) || S.value.delete(o);
|
|
78
|
+
}), e.forEach((o) => {
|
|
79
|
+
S.value.set(o.userId, o.volume);
|
|
59
80
|
});
|
|
60
81
|
}
|
|
61
82
|
bindEvent() {
|
|
62
|
-
|
|
63
|
-
var t, n,
|
|
64
|
-
(
|
|
65
|
-
const e = (
|
|
66
|
-
e == null || e.on(
|
|
83
|
+
g.once("ready", () => {
|
|
84
|
+
var o, t, n, a;
|
|
85
|
+
(o = i.instance) == null || o.on(r.onUserVoiceVolumeChanged, this.onUserVoiceVolumeChanged), (t = i.instance) == null || t.on(r.onUserNetworkQualityChanged, this.onUserNetworkQualityChanged), (n = i.instance) == null || n.on(r.onSeatListChanged, this.onSeatListChanged);
|
|
86
|
+
const e = (a = i.instance) == null ? void 0 : a.getLiveLayoutManager();
|
|
87
|
+
e == null || e.on(C.onSeatLayoutChanged, this.onSeatLayoutChanged);
|
|
67
88
|
});
|
|
68
89
|
}
|
|
69
90
|
unbindEvent() {
|
|
70
|
-
var t, n,
|
|
71
|
-
(
|
|
72
|
-
const e = (
|
|
73
|
-
e == null || e.off(
|
|
91
|
+
var o, t, n, a;
|
|
92
|
+
(o = i.instance) == null || o.off(r.onUserVoiceVolumeChanged, this.onUserVoiceVolumeChanged), (t = i.instance) == null || t.off(r.onUserNetworkQualityChanged, this.onUserNetworkQualityChanged), (n = i.instance) == null || n.off(r.onSeatListChanged, this.onSeatListChanged);
|
|
93
|
+
const e = (a = i.instance) == null ? void 0 : a.getLiveLayoutManager();
|
|
94
|
+
e == null || e.off(C.onSeatLayoutChanged, this.onSeatLayoutChanged);
|
|
74
95
|
}
|
|
75
96
|
};
|
|
76
|
-
c
|
|
77
|
-
let
|
|
97
|
+
f(c, "instance");
|
|
98
|
+
let I = c;
|
|
78
99
|
export {
|
|
79
|
-
|
|
100
|
+
I as default
|
|
80
101
|
};
|
|
@@ -1,13 +1,42 @@
|
|
|
1
|
+
import { DeviceControlPolicy, MoveSeatPolicy } from '../../types/seat';
|
|
2
|
+
|
|
1
3
|
declare class SeatManager {
|
|
2
4
|
static instance: SeatManager;
|
|
3
5
|
constructor();
|
|
4
|
-
|
|
6
|
+
takeSeat({ seatIndex }: {
|
|
5
7
|
seatIndex: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
}): Promise<import('@tencentcloud/tuiroom-engine-js').TUIRequest | undefined>;
|
|
9
|
+
leaveSeat(): Promise<void | undefined>;
|
|
10
|
+
lockSeat({ seatIndex }: {
|
|
11
|
+
seatIndex: number;
|
|
12
|
+
}): Promise<any>;
|
|
13
|
+
unLockSeat({ seatIndex }: {
|
|
14
|
+
seatIndex: number;
|
|
15
|
+
}): Promise<any>;
|
|
16
|
+
kickUserOutOfSeat({ userId }: {
|
|
17
|
+
userId: string;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
moveUserToSeat({ userId, targetIndex, policy }: {
|
|
20
|
+
userId: string;
|
|
21
|
+
targetIndex: number;
|
|
22
|
+
policy: MoveSeatPolicy;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
closeRemoteCamera({ userId }: {
|
|
25
|
+
userId: string;
|
|
26
|
+
}): Promise<void | undefined>;
|
|
27
|
+
closeRemoteMicrophone({ userId }: {
|
|
28
|
+
userId: string;
|
|
10
29
|
}): Promise<void | undefined>;
|
|
30
|
+
openRemoteCamera({ userId, policy }: {
|
|
31
|
+
userId: string;
|
|
32
|
+
policy: DeviceControlPolicy;
|
|
33
|
+
}): Promise<any>;
|
|
34
|
+
openRemoteMicrophone({ userId, policy }: {
|
|
35
|
+
userId: string;
|
|
36
|
+
policy: DeviceControlPolicy;
|
|
37
|
+
}): Promise<any>;
|
|
38
|
+
muteMicrophone(): Promise<void>;
|
|
39
|
+
unmuteMicrophone(): Promise<void>;
|
|
11
40
|
startPlayStream({ view }: {
|
|
12
41
|
view: string;
|
|
13
42
|
}): Promise<void>;
|