@trtc/calls-uikit-vue 4.1.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/README-zh_CN.md +83 -0
- package/README.md +89 -0
- package/debug/GenerateTestUserSig-es.js +26 -0
- package/debug/lib-generate-test-usersig-es.min.js +2 -0
- package/package.json +42 -0
- package/src/Components/TUICallKit.vue +334 -0
- package/src/Components/assets/MicrophoneVolume/desktop/mic-off.svg +5 -0
- package/src/Components/assets/MicrophoneVolume/desktop/mic-on.svg +5 -0
- package/src/Components/assets/base/close.svg +1 -0
- package/src/Components/assets/base/error.svg +1 -0
- package/src/Components/assets/base/info.svg +1 -0
- package/src/Components/assets/base/loading-circle.svg +1 -0
- package/src/Components/assets/base/success.svg +1 -0
- package/src/Components/assets/base/waring.svg +1 -0
- package/src/Components/assets/button/accept.svg +1 -0
- package/src/Components/assets/button/background-blur-close.svg +1 -0
- package/src/Components/assets/button/background-blur-open.svg +1 -0
- package/src/Components/assets/button/camera-close.svg +1 -0
- package/src/Components/assets/button/camera-open.svg +1 -0
- package/src/Components/assets/button/desktop/arrow.png +0 -0
- package/src/Components/assets/button/desktop/fullScreen.svg +4 -0
- package/src/Components/assets/button/desktop/inviteUser.svg +1 -0
- package/src/Components/assets/button/desktop/minimize.svg +6 -0
- package/src/Components/assets/button/hangup.svg +1 -0
- package/src/Components/assets/button/microphone-close.svg +1 -0
- package/src/Components/assets/button/microphone-open.svg +1 -0
- package/src/Components/assets/button/mobile/down.svg +1 -0
- package/src/Components/assets/button/mobile/inviteUser.svg +1 -0
- package/src/Components/assets/button/mobile/minimize.svg +1 -0
- package/src/Components/assets/button/mobile/switch-camera.svg +1 -0
- package/src/Components/assets/button/mobile/up.svg +1 -0
- package/src/Components/assets/button/speaker-close.svg +1 -0
- package/src/Components/assets/button/speaker-open.svg +1 -0
- package/src/Components/assets/button/switch-audio.svg +1 -0
- package/src/Components/assets/common/arrows.svg +1 -0
- package/src/Components/assets/common/call.svg +1 -0
- package/src/Components/assets/common/close.svg +1 -0
- package/src/Components/assets/common/defaultAvatar.svg +1 -0
- package/src/Components/assets/common/loading-audio.svg +1 -0
- package/src/Components/assets/common/loading-video.png +0 -0
- package/src/Components/assets/common/microphone-volumn-close.svg +1 -0
- package/src/Components/assets/desktop/acceptAudio.svg +4 -0
- package/src/Components/assets/desktop/acceptVideo.svg +8 -0
- package/src/Components/assets/desktop/arrow.png +0 -0
- package/src/Components/assets/desktop/camera-false.svg +5 -0
- package/src/Components/assets/desktop/camera.svg +6 -0
- package/src/Components/assets/desktop/floatCallEnd.svg +3 -0
- package/src/Components/assets/desktop/floatFullScreen.svg +3 -0
- package/src/Components/assets/desktop/floatMicrophone.svg +4 -0
- package/src/Components/assets/desktop/floatMicrophoneClosed.svg +3 -0
- package/src/Components/assets/desktop/fullScreen.svg +4 -0
- package/src/Components/assets/desktop/hangup.svg +4 -0
- package/src/Components/assets/desktop/invite_user.svg +5 -0
- package/src/Components/assets/desktop/microphone-false.svg +8 -0
- package/src/Components/assets/desktop/microphone.svg +9 -0
- package/src/Components/assets/desktop/minimize.svg +6 -0
- package/src/Components/assets/desktop/permission/index.ts +11 -0
- package/src/Components/assets/desktop/permission/mac/permit-en.jpg +0 -0
- package/src/Components/assets/desktop/permission/mac/permit-zh.jpg +0 -0
- package/src/Components/assets/desktop/permission/win/permit-en.png +0 -0
- package/src/Components/assets/desktop/permission/win/permit-zh.png +0 -0
- package/src/Components/assets/desktop/switchScreen.svg +5 -0
- package/src/Components/assets/desktop/trans.svg +6 -0
- package/src/Components/assets/floatingWindow/desktop/floatCallEnd.svg +3 -0
- package/src/Components/assets/floatingWindow/desktop/floatFullScreen.svg +3 -0
- package/src/Components/assets/floatingWindow/desktop/floatMicrophone.svg +4 -0
- package/src/Components/assets/floatingWindow/desktop/floatMicrophoneClosed.svg +3 -0
- package/src/Components/assets/floatingWindow/mobile/camera-close.svg +1 -0
- package/src/Components/assets/floatingWindow/mobile/camera-open.svg +1 -0
- package/src/Components/assets/floatingWindow/mobile/earphone.svg +1 -0
- package/src/Components/assets/floatingWindow/mobile/microphone-close.svg +1 -0
- package/src/Components/assets/floatingWindow/mobile/microphone-open.svg +1 -0
- package/src/Components/assets/permission/desktop/index.ts +11 -0
- package/src/Components/assets/permission/desktop/mac/permit-en.jpg +0 -0
- package/src/Components/assets/permission/desktop/mac/permit-zh.jpg +0 -0
- package/src/Components/assets/permission/desktop/win/permit-en.png +0 -0
- package/src/Components/assets/permission/desktop/win/permit-zh.png +0 -0
- package/src/Components/assets/streamInfo/mobile/mic-off-h5.svg +1 -0
- package/src/Components/assets/streamInfo/mobile/mic-on-h5.svg +1 -0
- package/src/Components/assets/streamInfo/mobile/microphone-close-group.svg +1 -0
- package/src/Components/assets/streamInfo/mobile/microphone-close-single.svg +1 -0
- package/src/Components/assets/streamInfo/mobile/volumn.svg +1 -0
- package/src/Components/assets/streamInfo/networkStatus.png +0 -0
- package/src/Components/components/GroupCall/BackGround/BackGround.vue +20 -0
- package/src/Components/components/GroupCall/GroupCall.vue +129 -0
- package/src/Components/components/GroupCall/MediaContainer/MediaContainer.vue +267 -0
- package/src/Components/components/GroupCall/MediaContainer/StreamLoading/StreamLoading.vue +22 -0
- package/src/Components/components/SingleCall/MediaContainer/MediaContainer.vue +165 -0
- package/src/Components/components/SingleCall/SingleCall.vue +28 -0
- package/src/Components/components/SingleCall/hooks/useGetLargeViewName.ts +32 -0
- package/src/Components/components/base/Avatar/Avatar.ts +38 -0
- package/src/Components/components/base/Avatar/Avatar.vue +53 -0
- package/src/Components/components/base/Avatar/style/Avatar.scss +40 -0
- package/src/Components/components/base/Button/Button.ts +60 -0
- package/src/Components/components/base/Button/Button.vue +61 -0
- package/src/Components/components/base/Button/style/Button.scss +42 -0
- package/src/Components/components/base/Grid/Grid.ts +26 -0
- package/src/Components/components/base/Grid/Grid.vue +40 -0
- package/src/Components/components/base/Grid/GridItem/GridItem.vue +81 -0
- package/src/Components/components/base/Grid/GridItem/style/GridItem.scss +13 -0
- package/src/Components/components/base/Icon/Icon.ts +9 -0
- package/src/Components/components/base/Icon/Icon.vue +21 -0
- package/src/Components/components/base/Layout/Col/Col.ts +23 -0
- package/src/Components/components/base/Layout/Col/Col.vue +46 -0
- package/src/Components/components/base/Layout/Col/style/Col.scss +9 -0
- package/src/Components/components/base/Layout/Row/Row.ts +23 -0
- package/src/Components/components/base/Layout/Row/Row.vue +38 -0
- package/src/Components/components/base/Layout/Row/style/Row.scss +10 -0
- package/src/Components/components/base/Layout/constant.ts +1 -0
- package/src/Components/components/base/Loading/Circle/Circle.ts +13 -0
- package/src/Components/components/base/Loading/Circle/Circle.vue +36 -0
- package/src/Components/components/base/Loading/Circle/style/Circle.scss +26 -0
- package/src/Components/components/base/Loading/Dot/Dot.ts +13 -0
- package/src/Components/components/base/Loading/Dot/Dot.vue +44 -0
- package/src/Components/components/base/Loading/Dot/style/Dot.scss +61 -0
- package/src/Components/components/base/Loading/Loading.ts +29 -0
- package/src/Components/components/base/Loading/Loading.vue +36 -0
- package/src/Components/components/base/Loading/style/Loading.scss +18 -0
- package/src/Components/components/base/Message/Message.ts +117 -0
- package/src/Components/components/base/Message/Message.vue +60 -0
- package/src/Components/components/base/Message/style/Message.scss +49 -0
- package/src/Components/components/base/MessageGroup/MessageGroup.vue +37 -0
- package/src/Components/components/base/Overlay/Overlay.ts +46 -0
- package/src/Components/components/base/Overlay/Overlay.vue +75 -0
- package/src/Components/components/base/Overlay/style/Overlay.scss +40 -0
- package/src/Components/components/base/Popover/Popover.ts +36 -0
- package/src/Components/components/base/Popover/Popover.vue +40 -0
- package/src/Components/components/base/Popover/PopoverWeb/PopoverWeb.vue +110 -0
- package/src/Components/components/base/Popover/PopoverWx/PopoverWx.vue +15 -0
- package/src/Components/components/base/Popover/style/Popover.scss +30 -0
- package/src/Components/components/base/Popover/utils/calculatePosition.ts +50 -0
- package/src/Components/components/base/Portal/Portal.ts +14 -0
- package/src/Components/components/base/Portal/Portal.vue +22 -0
- package/src/Components/components/base/Portal/miniprogram/Portal.vue +20 -0
- package/src/Components/components/base/Portal/vue2/Portal.vue +53 -0
- package/src/Components/components/base/Portal/vue3/Portal.vue +19 -0
- package/src/Components/components/base/TKImage/TKImage.ts +34 -0
- package/src/Components/components/base/TKImage/TKImage.vue +77 -0
- package/src/Components/components/base/TKImage/style/TKImage.scss +20 -0
- package/src/Components/components/base/TKText/TKText.ts +24 -0
- package/src/Components/components/base/TKText/TKText.vue +43 -0
- package/src/Components/components/base/TKText/style/TKText.scss +19 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindow.ts +19 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindow.vue +46 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.ts +5 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.vue +62 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindowItem/style/ToggleWindowItem.scss +38 -0
- package/src/Components/components/base/ToggleWindow/constant.ts +1 -0
- package/src/Components/components/base/ToggleWindow/style/ToggleWindow.scss +7 -0
- package/src/Components/components/base/assets/message/close.svg +5 -0
- package/src/Components/components/base/assets/message/error.svg +1 -0
- package/src/Components/components/base/assets/message/info.svg +1 -0
- package/src/Components/components/base/assets/message/success.svg +1 -0
- package/src/Components/components/base/assets/message/warning.svg +1 -0
- package/src/Components/components/base/constants/index.ts +8 -0
- package/src/Components/components/base/hooks/useListenerEvent.ts +36 -0
- package/src/Components/components/base/hooks/useOnClickOutSide.ts +27 -0
- package/src/Components/components/base/styles/common.scss +43 -0
- package/src/Components/components/base/styles/var.scss +132 -0
- package/src/Components/components/base/util/checkEnv.ts +51 -0
- package/src/Components/components/base/util/checkVueVersion.ts +11 -0
- package/src/Components/components/base/util/classNames.ts +34 -0
- package/src/Components/components/base/util/filterObject.ts +11 -0
- package/src/Components/components/base/util/index.ts +10 -0
- package/src/Components/components/common/AudioStream/AudioStream.ts +29 -0
- package/src/Components/components/common/AudioStream/AudioStream.vue +65 -0
- package/src/Components/components/common/Button/Accept.vue +66 -0
- package/src/Components/components/common/Button/Camera.vue +115 -0
- package/src/Components/components/common/Button/FullScreen.vue +32 -0
- package/src/Components/components/common/Button/Hangup.vue +57 -0
- package/src/Components/components/common/Button/InviteUser.vue +52 -0
- package/src/Components/components/common/Button/Microphone.vue +109 -0
- package/src/Components/components/common/Button/Minimize.vue +39 -0
- package/src/Components/components/common/Button/Reject.vue +52 -0
- package/src/Components/components/common/Button/Speaker.vue +98 -0
- package/src/Components/components/common/Button/SwitchCamera.vue +58 -0
- package/src/Components/components/common/Button/ToggleButtonPanel.vue +44 -0
- package/src/Components/components/common/Button/VirtualBackground.vue +76 -0
- package/src/Components/components/common/Button/hooks/useConfig.ts +33 -0
- package/src/Components/components/common/Button/props/Button.ts +15 -0
- package/src/Components/components/common/Button/style/common.scss +5 -0
- package/src/Components/components/common/Button/style/desktop.scss +49 -0
- package/src/Components/components/common/Button/style/index.scss +2 -0
- package/src/Components/components/common/Button/style/mobile.scss +63 -0
- package/src/Components/components/common/ButtonPanel/ButtonPanel.vue +238 -0
- package/src/Components/components/common/ButtonPanel/config/InitConfig.ts +248 -0
- package/src/Components/components/common/ButtonPanel/config/VirtualBackgroundMobileConfig.ts +29 -0
- package/src/Components/components/common/ButtonPanel/hooks/useButtonPanelLayout.ts +63 -0
- package/src/Components/components/common/DeviceSelect/DeviceSelect.ts +11 -0
- package/src/Components/components/common/DeviceSelect/DeviceSelect.vue +158 -0
- package/src/Components/components/common/FloatWindow/FloatWindow.vue +64 -0
- package/src/Components/components/common/FloatWindow/desktop/FloatWindow.vue +106 -0
- package/src/Components/components/common/FloatWindow/mobile/FloatWindow.vue +28 -0
- package/src/Components/components/common/FloatWindow/mobile/FloatWindowGroupCall.vue +141 -0
- package/src/Components/components/common/FloatWindow/mobile/FloatWindowSingleCall.vue +109 -0
- package/src/Components/components/common/JoinGroupCard/JoinGroupCard.vue +51 -0
- package/src/Components/components/common/JoinGroupCard/desktop/JoinGroupCard.scss +80 -0
- package/src/Components/components/common/JoinGroupCard/desktop/JoinGroupCard.vue +57 -0
- package/src/Components/components/common/JoinGroupCard/mobile/JoinGroupCard.scss +60 -0
- package/src/Components/components/common/JoinGroupCard/mobile/JoinGroupCard.vue +65 -0
- package/src/Components/components/common/MicVolume/MicVolume.vue +37 -0
- package/src/Components/components/common/MicVolume/MicVolumeClosed.vue +11 -0
- package/src/Components/components/common/MicrophoneVolume/MicrophoneVolume.ts +10 -0
- package/src/Components/components/common/MicrophoneVolume/MicrophoneVolume.vue +61 -0
- package/src/Components/components/common/OverlayStream/OverlayStream.ts +102 -0
- package/src/Components/components/common/OverlayStream/OverlayStream.vue +104 -0
- package/src/Components/components/common/OverlayStream/style/OverlayStream.scss +12 -0
- package/src/Components/components/common/OverlayStream/style/mobile.scss +32 -0
- package/src/Components/components/common/OverlayStream/style/pc.scss +21 -0
- package/src/Components/components/common/PermitTip/CloseIcon.vue +3 -0
- package/src/Components/components/common/PermitTip/PermitTip.ts +33 -0
- package/src/Components/components/common/PermitTip/PermitTip.vue +62 -0
- package/src/Components/components/common/PermitTip/SystemPermitTip.vue +160 -0
- package/src/Components/components/common/Player/Player.ts +18 -0
- package/src/Components/components/common/Player/Player.vue +59 -0
- package/src/Components/components/common/Player/WeChatPlayer/WeChatPlayer.vue +101 -0
- package/src/Components/components/common/Player/WeChatPlayer/style/index.scss +38 -0
- package/src/Components/components/common/Popover/Popover.vue +85 -0
- package/src/Components/components/common/Pusher/Pusher.ts +18 -0
- package/src/Components/components/common/Pusher/Pusher.vue +78 -0
- package/src/Components/components/common/Pusher/WeChatPusher/WeChatPusher.vue +70 -0
- package/src/Components/components/common/Pusher/WeChatPusher/style/index.scss +37 -0
- package/src/Components/components/common/SelectUser/SelectUser.vue +74 -0
- package/src/Components/components/common/SelectUser/components/Dialog/TDialog.vue +94 -0
- package/src/Components/components/common/SelectUser/components/Dialog/style/color.css +43 -0
- package/src/Components/components/common/SelectUser/components/Dialog/style/dialog.css +3 -0
- package/src/Components/components/common/SelectUser/components/Dialog/style/h5.css +49 -0
- package/src/Components/components/common/SelectUser/components/Dialog/style/web.css +55 -0
- package/src/Components/components/common/SelectUser/components/Icon/TIcon.vue +44 -0
- package/src/Components/components/common/SelectUser/components/Icon/style/icon.css +6 -0
- package/src/Components/components/common/SelectUser/components/Transfer/TTransfer.vue +304 -0
- package/src/Components/components/common/SelectUser/components/Transfer/icon/back.svg +16 -0
- package/src/Components/components/common/SelectUser/components/Transfer/icon/cancel.svg +23 -0
- package/src/Components/components/common/SelectUser/components/Transfer/icon/selected.svg +27 -0
- package/src/Components/components/common/SelectUser/components/Transfer/style/color.css +64 -0
- package/src/Components/components/common/SelectUser/components/Transfer/style/h5.css +86 -0
- package/src/Components/components/common/SelectUser/components/Transfer/style/transfer.css +17 -0
- package/src/Components/components/common/SelectUser/components/Transfer/style/web.css +146 -0
- package/src/Components/components/common/SelectUser/index.ts +12 -0
- package/src/Components/components/common/Swiper/Swiper.vue +145 -0
- package/src/Components/components/common/Swiper/SwiperSlider.vue +55 -0
- package/src/Components/components/common/Swiper/index.ts +10 -0
- package/src/Components/components/common/Swiper/useSlide.ts +56 -0
- package/src/Components/components/common/Swiper/useSwiperSliders.ts +34 -0
- package/src/Components/components/common/SwiperWx/Swiper.vue +123 -0
- package/src/Components/components/common/SwiperWx/SwiperSlider.vue +87 -0
- package/src/Components/components/common/SwiperWx/index.ts +5 -0
- package/src/Components/components/common/TKStreamInfo/StreamInfo.ts +34 -0
- package/src/Components/components/common/TKStreamInfo/StreamInfoMobile.vue +82 -0
- package/src/Components/components/common/TKStreamInfo/StreamInfoPC.vue +58 -0
- package/src/Components/components/common/TKStreamInfo/TKStreamInfo.vue +43 -0
- package/src/Components/components/common/Timer/Timer.ts +14 -0
- package/src/Components/components/common/Timer/Timer.vue +24 -0
- package/src/Components/components/common/Tip/Tip.ts +5 -0
- package/src/Components/components/common/Tip/Tip.vue +67 -0
- package/src/Components/components/common/Toast/Toast.ts +84 -0
- package/src/Components/components/common/Toast/Toast.vue +133 -0
- package/src/Components/components/common/Toast/index.ts +6 -0
- package/src/Components/components/common/Toast/type.ts +16 -0
- package/src/Components/components/common/TopBar/TopBar.ts +8 -0
- package/src/Components/components/common/TopBar/TopBar.vue +116 -0
- package/src/Components/components/common/Waiting/Waiting.vue +126 -0
- package/src/Components/components/config/button/ClosedPanelUI.ts +109 -0
- package/src/Components/components/config/button/DefaultUI.ts +544 -0
- package/src/Components/components/config/button/index.ts +2 -0
- package/src/Components/context/ButtonPanelContext.ts +6 -0
- package/src/Components/context/CallInfoContext.ts +15 -0
- package/src/Components/context/CallerUserInfoContext.ts +9 -0
- package/src/Components/context/CustomUIConfigContext.ts +1 -0
- package/src/Components/context/FloatWindowContext.ts +5 -0
- package/src/Components/context/FocusItemContext.ts +1 -0
- package/src/Components/context/IsClickableContext.ts +1 -0
- package/src/Components/context/PopoverContext.ts +1 -0
- package/src/Components/context/TranslateContext.ts +1 -0
- package/src/Components/context/UserInfoContextExcludeVolume.ts +8 -0
- package/src/Components/context/index.ts +10 -0
- package/src/Components/hooks/index.ts +20 -0
- package/src/Components/hooks/useButtonPanelStatus.ts +6 -0
- package/src/Components/hooks/useCallDuration.ts +32 -0
- package/src/Components/hooks/useCallInfoContext.ts +6 -0
- package/src/Components/hooks/useCallerUserInfoContext.ts +6 -0
- package/src/Components/hooks/useCustomUI.ts +7 -0
- package/src/Components/hooks/useCustomUIButtonConfig.ts +96 -0
- package/src/Components/hooks/useDeviceList.ts +51 -0
- package/src/Components/hooks/useFloatWindowContext.ts +6 -0
- package/src/Components/hooks/useFocusContext.ts +6 -0
- package/src/Components/hooks/useGetVolumeMap.ts +59 -0
- package/src/Components/hooks/useGroupCallLayout.ts +142 -0
- package/src/Components/hooks/useIsClickableContext.ts +6 -0
- package/src/Components/hooks/useJoinGroupCall.ts +69 -0
- package/src/Components/hooks/useNetWorkStatus.ts +30 -0
- package/src/Components/hooks/usePlayer.ts +32 -0
- package/src/Components/hooks/usePopover.ts +6 -0
- package/src/Components/hooks/useTip.ts +42 -0
- package/src/Components/hooks/useTranslate.ts +7 -0
- package/src/Components/hooks/useUserInfoContextExcludeVolume.ts +6 -0
- package/src/Components/hooks/useViewBackgroundConfig.ts +12 -0
- package/src/Components/util/deepClone.ts +15 -0
- package/src/Components/util/findValues.ts +21 -0
- package/src/Components/util/index.ts +6 -0
- package/src/Components/util/isEmpty.ts +15 -0
- package/src/Components/util/isEqual.ts +40 -0
- package/src/Components/util/isObject.ts +3 -0
- package/src/Components/util/stringToPath.ts +78 -0
- package/src/Components/util/toggleScreen.ts +10 -0
- package/src/Components/util/uiConfig.ts +74 -0
- package/src/TUICallService/CallService/UIDesign.ts +174 -0
- package/src/TUICallService/CallService/bellContext.ts +88 -0
- package/src/TUICallService/CallService/chatCombine.ts +313 -0
- package/src/TUICallService/CallService/engineEventHandler.ts +404 -0
- package/src/TUICallService/CallService/index.ts +799 -0
- package/src/TUICallService/CallService/miniProgram.ts +65 -0
- package/src/TUICallService/CallService/utils.ts +281 -0
- package/src/TUICallService/TUIGlobal/tuiGlobal.ts +43 -0
- package/src/TUICallService/TUIStore/callStore.ts +93 -0
- package/src/TUICallService/TUIStore/tuiStore.ts +167 -0
- package/src/TUICallService/assets/phone_dialing.mp3 +0 -0
- package/src/TUICallService/assets/phone_ringing.mp3 +0 -0
- package/src/TUICallService/const/call.ts +157 -0
- package/src/TUICallService/const/error.ts +20 -0
- package/src/TUICallService/const/index.ts +103 -0
- package/src/TUICallService/const/log.ts +9 -0
- package/src/TUICallService/index.ts +37 -0
- package/src/TUICallService/interface/ICallService.ts +70 -0
- package/src/TUICallService/interface/ICallStore.ts +55 -0
- package/src/TUICallService/interface/ITUIGlobal.ts +36 -0
- package/src/TUICallService/interface/ITUIStore.ts +87 -0
- package/src/TUICallService/interface/index.ts +4 -0
- package/src/TUICallService/locales/en.ts +135 -0
- package/src/TUICallService/locales/index.ts +57 -0
- package/src/TUICallService/locales/ja_JP.ts +134 -0
- package/src/TUICallService/locales/zh-cn.ts +130 -0
- package/src/TUICallService/serve/callManager.ts +109 -0
- package/src/TUICallService/utils/common-utils.ts +269 -0
- package/src/TUICallService/utils/decorators/promise-retry.ts +51 -0
- package/src/TUICallService/utils/env.ts +51 -0
- package/src/TUICallService/utils/index.ts +32 -0
- package/src/TUICallService/utils/is-empty.ts +31 -0
- package/src/TUICallService/utils/retry.ts +88 -0
- package/src/TUICallService/utils/timer.ts +162 -0
- package/src/TUICallService/utils/validate/avoidRepeatedCall.ts +39 -0
- package/src/TUICallService/utils/validate/index.ts +7 -0
- package/src/adapter-vue.ts +4 -0
- package/src/index.ts +65 -0
- package/stats.html +4949 -0
- package/tuicall-uikit-vue.es.js +8568 -0
- package/tuicall-uikit-vue.umd.js +2 -0
- package/types/Components/assets/desktop/permission/index.d.ts +5 -0
- package/types/Components/assets/permission/desktop/index.d.ts +5 -0
- package/types/Components/components/SingleCall/hooks/useGetLargeViewName.d.ts +2 -0
- package/types/Components/components/base/Avatar/Avatar.d.ts +34 -0
- package/types/Components/components/base/Button/Button.d.ts +56 -0
- package/types/Components/components/base/Grid/Grid.d.ts +23 -0
- package/types/Components/components/base/Icon/Icon.d.ts +9 -0
- package/types/Components/components/base/Layout/Col/Col.d.ts +20 -0
- package/types/Components/components/base/Layout/Row/Row.d.ts +20 -0
- package/types/Components/components/base/Layout/constant.d.ts +1 -0
- package/types/Components/components/base/Loading/Circle/Circle.d.ts +13 -0
- package/types/Components/components/base/Loading/Dot/Dot.d.ts +13 -0
- package/types/Components/components/base/Loading/Loading.d.ts +26 -0
- package/types/Components/components/base/Message/Message.d.ts +50 -0
- package/types/Components/components/base/Overlay/Overlay.d.ts +45 -0
- package/types/Components/components/base/Popover/Popover.d.ts +34 -0
- package/types/Components/components/base/Popover/utils/calculatePosition.d.ts +4 -0
- package/types/Components/components/base/Portal/Portal.d.ts +14 -0
- package/types/Components/components/base/TKImage/TKImage.d.ts +33 -0
- package/types/Components/components/base/TKText/TKText.d.ts +24 -0
- package/types/Components/components/base/ToggleWindow/ToggleWindow.d.ts +18 -0
- package/types/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.d.ts +5 -0
- package/types/Components/components/base/ToggleWindow/constant.d.ts +1 -0
- package/types/Components/components/base/constants/index.d.ts +7 -0
- package/types/Components/components/base/hooks/useListenerEvent.d.ts +13 -0
- package/types/Components/components/base/hooks/useOnClickOutSide.d.ts +1 -0
- package/types/Components/components/base/util/checkEnv.d.ts +10 -0
- package/types/Components/components/base/util/checkVueVersion.d.ts +4 -0
- package/types/Components/components/base/util/classNames.d.ts +1 -0
- package/types/Components/components/base/util/filterObject.d.ts +1 -0
- package/types/Components/components/base/util/index.d.ts +5 -0
- package/types/Components/components/common/AudioStream/AudioStream.d.ts +29 -0
- package/types/Components/components/common/Button/hooks/useConfig.d.ts +2 -0
- package/types/Components/components/common/Button/props/Button.d.ts +15 -0
- package/types/Components/components/common/ButtonPanel/config/InitConfig.d.ts +89 -0
- package/types/Components/components/common/ButtonPanel/config/VirtualBackgroundMobileConfig.d.ts +66 -0
- package/types/Components/components/common/ButtonPanel/hooks/useButtonPanelLayout.d.ts +4 -0
- package/types/Components/components/common/DeviceSelect/DeviceSelect.d.ts +11 -0
- package/types/Components/components/common/MicrophoneVolume/MicrophoneVolume.d.ts +10 -0
- package/types/Components/components/common/OverlayStream/OverlayStream.d.ts +92 -0
- package/types/Components/components/common/PermitTip/PermitTip.d.ts +3 -0
- package/types/Components/components/common/Player/Player.d.ts +18 -0
- package/types/Components/components/common/Pusher/Pusher.d.ts +18 -0
- package/types/Components/components/common/SelectUser/index.d.ts +6 -0
- package/types/Components/components/common/Swiper/index.d.ts +7 -0
- package/types/Components/components/common/Swiper/useSlide.d.ts +7 -0
- package/types/Components/components/common/Swiper/useSwiperSliders.d.ts +1 -0
- package/types/Components/components/common/SwiperWx/index.d.ts +4 -0
- package/types/Components/components/common/TKStreamInfo/StreamInfo.d.ts +34 -0
- package/types/Components/components/common/Timer/Timer.d.ts +14 -0
- package/types/Components/components/common/Tip/Tip.d.ts +5 -0
- package/types/Components/components/common/Toast/Toast.d.ts +4 -0
- package/types/Components/components/common/Toast/index.d.ts +2 -0
- package/types/Components/components/common/Toast/type.d.ts +16 -0
- package/types/Components/components/common/TopBar/TopBar.d.ts +8 -0
- package/types/Components/components/config/button/ClosedPanelUI.d.ts +3380 -0
- package/types/Components/components/config/button/DefaultUI.d.ts +14751 -0
- package/types/Components/components/config/button/index.d.ts +2 -0
- package/types/Components/context/ButtonPanelContext.d.ts +4 -0
- package/types/Components/context/CallInfoContext.d.ts +13 -0
- package/types/Components/context/CallerUserInfoContext.d.ts +8 -0
- package/types/Components/context/CustomUIConfigContext.d.ts +1 -0
- package/types/Components/context/FloatWindowContext.d.ts +4 -0
- package/types/Components/context/FocusItemContext.d.ts +1 -0
- package/types/Components/context/IsClickableContext.d.ts +1 -0
- package/types/Components/context/PopoverContext.d.ts +1 -0
- package/types/Components/context/TranslateContext.d.ts +1 -0
- package/types/Components/context/UserInfoContextExcludeVolume.d.ts +6 -0
- package/types/Components/context/index.d.ts +10 -0
- package/types/Components/hooks/index.d.ts +20 -0
- package/types/Components/hooks/useButtonPanelStatus.d.ts +2 -0
- package/types/Components/hooks/useCallDuration.d.ts +3 -0
- package/types/Components/hooks/useCallInfoContext.d.ts +2 -0
- package/types/Components/hooks/useCallerUserInfoContext.d.ts +2 -0
- package/types/Components/hooks/useCustomUI.d.ts +3 -0
- package/types/Components/hooks/useCustomUIButtonConfig.d.ts +1 -0
- package/types/Components/hooks/useDeviceList.d.ts +7 -0
- package/types/Components/hooks/useFloatWindowContext.d.ts +2 -0
- package/types/Components/hooks/useFocusContext.d.ts +1 -0
- package/types/Components/hooks/useGetVolumeMap.d.ts +1 -0
- package/types/Components/hooks/useGroupCallLayout.d.ts +1 -0
- package/types/Components/hooks/useIsClickableContext.d.ts +2 -0
- package/types/Components/hooks/useJoinGroupCall.d.ts +9 -0
- package/types/Components/hooks/useNetWorkStatus.d.ts +3 -0
- package/types/Components/hooks/usePlayer.d.ts +1 -0
- package/types/Components/hooks/usePopover.d.ts +2 -0
- package/types/Components/hooks/useTip.d.ts +5 -0
- package/types/Components/hooks/useTranslate.d.ts +2 -0
- package/types/Components/hooks/useUserInfoContextExcludeVolume.d.ts +2 -0
- package/types/Components/hooks/useViewBackgroundConfig.d.ts +1 -0
- package/types/Components/util/deepClone.d.ts +1 -0
- package/types/Components/util/findValues.d.ts +1 -0
- package/types/Components/util/index.d.ts +6 -0
- package/types/Components/util/isEmpty.d.ts +1 -0
- package/types/Components/util/isEqual.d.ts +1 -0
- package/types/Components/util/isObject.d.ts +1 -0
- package/types/Components/util/stringToPath.d.ts +12 -0
- package/types/Components/util/toggleScreen.d.ts +1 -0
- package/types/Components/util/uiConfig.d.ts +3 -0
- package/types/TUICallService/CallService/UIDesign.d.ts +28 -0
- package/types/TUICallService/CallService/bellContext.d.ts +19 -0
- package/types/TUICallService/CallService/chatCombine.d.ts +50 -0
- package/types/TUICallService/CallService/engineEventHandler.d.ts +35 -0
- package/types/TUICallService/CallService/index.d.ts +98 -0
- package/types/TUICallService/CallService/miniProgram.d.ts +7 -0
- package/types/TUICallService/CallService/utils.d.ts +42 -0
- package/types/TUICallService/TUIGlobal/tuiGlobal.d.ts +21 -0
- package/types/TUICallService/TUIStore/callStore.d.ts +10 -0
- package/types/TUICallService/TUIStore/tuiStore.d.ts +57 -0
- package/types/TUICallService/const/call.d.ts +141 -0
- package/types/TUICallService/const/error.d.ts +2 -0
- package/types/TUICallService/const/index.d.ts +27 -0
- package/types/TUICallService/const/log.d.ts +7 -0
- package/types/TUICallService/index.d.ts +5 -0
- package/types/TUICallService/interface/ICallService.d.ts +69 -0
- package/types/TUICallService/interface/ICallStore.d.ts +47 -0
- package/types/TUICallService/interface/ITUIGlobal.d.ts +36 -0
- package/types/TUICallService/interface/ITUIStore.d.ts +83 -0
- package/types/TUICallService/interface/index.d.ts +4 -0
- package/types/TUICallService/locales/en.d.ts +128 -0
- package/types/TUICallService/locales/index.d.ts +10 -0
- package/types/TUICallService/locales/ja_JP.d.ts +127 -0
- package/types/TUICallService/locales/zh-cn.d.ts +123 -0
- package/types/TUICallService/serve/callManager.d.ts +11 -0
- package/types/TUICallService/utils/common-utils.d.ts +62 -0
- package/types/TUICallService/utils/decorators/promise-retry.d.ts +32 -0
- package/types/TUICallService/utils/env.d.ts +10 -0
- package/types/TUICallService/utils/index.d.ts +2 -0
- package/types/TUICallService/utils/is-empty.d.ts +2 -0
- package/types/TUICallService/utils/retry.d.ts +36 -0
- package/types/TUICallService/utils/timer.d.ts +64 -0
- package/types/TUICallService/utils/validate/avoidRepeatedCall.d.ts +10 -0
- package/types/TUICallService/utils/validate/index.d.ts +2 -0
- package/types/adapter-vue.d.ts +4 -0
- package/types/index.d.ts +11 -0
- package/types/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @property {String} call 1v1 通话 + 群组通话
|
|
3
|
+
* @property {String} CUSTOM 自定义 Store
|
|
4
|
+
*/
|
|
5
|
+
export declare enum StoreName {
|
|
6
|
+
CALL = "call",
|
|
7
|
+
CUSTOM = "custom"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @property {String} idle 空闲
|
|
11
|
+
* @property {String} connecting 呼叫等待中
|
|
12
|
+
* @property {String} connected 通话中
|
|
13
|
+
*/
|
|
14
|
+
export declare enum CallMediaType {
|
|
15
|
+
UNKNOWN = 0,
|
|
16
|
+
AUDIO = 1,
|
|
17
|
+
VIDEO = 2
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @property {String} caller 主叫
|
|
21
|
+
* @property {String} callee 被叫
|
|
22
|
+
*/
|
|
23
|
+
export declare enum CallRole {
|
|
24
|
+
UNKNOWN = "unknown",
|
|
25
|
+
CALLEE = "callee",
|
|
26
|
+
CALLER = "caller"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @property {String} idle 空闲
|
|
30
|
+
* @property {String} calling 呼叫等待中
|
|
31
|
+
* @property {String} connected 通话中
|
|
32
|
+
*/
|
|
33
|
+
export declare enum CallStatus {
|
|
34
|
+
IDLE = "idle",
|
|
35
|
+
CALLING = "calling",
|
|
36
|
+
CONNECTED = "connected"
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 视频画面显示模式
|
|
40
|
+
* 播放视频流默认使用 cover 模式; 播放屏幕共享流默认使用 contain 模式。
|
|
41
|
+
* @property {String} contain 优先保证视频内容全部显示。视频尺寸等比缩放,直至视频窗口的一边与视窗边框对齐。如果视频尺寸与显示视窗尺寸不一致,在保持长宽比的前提下,将视频进行缩放后填满视窗,缩放后的视频四周会有一圈黑边。
|
|
42
|
+
* @property {String} cover 优先保证视窗被填满。视频尺寸等比缩放,直至整个视窗被视频填满。如果视频长宽与显示窗口不同,则视频流会按照显示视窗的比例进行周边裁剪或图像拉伸后填满视窗
|
|
43
|
+
* @property {String} fill 保证视窗被填满的同时保证视频内容全部显示,但是不保证视频尺寸比例不变。视频的宽高会被拉伸至和视窗尺寸一致。(该选项值自 v4.12.1 开始支持)
|
|
44
|
+
*/
|
|
45
|
+
export declare enum VideoDisplayMode {
|
|
46
|
+
CONTAIN = "contain",
|
|
47
|
+
COVER = "cover",
|
|
48
|
+
FILL = "fill"
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 视频分辨率
|
|
52
|
+
* @property {String} 480p
|
|
53
|
+
* @property {String} 720p
|
|
54
|
+
* @property {String} 1080p
|
|
55
|
+
*/
|
|
56
|
+
export declare enum VideoResolution {
|
|
57
|
+
RESOLUTION_480P = "480p",
|
|
58
|
+
RESOLUTION_720P = "720p",
|
|
59
|
+
RESOLUTION_1080P = "1080p"
|
|
60
|
+
}
|
|
61
|
+
export declare enum LanguageType {
|
|
62
|
+
EN = "en",
|
|
63
|
+
'ZH-CN' = "zh-cn",
|
|
64
|
+
JA_JP = "ja_JP"
|
|
65
|
+
}
|
|
66
|
+
export type TDeviceList = {
|
|
67
|
+
cameraList: any[];
|
|
68
|
+
microphoneList: any[];
|
|
69
|
+
currentCamera: any;
|
|
70
|
+
currentMicrophone: any;
|
|
71
|
+
};
|
|
72
|
+
export declare const StatusChange: {
|
|
73
|
+
readonly IDLE: "idle";
|
|
74
|
+
readonly BE_INVITED: "be-invited";
|
|
75
|
+
readonly DIALING_C2C: "dialing-c2c";
|
|
76
|
+
readonly DIALING_GROUP: "dialing-group";
|
|
77
|
+
readonly CALLING_C2C_AUDIO: "calling-c2c-audio";
|
|
78
|
+
readonly CALLING_C2C_VIDEO: "calling-c2c-video";
|
|
79
|
+
readonly CALLING_GROUP_AUDIO: "calling-group-audio";
|
|
80
|
+
readonly CALLING_GROUP_VIDEO: "calling-group-video";
|
|
81
|
+
};
|
|
82
|
+
export declare const CallType: {
|
|
83
|
+
readonly unknown: CallMediaType.UNKNOWN;
|
|
84
|
+
readonly audio: CallMediaType.AUDIO;
|
|
85
|
+
readonly video: CallMediaType.VIDEO;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @property {String} ear 听筒
|
|
89
|
+
* @property {String} speaker 免提
|
|
90
|
+
*/
|
|
91
|
+
export declare enum AudioPlayBackDevice {
|
|
92
|
+
EAR = "ear",
|
|
93
|
+
SPEAKER = "speaker"
|
|
94
|
+
}
|
|
95
|
+
export declare enum DeviceType {
|
|
96
|
+
MICROPHONE = "microphone",
|
|
97
|
+
CAMERA = "camera",
|
|
98
|
+
SPEAKER = "speaker"
|
|
99
|
+
}
|
|
100
|
+
export declare enum CameraPosition {
|
|
101
|
+
FRONT = 0,
|
|
102
|
+
BACK = 1
|
|
103
|
+
}
|
|
104
|
+
export declare enum FeatureButton {
|
|
105
|
+
Camera = "camera",
|
|
106
|
+
Microphone = "microphone",
|
|
107
|
+
SwitchCamera = "switchCamera",
|
|
108
|
+
InviteUser = "inviteUser"
|
|
109
|
+
}
|
|
110
|
+
export declare enum ButtonState {
|
|
111
|
+
Open = "open",
|
|
112
|
+
Close = "close"
|
|
113
|
+
}
|
|
114
|
+
export interface IViewBackgroundImage {
|
|
115
|
+
[userId: string]: string;
|
|
116
|
+
}
|
|
117
|
+
export declare enum ViewName {
|
|
118
|
+
LOCAL = "local",
|
|
119
|
+
REMOTE = "remote"
|
|
120
|
+
}
|
|
121
|
+
export declare enum LayoutMode {
|
|
122
|
+
LocalInLargeView = "local",
|
|
123
|
+
RemoteInLargeView = "remote"
|
|
124
|
+
}
|
|
125
|
+
export interface ICustomUIConfig {
|
|
126
|
+
button?: {
|
|
127
|
+
[buttonName in FeatureButton]?: {
|
|
128
|
+
show: boolean;
|
|
129
|
+
state: ButtonState;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
viewBackground?: IViewBackgroundImage;
|
|
133
|
+
layoutMode?: LayoutMode;
|
|
134
|
+
}
|
|
135
|
+
export declare enum ACTION_TYPE {
|
|
136
|
+
INVITE = 1,
|
|
137
|
+
CANCEL_INVITE = 2,
|
|
138
|
+
ACCEPT_INVITE = 3,
|
|
139
|
+
REJECT_INVITE = 4,
|
|
140
|
+
INVITE_TIMEOUT = 5
|
|
141
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './call';
|
|
2
|
+
export * from './error';
|
|
3
|
+
export * from './log';
|
|
4
|
+
export declare const CALL_DATA_KEY: any;
|
|
5
|
+
export declare const CHAT_DATA_KEY: any;
|
|
6
|
+
export declare const PUSHER_ID: {
|
|
7
|
+
INITIAL_PUSHER: string;
|
|
8
|
+
NEW_PUSHER: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const NAME: any;
|
|
11
|
+
export declare const AudioCallIcon = "https://web.sdk.qcloud.com/component/TUIKit/assets/call.png";
|
|
12
|
+
export declare const VideoCallIcon = "https://web.sdk.qcloud.com/component/TUIKit/assets/call-video-reverse.svg";
|
|
13
|
+
export declare const MAX_NUMBER_ROOM_ID = 2147483647;
|
|
14
|
+
export declare const DEFAULT_BLUR_LEVEL = 3;
|
|
15
|
+
export declare const NETWORK_QUALITY_THRESHOLD = 4;
|
|
16
|
+
export declare enum PLATFORM {
|
|
17
|
+
MAC = "mac",
|
|
18
|
+
WIN = "win"
|
|
19
|
+
}
|
|
20
|
+
export declare enum COMPONENT {
|
|
21
|
+
TUI_CALL_KIT = 14,
|
|
22
|
+
TIM_CALL_KIT = 15
|
|
23
|
+
}
|
|
24
|
+
export declare enum ROOM_ID_TYPE {
|
|
25
|
+
NUMBER_ROOM_ID = 1,
|
|
26
|
+
STRING_ROOM_ID = 2
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import TUICallService, { TUIGlobal, TUIStore, uiDesign } from './CallService/index';
|
|
2
|
+
import { StoreName, NAME, CallRole, CallMediaType, CallStatus, StatusChange, VideoResolution, VideoDisplayMode, AudioPlayBackDevice, FeatureButton, LayoutMode } from './const/index';
|
|
3
|
+
import { t } from './locales/index';
|
|
4
|
+
declare const TUICallKitAPI: TUICallService;
|
|
5
|
+
export { TUIGlobal, TUIStore, StoreName, TUICallKitAPI, NAME, CallStatus, CallRole, CallMediaType, StatusChange, VideoResolution, VideoDisplayMode, AudioPlayBackDevice, t, uiDesign, FeatureButton, LayoutMode, };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CallStatus, CallRole } from '../const/index';
|
|
2
|
+
type SDKAppID = {
|
|
3
|
+
SDKAppID: number;
|
|
4
|
+
} | {
|
|
5
|
+
sdkAppID: number;
|
|
6
|
+
};
|
|
7
|
+
export interface IInitParamsBase {
|
|
8
|
+
userID: string;
|
|
9
|
+
userSig: string;
|
|
10
|
+
tim?: any;
|
|
11
|
+
isFromChat?: boolean;
|
|
12
|
+
component?: number;
|
|
13
|
+
}
|
|
14
|
+
export type IInitParams = IInitParamsBase & SDKAppID;
|
|
15
|
+
export interface ICallsParams {
|
|
16
|
+
userIDList: Array<string>;
|
|
17
|
+
type: number;
|
|
18
|
+
chatGroupID?: string;
|
|
19
|
+
roomID?: number;
|
|
20
|
+
strRoomID?: string;
|
|
21
|
+
userData?: string;
|
|
22
|
+
timeout?: number;
|
|
23
|
+
offlinePushInfo?: IOfflinePushInfo;
|
|
24
|
+
}
|
|
25
|
+
export interface IUserInfo {
|
|
26
|
+
userId: string;
|
|
27
|
+
nick?: string;
|
|
28
|
+
avatar?: string;
|
|
29
|
+
remark?: string;
|
|
30
|
+
displayUserInfo?: string;
|
|
31
|
+
isAudioAvailable?: boolean;
|
|
32
|
+
isVideoAvailable?: boolean;
|
|
33
|
+
volume?: number;
|
|
34
|
+
isEnter?: boolean;
|
|
35
|
+
domId?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IOfflinePushInfo {
|
|
38
|
+
title?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
androidOPPOChannelID?: string;
|
|
41
|
+
extension: String;
|
|
42
|
+
}
|
|
43
|
+
export interface ICallbackParam {
|
|
44
|
+
beforeCalling?: (...args: any[]) => void;
|
|
45
|
+
afterCalling?: (...args: any[]) => void;
|
|
46
|
+
onMinimized?: (...args: any[]) => void;
|
|
47
|
+
onMessageSentByMe?: (...args: any[]) => void;
|
|
48
|
+
kickedOut?: (...args: any[]) => void;
|
|
49
|
+
statusChanged?: (...args: any[]) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface ISelfInfoParams {
|
|
52
|
+
nickName: string;
|
|
53
|
+
avatar: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IBellParams {
|
|
56
|
+
callRole?: CallRole;
|
|
57
|
+
callStatus?: CallStatus;
|
|
58
|
+
isMuteBell?: boolean;
|
|
59
|
+
calleeBellFilePath?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface IInviteUserParams {
|
|
62
|
+
userIDList: string[];
|
|
63
|
+
offlinePushInfo?: IOfflinePushInfo;
|
|
64
|
+
}
|
|
65
|
+
export interface INetWorkQuality {
|
|
66
|
+
userId: string;
|
|
67
|
+
quality: number;
|
|
68
|
+
}
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CallStatus, CallRole, CallMediaType, VideoDisplayMode, VideoResolution, TDeviceList, CameraPosition, ICustomUIConfig } from '../const/index';
|
|
2
|
+
import { IUserInfo, INetWorkQuality } from './index';
|
|
3
|
+
export interface IToastInfo {
|
|
4
|
+
text: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ICallStore {
|
|
8
|
+
callStatus: CallStatus;
|
|
9
|
+
callRole: CallRole;
|
|
10
|
+
callMediaType: CallMediaType;
|
|
11
|
+
localUserInfo: IUserInfo;
|
|
12
|
+
localUserInfoExcludeVolume: IUserInfo;
|
|
13
|
+
remoteUserInfoList: Array<IUserInfo>;
|
|
14
|
+
remoteUserInfoExcludeVolumeList: Array<IUserInfo>;
|
|
15
|
+
callerUserInfo: IUserInfo;
|
|
16
|
+
isGroup: boolean;
|
|
17
|
+
callDuration: string;
|
|
18
|
+
callTips: string;
|
|
19
|
+
toastInfo: IToastInfo;
|
|
20
|
+
isMinimized: boolean;
|
|
21
|
+
enableFloatWindow: boolean;
|
|
22
|
+
bigScreenUserId: string;
|
|
23
|
+
language: string;
|
|
24
|
+
isClickable: boolean;
|
|
25
|
+
showPermissionTip: boolean;
|
|
26
|
+
netWorkQualityList: Array<INetWorkQuality>;
|
|
27
|
+
deviceList: TDeviceList;
|
|
28
|
+
callID: string;
|
|
29
|
+
groupID: string;
|
|
30
|
+
roomID: number | string;
|
|
31
|
+
roomIdType: number;
|
|
32
|
+
cameraPosition: CameraPosition;
|
|
33
|
+
isMuteSpeaker: boolean;
|
|
34
|
+
groupCallMembers: IUserInfo[];
|
|
35
|
+
displayMode: VideoDisplayMode;
|
|
36
|
+
videoResolution: VideoResolution;
|
|
37
|
+
pusher: any;
|
|
38
|
+
player: any[];
|
|
39
|
+
isEarPhone: boolean;
|
|
40
|
+
showSelectUser: boolean;
|
|
41
|
+
isShowEnableVirtualBackground: boolean;
|
|
42
|
+
enableVirtualBackground: boolean;
|
|
43
|
+
customUIConfig: ICustomUIConfig;
|
|
44
|
+
pusherId: string;
|
|
45
|
+
translate: Function;
|
|
46
|
+
isForceUseV2API: boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @interface TUIGlobal
|
|
3
|
+
* @property {Object} global 根据运行环境代理 wx、uni、window
|
|
4
|
+
* @property {Boolean} isPC true 标识是 pc 网页
|
|
5
|
+
* @property {Boolean} isH5 true 标识是 手机 H5
|
|
6
|
+
* @property {Boolean} isWeChat true 标识是 微信小程序
|
|
7
|
+
* @property {Boolean} isApp true 标识是 uniapp 打包的 native app
|
|
8
|
+
* @property {Boolean} isUniPlatform true 标识当前应用是通过 uniapp 平台打包的产物
|
|
9
|
+
* @property {Boolean} isOfficial true 标识是腾讯云官网 Demo 应用
|
|
10
|
+
* @property {Boolean} isWIN true 标识是window系统pc
|
|
11
|
+
* @property {Boolean} isMAC true 标识是mac os系统pc
|
|
12
|
+
*/
|
|
13
|
+
export interface ITUIGlobal {
|
|
14
|
+
global: any;
|
|
15
|
+
isPC: boolean;
|
|
16
|
+
isH5: boolean;
|
|
17
|
+
isWeChat: boolean;
|
|
18
|
+
isApp: boolean;
|
|
19
|
+
isUniPlatform: boolean;
|
|
20
|
+
isOfficial: boolean;
|
|
21
|
+
isWIN: boolean;
|
|
22
|
+
isMAC: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 初始化 TUIGlobal 环境变量
|
|
25
|
+
* @function
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
initEnv(): void;
|
|
29
|
+
/**
|
|
30
|
+
* 初始化 isOfficial
|
|
31
|
+
* @function
|
|
32
|
+
* @param {number} SDKAppID 当前实例的应用 SDKAppID
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
initOfficial(SDKAppID: number): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { StoreName } from '../const/index';
|
|
2
|
+
export type Task = Record<StoreName, Record<string, Map<(data?: unknown) => void, 1>>>;
|
|
3
|
+
export interface IOptions {
|
|
4
|
+
[key: string]: (newData?: any) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @class TUIStore
|
|
8
|
+
* @property {ICustomStore} customStore 自定义 store,可根据业务需要通过以下 API 进行数据操作。
|
|
9
|
+
*/
|
|
10
|
+
export interface ITUIStore {
|
|
11
|
+
task: Task;
|
|
12
|
+
/**
|
|
13
|
+
* UI 组件注册监听
|
|
14
|
+
* @function
|
|
15
|
+
* @param {StoreName} storeName store 名称
|
|
16
|
+
* @param {IOptions} options UI 组件注册的监听信息
|
|
17
|
+
* @param {Object} params 扩展参数
|
|
18
|
+
* @param {String} params.notifyRangeWhenWatch 注册时监听时的通知范围
|
|
19
|
+
* @example
|
|
20
|
+
* // UI 层监听会话列表更新通知
|
|
21
|
+
* let onConversationListUpdated = function(conversationList) {
|
|
22
|
+
* console.warn(conversationList);
|
|
23
|
+
* }
|
|
24
|
+
* TUIStore.watch(StoreName.CONV, {
|
|
25
|
+
* conversationList: onConversationListUpdated,
|
|
26
|
+
* })
|
|
27
|
+
*/
|
|
28
|
+
watch(storeName: StoreName, options: IOptions, params?: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* UI 组件取消监听回调
|
|
31
|
+
* @function
|
|
32
|
+
* @param {StoreName} storeName store 名称
|
|
33
|
+
* @param {IOptions} options 监听信息,包含需要取消的回调等
|
|
34
|
+
* @example
|
|
35
|
+
* // UI 层取消监听会话列表更新通知
|
|
36
|
+
* TUIStore.unwatch(StoreName.CONV, {
|
|
37
|
+
* conversationList: onConversationListUpdated,
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
unwatch(storeName: StoreName, options: IOptions | string): void;
|
|
41
|
+
/**
|
|
42
|
+
* 获取 store 中的上一个状态
|
|
43
|
+
* @function
|
|
44
|
+
* @param {StoreName} storeName store 名称
|
|
45
|
+
* @param {String} key 需要获取的 key
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
getPrevData(storeName: StoreName, key: string): any;
|
|
49
|
+
/**
|
|
50
|
+
* 获取 store 中的数据
|
|
51
|
+
* @function
|
|
52
|
+
* @param {StoreName} storeName store 名称
|
|
53
|
+
* @param {String} key 需要获取的 key
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
getData(storeName: StoreName, key: string): any;
|
|
57
|
+
/**
|
|
58
|
+
* 更新 store
|
|
59
|
+
* - 需要使用自定义 store 时可以用此 API 更新自定义数据
|
|
60
|
+
* @function
|
|
61
|
+
* @param {StoreName} storeName store 名称
|
|
62
|
+
* @param {String} key 需要更新的 key
|
|
63
|
+
* @example
|
|
64
|
+
* // UI 层更新自定义 Store 数据
|
|
65
|
+
* TUIStore.update(StoreName.CUSTOM, 'customKey', 'customData')
|
|
66
|
+
*/
|
|
67
|
+
update(storeName: StoreName, key: string, data: unknown): void;
|
|
68
|
+
/**
|
|
69
|
+
* 重置 store 内数据
|
|
70
|
+
* @function
|
|
71
|
+
* @param {StoreName} storeName store 名称
|
|
72
|
+
* @param {Array<string>} keyList 需要 reset 的 keyList
|
|
73
|
+
* @param {boolean} isNotificationNeeded 是否需要触发更新
|
|
74
|
+
* @private
|
|
75
|
+
*/
|
|
76
|
+
reset: (storeName: StoreName, keyList?: Array<string>, isNotificationNeeded?: boolean) => void;
|
|
77
|
+
/**
|
|
78
|
+
* 修改多个 key-value
|
|
79
|
+
* @param {Object} params 多个 key-value 组成的 object
|
|
80
|
+
* @param {StoreName} storeName store 名称
|
|
81
|
+
*/
|
|
82
|
+
updateStore: (params: any, name?: StoreName) => void;
|
|
83
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
hangup: string;
|
|
3
|
+
reject: string;
|
|
4
|
+
accept: string;
|
|
5
|
+
camera: string;
|
|
6
|
+
microphone: string;
|
|
7
|
+
speaker: string;
|
|
8
|
+
'open camera': string;
|
|
9
|
+
'close camera': string;
|
|
10
|
+
'open microphone': string;
|
|
11
|
+
'close microphone': string;
|
|
12
|
+
'video-to-audio': string;
|
|
13
|
+
'virtual-background': string;
|
|
14
|
+
'other side reject call': string;
|
|
15
|
+
'reject call': string;
|
|
16
|
+
cancel: string;
|
|
17
|
+
'other side line busy': string;
|
|
18
|
+
'in busy': string;
|
|
19
|
+
'call timeout': string;
|
|
20
|
+
'no response from the other side': string;
|
|
21
|
+
'end call': string;
|
|
22
|
+
'caller calling message': string;
|
|
23
|
+
'callee calling video message': string;
|
|
24
|
+
'callee calling audio message': string;
|
|
25
|
+
'no microphone access': string;
|
|
26
|
+
'no camera access': string;
|
|
27
|
+
'invite member': string;
|
|
28
|
+
'Invited group call': string;
|
|
29
|
+
waiting: string;
|
|
30
|
+
me: string;
|
|
31
|
+
'browser-authorization': string;
|
|
32
|
+
'mac-privacy': string;
|
|
33
|
+
'win-privacy': string;
|
|
34
|
+
'mac-preferences': string;
|
|
35
|
+
'win-preferences': string;
|
|
36
|
+
'Please enter userID': string;
|
|
37
|
+
'View more': string;
|
|
38
|
+
'people selected': string;
|
|
39
|
+
'Select all': string;
|
|
40
|
+
Cancel: string;
|
|
41
|
+
Done: string;
|
|
42
|
+
'exist group call': string;
|
|
43
|
+
'camera enabled': string;
|
|
44
|
+
'camera disabled': string;
|
|
45
|
+
'microphone enabled': string;
|
|
46
|
+
'microphone disabled': string;
|
|
47
|
+
'speaker enabled': string;
|
|
48
|
+
'speaker disabled': string;
|
|
49
|
+
'open speaker': string;
|
|
50
|
+
'close speaker': string;
|
|
51
|
+
'wait to be called': string;
|
|
52
|
+
answered: string;
|
|
53
|
+
'people in the call': string;
|
|
54
|
+
'failed to obtain speakers': string;
|
|
55
|
+
'you have a new call': string;
|
|
56
|
+
'switch camera': string;
|
|
57
|
+
join: string;
|
|
58
|
+
'people on the call': string;
|
|
59
|
+
"Supports a maximum of 9 people for simultaneous calls": string;
|
|
60
|
+
you: string;
|
|
61
|
+
"The network is poor during your current call": string;
|
|
62
|
+
"The other user network is poor during the current call": string;
|
|
63
|
+
"TUICallKit init is not complete": string;
|
|
64
|
+
"Video call": string;
|
|
65
|
+
"Voice call": string;
|
|
66
|
+
"Call End": string;
|
|
67
|
+
"Switch voice call": string;
|
|
68
|
+
"Switch video call": string;
|
|
69
|
+
"Call duration": string;
|
|
70
|
+
"Call Cancel": string;
|
|
71
|
+
"Other Side Cancel": string;
|
|
72
|
+
Decline: string;
|
|
73
|
+
"Other Side Decline": string;
|
|
74
|
+
"No answer": string;
|
|
75
|
+
"Other Side No Answer": string;
|
|
76
|
+
Answered: string;
|
|
77
|
+
"Other Side Line Busy": string;
|
|
78
|
+
"Line Busy": string;
|
|
79
|
+
'Those involved': string;
|
|
80
|
+
call: string;
|
|
81
|
+
'video-call': string;
|
|
82
|
+
'audio-call': string;
|
|
83
|
+
search: string;
|
|
84
|
+
'search-result': string;
|
|
85
|
+
'no-user': string;
|
|
86
|
+
'member-not-added': string;
|
|
87
|
+
'input-phone-userID': string;
|
|
88
|
+
'not-login': string;
|
|
89
|
+
'login-status-expire': string;
|
|
90
|
+
'experience-multi-call': string;
|
|
91
|
+
'not-support-multi-call': string;
|
|
92
|
+
userID: string;
|
|
93
|
+
'already-enter': string;
|
|
94
|
+
'camera-opened': string;
|
|
95
|
+
'camera-closed': string;
|
|
96
|
+
'microphone-opened': string;
|
|
97
|
+
'microphone-closed': string;
|
|
98
|
+
timeout: string;
|
|
99
|
+
'kick out': string;
|
|
100
|
+
'image-resolution': string;
|
|
101
|
+
'default-image-resolution': string;
|
|
102
|
+
'invited-person': string;
|
|
103
|
+
'be-rejected': string;
|
|
104
|
+
'be-no-response': string;
|
|
105
|
+
'be-line-busy': string;
|
|
106
|
+
'be-canceled': string;
|
|
107
|
+
'voice-call-end': string;
|
|
108
|
+
'video-call-end': string;
|
|
109
|
+
'method-call-failed': string;
|
|
110
|
+
'failed-to-obtain-permission': string;
|
|
111
|
+
'environment-detection-failed': string;
|
|
112
|
+
'switchToAudioCall-call-failed': string;
|
|
113
|
+
'switchToVideoCall-call-failed': string;
|
|
114
|
+
'microphone-unavailable': string;
|
|
115
|
+
'camera-unavailable': string;
|
|
116
|
+
'ban-device': string;
|
|
117
|
+
'not-supported-webrtc': string;
|
|
118
|
+
'blacklist-user-tips': string;
|
|
119
|
+
'is-already-calling': string;
|
|
120
|
+
'need-init': string;
|
|
121
|
+
"can't call yourself": string;
|
|
122
|
+
'Use-phone-and-computer': string;
|
|
123
|
+
'Wechat scan right QR code': string;
|
|
124
|
+
'Scan the QR code above': string;
|
|
125
|
+
'accept-error': string;
|
|
126
|
+
'accept-device-error': string;
|
|
127
|
+
'call-error': string;
|
|
128
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const CallTips: any;
|
|
2
|
+
export declare const languageData: languageDataType;
|
|
3
|
+
export declare function t(args: any): string;
|
|
4
|
+
interface languageItemType {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
}
|
|
7
|
+
interface languageDataType {
|
|
8
|
+
[key: string]: languageItemType;
|
|
9
|
+
}
|
|
10
|
+
export {};
|