@trtc/calls-uikit-react 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 +97 -0
- package/README.md +104 -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/TUICallKit.module.scss +21 -0
- package/src/Components/TUICallKit/TUICallKit.tsx +267 -0
- package/src/Components/TUICallKit/index.ts +3 -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 +10 -0
- package/src/Components/assets/button/backgroundBlurClose.svg +3 -0
- package/src/Components/assets/button/backgroundBlurOpen.svg +3 -0
- package/src/Components/assets/button/camera-close.svg +8 -0
- package/src/Components/assets/button/camera-open.svg +3 -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/minimize.svg +6 -0
- package/src/Components/assets/button/hangup.svg +3 -0
- package/src/Components/assets/button/microphone-close.svg +4 -0
- package/src/Components/assets/button/microphone-open.svg +4 -0
- package/src/Components/assets/button/mobile/down.svg +4 -0
- package/src/Components/assets/button/mobile/minimize.svg +4 -0
- package/src/Components/assets/button/mobile/switch-camera.svg +3 -0
- package/src/Components/assets/button/mobile/up.svg +4 -0
- package/src/Components/assets/button/speaker-close.svg +4 -0
- package/src/Components/assets/button/speaker-open.svg +3 -0
- package/src/Components/assets/button/switch-audio.svg +3 -0
- package/src/Components/assets/callMessage/audioCall.svg +3 -0
- package/src/Components/assets/callMessage/videoCall.svg +3 -0
- package/src/Components/assets/common/defaultAvatar.svg +11 -0
- package/src/Components/assets/common/microphone-volumn-close.svg +9 -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 +14 -0
- package/src/Components/assets/floatingWindow/mobile/camera-open.svg +14 -0
- package/src/Components/assets/floatingWindow/mobile/earphone.svg +3 -0
- package/src/Components/assets/floatingWindow/mobile/microphone-close.svg +4 -0
- package/src/Components/assets/floatingWindow/mobile/microphone-open.svg +4 -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/microphone-close-group.svg +19 -0
- package/src/Components/assets/streamInfo/mobile/microphone-close-single.svg +6 -0
- package/src/Components/assets/streamInfo/mobile/volumn.svg +20 -0
- package/src/Components/assets/streamInfo/networkStatus.svg +22 -0
- package/src/Components/components/GroupCall/GroupCall.module.scss +13 -0
- package/src/Components/components/GroupCall/GroupCall.tsx +82 -0
- package/src/Components/components/GroupCall/MediaContainer/AudioStream/AudioStream.tsx +41 -0
- package/src/Components/components/GroupCall/MediaContainer/MediaContainer.module.scss +74 -0
- package/src/Components/components/GroupCall/MediaContainer/MediaContainer.tsx +138 -0
- package/src/Components/components/GroupCall/MediaContainer/StreamLoading/StreamLoading.tsx +48 -0
- package/src/Components/components/GroupCall/MediaContainer/index.ts +3 -0
- package/src/Components/components/GroupCall/Waiting/Waiting.module.scss +44 -0
- package/src/Components/components/GroupCall/Waiting/Waiting.tsx +89 -0
- package/src/Components/components/SingleCall/MediaContainer/AudioStream/AudioStream.tsx +86 -0
- package/src/Components/components/SingleCall/MediaContainer/MediaContainer.module.scss +33 -0
- package/src/Components/components/SingleCall/MediaContainer/MediaContainer.tsx +121 -0
- package/src/Components/components/SingleCall/MediaContainer/hooks/useGetLargeViewName.ts +29 -0
- package/src/Components/components/SingleCall/MediaContainer/index.ts +3 -0
- package/src/Components/components/SingleCall/SingleCall.module.scss +28 -0
- package/src/Components/components/SingleCall/SingleCall.tsx +54 -0
- package/src/Components/components/SingleCall/Waiting/Waiting.module.scss +3 -0
- package/src/Components/components/SingleCall/Waiting/Waiting.tsx +45 -0
- package/src/Components/components/base/Avatar/Avatar.scss +28 -0
- package/src/Components/components/base/Avatar/Avatar.tsx +52 -0
- package/src/Components/components/base/Avatar/index.ts +3 -0
- package/src/Components/components/base/Button/Button.scss +122 -0
- package/src/Components/components/base/Button/Button.tsx +107 -0
- package/src/Components/components/base/Button/index.ts +3 -0
- package/src/Components/components/base/Drag/Drag.tsx +155 -0
- package/src/Components/components/base/Drag/index.tsx +3 -0
- package/src/Components/components/base/Grid/Col/Col.scss +31 -0
- package/src/Components/components/base/Grid/Col/Col.tsx +52 -0
- package/src/Components/components/base/Grid/Col/index.ts +3 -0
- package/src/Components/components/base/Grid/Row/Row.scss +27 -0
- package/src/Components/components/base/Grid/Row/Row.tsx +51 -0
- package/src/Components/components/base/Grid/Row/index.ts +5 -0
- package/src/Components/components/base/Grid/style/mixin.scss +61 -0
- package/src/Components/components/base/GridLayout/GridLayout.tsx +189 -0
- package/src/Components/components/base/GridLayout/GridPlusItem/GridPlusItem.scss +11 -0
- package/src/Components/components/base/GridLayout/GridPlusItem/GridPlusItem.tsx +37 -0
- package/src/Components/components/base/GridLayout/index.ts +7 -0
- package/src/Components/components/base/Icon/Icon.tsx +25 -0
- package/src/Components/components/base/Loading/Circle/Cilrcle.tsx +20 -0
- package/src/Components/components/base/Loading/Circle/Circle.scss +29 -0
- package/src/Components/components/base/Loading/Dot/Dot.scss +69 -0
- package/src/Components/components/base/Loading/Dot/Dot.tsx +21 -0
- package/src/Components/components/base/Loading/Loading.scss +22 -0
- package/src/Components/components/base/Loading/Loading.tsx +47 -0
- package/src/Components/components/base/Loading/index.ts +3 -0
- package/src/Components/components/base/Message/Message.scss +61 -0
- package/src/Components/components/base/Message/Message.tsx +94 -0
- package/src/Components/components/base/Message/MessageIcon/Error.tsx +7 -0
- package/src/Components/components/base/Message/MessageIcon/Info.tsx +7 -0
- package/src/Components/components/base/Message/MessageIcon/Success.tsx +8 -0
- package/src/Components/components/base/Message/MessageIcon/Warning.tsx +7 -0
- package/src/Components/components/base/Message/MessagePlugin.tsx +148 -0
- package/src/Components/components/base/Overlayer/Overlayer.scss +17 -0
- package/src/Components/components/base/Overlayer/Overlayer.tsx +49 -0
- package/src/Components/components/base/Popup/Popup.scss +34 -0
- package/src/Components/components/base/Popup/Popup.tsx +91 -0
- package/src/Components/components/base/Popup/hooks/useTrigger.tsx +67 -0
- package/src/Components/components/base/Portal/Portal.tsx +74 -0
- package/src/Components/components/base/Text/Text.scss +15 -0
- package/src/Components/components/base/Text/Text.tsx +30 -0
- package/src/Components/components/base/Time/Time.scss +14 -0
- package/src/Components/components/base/Time/Time.tsx +13 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindow.scss +9 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindow.tsx +83 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.scss +51 -0
- package/src/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.tsx +50 -0
- package/src/Components/components/base/ToggleWindow/index.ts +7 -0
- package/src/Components/components/base/common.ts +13 -0
- package/src/Components/components/base/hooks/useControlled.ts +31 -0
- package/src/Components/components/base/hooks/useDrag.ts +96 -0
- package/src/Components/components/base/hooks/useListenerEvent.ts +37 -0
- package/src/Components/components/base/hooks/useMutationObserver.ts +38 -0
- package/src/Components/components/base/hooks/useOnClickOutSide.ts +24 -0
- package/src/Components/components/base/util/index.ts +26 -0
- package/src/Components/components/common/ButtonPanel/ButtonPanel.tsx +127 -0
- package/src/Components/components/common/ButtonPanel/ButtonPanelH5/ButtonPanelH5.module.scss +67 -0
- package/src/Components/components/common/ButtonPanel/ButtonPanelH5/ButtonPanelH5.tsx +153 -0
- package/src/Components/components/common/ButtonPanel/ButtonPanelPC/ButtonPanelPC.module.scss +9 -0
- package/src/Components/components/common/ButtonPanel/ButtonPanelPC/ButtonPanelPC.tsx +32 -0
- package/src/Components/components/common/ButtonPanel/button/Accept/Accept.module.scss +7 -0
- package/src/Components/components/common/ButtonPanel/button/Accept/Accept.tsx +39 -0
- package/src/Components/components/common/ButtonPanel/button/Accept/index.ts +3 -0
- package/src/Components/components/common/ButtonPanel/button/BackgroundBlur/BackgroundBlur.module.scss +15 -0
- package/src/Components/components/common/ButtonPanel/button/BackgroundBlur/BackgroundBlur.tsx +46 -0
- package/src/Components/components/common/ButtonPanel/button/BackgroundBlur/index.ts +3 -0
- package/src/Components/components/common/ButtonPanel/button/Camera.tsx +81 -0
- package/src/Components/components/common/ButtonPanel/button/FullScreen/FullScreen.module.scss +13 -0
- package/src/Components/components/common/ButtonPanel/button/FullScreen/FullScreen.tsx +26 -0
- package/src/Components/components/common/ButtonPanel/button/FullScreen/index.ts +3 -0
- package/src/Components/components/common/ButtonPanel/button/Hangup/Hangup.module.scss +7 -0
- package/src/Components/components/common/ButtonPanel/button/Hangup/Hangup.tsx +42 -0
- package/src/Components/components/common/ButtonPanel/button/Hangup/index.ts +3 -0
- package/src/Components/components/common/ButtonPanel/button/Microphone.tsx +78 -0
- package/src/Components/components/common/ButtonPanel/button/Minimize/Minimize.module.scss +23 -0
- package/src/Components/components/common/ButtonPanel/button/Minimize/Minimize.tsx +35 -0
- package/src/Components/components/common/ButtonPanel/button/Minimize/index.ts +3 -0
- package/src/Components/components/common/ButtonPanel/button/Reject/Reject.module.scss +7 -0
- package/src/Components/components/common/ButtonPanel/button/Reject/Reject.tsx +39 -0
- package/src/Components/components/common/ButtonPanel/button/Reject/index.ts +3 -0
- package/src/Components/components/common/ButtonPanel/button/Speaker.tsx +75 -0
- package/src/Components/components/common/ButtonPanel/button/SwitchAudioCall.tsx +32 -0
- package/src/Components/components/common/ButtonPanel/button/SwitchCamera.tsx +19 -0
- package/src/Components/components/common/ButtonPanel/button/common.module.scss +51 -0
- package/src/Components/components/common/ButtonPanel/config.ts +505 -0
- package/src/Components/components/common/ButtonPanel/index.ts +3 -0
- package/src/Components/components/common/CallMessage/CallMessage.tsx +18 -0
- package/src/Components/components/common/CallMessage/CallMessageC2C/CallMessageC2C.module.scss +19 -0
- package/src/Components/components/common/CallMessage/CallMessageC2C/CallMessageC2C.tsx +84 -0
- package/src/Components/components/common/CallMessage/CallMessageGroup/CallMessageGroup.module.scss +5 -0
- package/src/Components/components/common/CallMessage/CallMessageGroup/CallMessageGroup.tsx +37 -0
- package/src/Components/components/common/CallMessage/index.ts +3 -0
- package/src/Components/components/common/DeviceSelector/DeviceSelector.module.scss +62 -0
- package/src/Components/components/common/DeviceSelector/DeviceSelector.tsx +105 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindow.tsx +37 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowGroupCall/FloatingWindowGroupCall.tsx +97 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowGroupCall/style/FloatingWindowGroupCall.module.scss +2 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowGroupCall/style/mobile.module.scss +126 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowGroupCall/style/pc.module.scss +126 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowSingleCall/FloatingWindowSingleCall.tsx +75 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowSingleCall/style/FloatingWindowSingleCall.module.scss +2 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowSingleCall/style/mobile.module.scss +117 -0
- package/src/Components/components/common/FloatingWindow/FloatingWindowSingleCall/style/pc.module.scss +123 -0
- package/src/Components/components/common/FloatingWindow/index.ts +3 -0
- package/src/Components/components/common/MicrophoneVolumn/MicrophoneVolumn.module.scss +9 -0
- package/src/Components/components/common/MicrophoneVolumn/MicrophoneVolumn.tsx +50 -0
- package/src/Components/components/common/OverlayStream/OverlayStream.module.scss +165 -0
- package/src/Components/components/common/OverlayStream/OverlayStream.tsx +119 -0
- package/src/Components/components/common/Player/Player.module.scss +11 -0
- package/src/Components/components/common/Player/Player.tsx +75 -0
- package/src/Components/components/common/Pusher/Pusher.module.scss +10 -0
- package/src/Components/components/common/Pusher/Pusher.tsx +96 -0
- package/src/Components/components/common/StreamInfo/StreamInfo.tsx +10 -0
- package/src/Components/components/common/StreamInfo/StreamInfoH5/StreamInfoH5.module.scss +21 -0
- package/src/Components/components/common/StreamInfo/StreamInfoH5/StreamInfoH5.tsx +95 -0
- package/src/Components/components/common/StreamInfo/StreamInfoPC/StreamInfoPC.module.scss +38 -0
- package/src/Components/components/common/StreamInfo/StreamInfoPC/StreamInfoPC.tsx +35 -0
- package/src/Components/components/common/StreamInfo/index.ts +3 -0
- package/src/Components/components/common/Tip/Tip.tsx +68 -0
- package/src/Components/components/common/TopBar/TopBar.tsx +17 -0
- package/src/Components/components/common/TopBar/h5/TopBarH5.module.scss +12 -0
- package/src/Components/components/common/TopBar/h5/TopBarH5.tsx +40 -0
- package/src/Components/components/common/TopBar/pc/TopBarPC.module.scss +8 -0
- package/src/Components/components/common/TopBar/pc/TopBarPC.tsx +36 -0
- package/src/Components/const/common.ts +15 -0
- package/src/Components/context/CallUserInfoContext.ts +21 -0
- package/src/Components/context/CallerUserInfoContext.ts +11 -0
- package/src/Components/context/CustomUIConfigContext.ts +6 -0
- package/src/Components/context/FocusItemContext.ts +13 -0
- package/src/Components/context/IsClickableContext.ts +5 -0
- package/src/Components/context/TranslateContext.ts +6 -0
- package/src/Components/context/UserInfoContext.ts +9 -0
- package/src/Components/context/index.ts +17 -0
- package/src/Components/hooks/index.ts +9 -0
- package/src/Components/hooks/useCallDuration.ts +34 -0
- package/src/Components/hooks/useCustomButtonUIConfig.ts +27 -0
- package/src/Components/hooks/useDeviceList.ts +53 -0
- package/src/Components/hooks/useGetSpeakers.ts +69 -0
- package/src/Components/hooks/useGetVolumeMap.ts +67 -0
- package/src/Components/hooks/useNetWorkStatus.ts +34 -0
- package/src/Components/hooks/useTranslate.ts +7 -0
- package/src/Components/hooks/useViewBackgroundConfig.ts +8 -0
- package/src/Components/style/common/mixin.scss +22 -0
- package/src/Components/style/common/var.scss +21 -0
- package/src/Components/style/index.scss +5 -0
- package/src/Components/style/theme/_dark.scss +56 -0
- package/src/Components/style/theme/_light.scss +56 -0
- package/src/Components/style/theme/_util.scss +79 -0
- package/src/Components/style/theme/color.scss +23 -0
- package/src/Components/util/classnames.ts +35 -0
- package/src/Components/util/index.ts +138 -0
- package/src/Components/util/uiDesign.ts +45 -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 +797 -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 +61 -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/TUICallService/utils/validate/validateConfig.ts +188 -0
- package/src/TUICallService/utils/validate/validateParams.ts +88 -0
- package/src/TUICallService/utils/validate/validateStatus.ts +26 -0
- package/src/image.d.ts +8 -0
- package/src/index.ts +63 -0
- package/src/style.d.ts +1 -0
- package/tuicall-uikit-react.es.js +13177 -0
- package/tuicall-uikit-react.umd.js +133 -0
- package/types/Components/TUICallKit/TUICallKit.d.ts +15 -0
- package/types/Components/TUICallKit/index.d.ts +2 -0
- package/types/Components/assets/permission/desktop/index.d.ts +5 -0
- package/types/Components/components/GroupCall/GroupCall.d.ts +1 -0
- package/types/Components/components/GroupCall/MediaContainer/AudioStream/AudioStream.d.ts +10 -0
- package/types/Components/components/GroupCall/MediaContainer/MediaContainer.d.ts +1 -0
- package/types/Components/components/GroupCall/MediaContainer/StreamLoading/StreamLoading.d.ts +7 -0
- package/types/Components/components/GroupCall/MediaContainer/index.d.ts +2 -0
- package/types/Components/components/GroupCall/Waiting/Waiting.d.ts +8 -0
- package/types/Components/components/SingleCall/MediaContainer/AudioStream/AudioStream.d.ts +11 -0
- package/types/Components/components/SingleCall/MediaContainer/MediaContainer.d.ts +1 -0
- package/types/Components/components/SingleCall/MediaContainer/hooks/useGetLargeViewName.d.ts +3 -0
- package/types/Components/components/SingleCall/MediaContainer/index.d.ts +2 -0
- package/types/Components/components/SingleCall/SingleCall.d.ts +3 -0
- package/types/Components/components/SingleCall/Waiting/Waiting.d.ts +9 -0
- package/types/Components/components/base/Avatar/Avatar.d.ts +12 -0
- package/types/Components/components/base/Avatar/index.d.ts +2 -0
- package/types/Components/components/base/Button/Button.d.ts +25 -0
- package/types/Components/components/base/Button/index.d.ts +2 -0
- package/types/Components/components/base/Drag/Drag.d.ts +14 -0
- package/types/Components/components/base/Drag/index.d.ts +2 -0
- package/types/Components/components/base/Grid/Col/Col.d.ts +14 -0
- package/types/Components/components/base/Grid/Col/index.d.ts +2 -0
- package/types/Components/components/base/Grid/Row/Row.d.ts +14 -0
- package/types/Components/components/base/Grid/Row/index.d.ts +3 -0
- package/types/Components/components/base/GridLayout/GridLayout.d.ts +11 -0
- package/types/Components/components/base/GridLayout/GridPlusItem/GridPlusItem.d.ts +14 -0
- package/types/Components/components/base/GridLayout/index.d.ts +3 -0
- package/types/Components/components/base/Icon/Icon.d.ts +9 -0
- package/types/Components/components/base/Loading/Circle/Cilrcle.d.ts +6 -0
- package/types/Components/components/base/Loading/Dot/Dot.d.ts +6 -0
- package/types/Components/components/base/Loading/Loading.d.ts +14 -0
- package/types/Components/components/base/Loading/index.d.ts +2 -0
- package/types/Components/components/base/Message/Message.d.ts +16 -0
- package/types/Components/components/base/Message/MessageIcon/Error.d.ts +1 -0
- package/types/Components/components/base/Message/MessageIcon/Info.d.ts +1 -0
- package/types/Components/components/base/Message/MessageIcon/Success.d.ts +1 -0
- package/types/Components/components/base/Message/MessageIcon/Warning.d.ts +1 -0
- package/types/Components/components/base/Message/MessagePlugin.d.ts +14 -0
- package/types/Components/components/base/Overlayer/Overlayer.d.ts +14 -0
- package/types/Components/components/base/Popup/Popup.d.ts +13 -0
- package/types/Components/components/base/Popup/hooks/useTrigger.d.ts +10 -0
- package/types/Components/components/base/Portal/Portal.d.ts +19 -0
- package/types/Components/components/base/Text/Text.d.ts +10 -0
- package/types/Components/components/base/Time/Time.d.ts +7 -0
- package/types/Components/components/base/ToggleWindow/ToggleWindow.d.ts +15 -0
- package/types/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.d.ts +14 -0
- package/types/Components/components/base/ToggleWindow/index.d.ts +3 -0
- package/types/Components/components/base/common.d.ts +7 -0
- package/types/Components/components/base/hooks/useControlled.d.ts +8 -0
- package/types/Components/components/base/hooks/useDrag.d.ts +6 -0
- package/types/Components/components/base/hooks/useListenerEvent.d.ts +13 -0
- package/types/Components/components/base/hooks/useMutationObserver.d.ts +4 -0
- package/types/Components/components/base/hooks/useOnClickOutSide.d.ts +1 -0
- package/types/Components/components/base/util/index.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/ButtonPanel.d.ts +1 -0
- package/types/Components/components/common/ButtonPanel/ButtonPanelH5/ButtonPanelH5.d.ts +8 -0
- package/types/Components/components/common/ButtonPanel/ButtonPanelPC/ButtonPanelPC.d.ts +6 -0
- package/types/Components/components/common/ButtonPanel/button/Accept/Accept.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/Accept/index.d.ts +2 -0
- package/types/Components/components/common/ButtonPanel/button/BackgroundBlur/BackgroundBlur.d.ts +1 -0
- package/types/Components/components/common/ButtonPanel/button/BackgroundBlur/index.d.ts +2 -0
- package/types/Components/components/common/ButtonPanel/button/Camera.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/FullScreen/FullScreen.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/FullScreen/index.d.ts +2 -0
- package/types/Components/components/common/ButtonPanel/button/Hangup/Hangup.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/Hangup/index.d.ts +2 -0
- package/types/Components/components/common/ButtonPanel/button/Microphone.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/Minimize/Minimize.d.ts +1 -0
- package/types/Components/components/common/ButtonPanel/button/Minimize/index.d.ts +2 -0
- package/types/Components/components/common/ButtonPanel/button/Reject/Reject.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/Reject/index.d.ts +2 -0
- package/types/Components/components/common/ButtonPanel/button/Speaker.d.ts +5 -0
- package/types/Components/components/common/ButtonPanel/button/SwitchAudioCall.d.ts +1 -0
- package/types/Components/components/common/ButtonPanel/button/SwitchCamera.d.ts +1 -0
- package/types/Components/components/common/ButtonPanel/config.d.ts +254 -0
- package/types/Components/components/common/ButtonPanel/index.d.ts +2 -0
- package/types/Components/components/common/CallMessage/CallMessage.d.ts +10 -0
- package/types/Components/components/common/CallMessage/CallMessageC2C/CallMessageC2C.d.ts +2 -0
- package/types/Components/components/common/CallMessage/CallMessageGroup/CallMessageGroup.d.ts +2 -0
- package/types/Components/components/common/CallMessage/index.d.ts +2 -0
- package/types/Components/components/common/DeviceSelector/DeviceSelector.d.ts +7 -0
- package/types/Components/components/common/FloatingWindow/FloatingWindow.d.ts +10 -0
- package/types/Components/components/common/FloatingWindow/FloatingWindowGroupCall/FloatingWindowGroupCall.d.ts +9 -0
- package/types/Components/components/common/FloatingWindow/FloatingWindowSingleCall/FloatingWindowSingleCall.d.ts +10 -0
- package/types/Components/components/common/FloatingWindow/index.d.ts +2 -0
- package/types/Components/components/common/MicrophoneVolumn/MicrophoneVolumn.d.ts +8 -0
- package/types/Components/components/common/OverlayStream/OverlayStream.d.ts +28 -0
- package/types/Components/components/common/Player/Player.d.ts +15 -0
- package/types/Components/components/common/Pusher/Pusher.d.ts +13 -0
- package/types/Components/components/common/StreamInfo/StreamInfo.d.ts +1 -0
- package/types/Components/components/common/StreamInfo/StreamInfoH5/StreamInfoH5.d.ts +10 -0
- package/types/Components/components/common/StreamInfo/StreamInfoPC/StreamInfoPC.d.ts +9 -0
- package/types/Components/components/common/StreamInfo/index.d.ts +2 -0
- package/types/Components/components/common/Tip/Tip.d.ts +7 -0
- package/types/Components/components/common/TopBar/TopBar.d.ts +1 -0
- package/types/Components/components/common/TopBar/h5/TopBarH5.d.ts +5 -0
- package/types/Components/components/common/TopBar/pc/TopBarPC.d.ts +5 -0
- package/types/Components/const/common.d.ts +11 -0
- package/types/Components/context/CallUserInfoContext.d.ts +17 -0
- package/types/Components/context/CallerUserInfoContext.d.ts +7 -0
- package/types/Components/context/CustomUIConfigContext.d.ts +3 -0
- package/types/Components/context/FocusItemContext.d.ts +8 -0
- package/types/Components/context/IsClickableContext.d.ts +2 -0
- package/types/Components/context/TranslateContext.d.ts +4 -0
- package/types/Components/context/UserInfoContext.d.ts +6 -0
- package/types/Components/context/index.d.ts +8 -0
- package/types/Components/hooks/index.d.ts +4 -0
- package/types/Components/hooks/useCallDuration.d.ts +1 -0
- package/types/Components/hooks/useCustomButtonUIConfig.d.ts +1 -0
- package/types/Components/hooks/useDeviceList.d.ts +8 -0
- package/types/Components/hooks/useGetSpeakers.d.ts +1 -0
- package/types/Components/hooks/useGetVolumeMap.d.ts +3 -0
- package/types/Components/hooks/useNetWorkStatus.d.ts +1 -0
- package/types/Components/hooks/useTranslate.d.ts +3 -0
- package/types/Components/hooks/useViewBackgroundConfig.d.ts +1 -0
- package/types/Components/util/classnames.d.ts +1 -0
- package/types/Components/util/index.d.ts +15 -0
- package/types/Components/util/uiDesign.d.ts +2 -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 +63 -0
- package/types/TUICallService/utils/validate/avoidRepeatedCall.d.ts +10 -0
- package/types/TUICallService/utils/validate/index.d.ts +2 -0
- package/types/TUICallService/utils/validate/validateConfig.d.ts +173 -0
- package/types/TUICallService/utils/validate/validateParams.d.ts +1 -0
- package/types/TUICallService/utils/validate/validateStatus.d.ts +5 -0
- package/types/index.d.ts +11 -0
|
@@ -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 {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export declare const ja_JP: {
|
|
2
|
+
hangup: string;
|
|
3
|
+
reject: string;
|
|
4
|
+
accept: string;
|
|
5
|
+
camera: string;
|
|
6
|
+
microphone: string;
|
|
7
|
+
speaker: string;
|
|
8
|
+
'virtual-background': string;
|
|
9
|
+
'other side reject call': string;
|
|
10
|
+
'reject call': string;
|
|
11
|
+
cancel: string;
|
|
12
|
+
'other side line busy': string;
|
|
13
|
+
'in busy': string;
|
|
14
|
+
'call timeout': string;
|
|
15
|
+
'end call': string;
|
|
16
|
+
'caller calling message': string;
|
|
17
|
+
'callee calling video message': string;
|
|
18
|
+
'callee calling audio message': string;
|
|
19
|
+
'no microphone access': string;
|
|
20
|
+
'no camera access': string;
|
|
21
|
+
'invite member': string;
|
|
22
|
+
'browser-authorization': string;
|
|
23
|
+
'mac-privacy': string;
|
|
24
|
+
'win-privacy': string;
|
|
25
|
+
'mac-preferences': string;
|
|
26
|
+
'win-preferences': string;
|
|
27
|
+
'Please enter userID': string;
|
|
28
|
+
'View more': string;
|
|
29
|
+
'people selected': string;
|
|
30
|
+
'Select all': string;
|
|
31
|
+
Cancel: string;
|
|
32
|
+
Done: string;
|
|
33
|
+
'exist group call': string;
|
|
34
|
+
"Video call": string;
|
|
35
|
+
"Voice call": string;
|
|
36
|
+
"Call End": string;
|
|
37
|
+
"Switch audio call": string;
|
|
38
|
+
"Switch video call": string;
|
|
39
|
+
"Call duration": string;
|
|
40
|
+
"Call Cancel": string;
|
|
41
|
+
"Other Side Cancel": string;
|
|
42
|
+
Decline: string;
|
|
43
|
+
"Other Side Decline": string;
|
|
44
|
+
"No answer": string;
|
|
45
|
+
"Other Side No Answer": string;
|
|
46
|
+
Answered: string;
|
|
47
|
+
"Other Side Line Busy": string;
|
|
48
|
+
"Line Busy": string;
|
|
49
|
+
'open camera': string;
|
|
50
|
+
'close camera': string;
|
|
51
|
+
'open microphone': string;
|
|
52
|
+
'close microphone': string;
|
|
53
|
+
'camera enabled': string;
|
|
54
|
+
'camera disabled': string;
|
|
55
|
+
'microphone enabled': string;
|
|
56
|
+
'microphone disabled': string;
|
|
57
|
+
'speaker enabled': string;
|
|
58
|
+
'speaker disabled': string;
|
|
59
|
+
'open speaker': string;
|
|
60
|
+
'close speaker': string;
|
|
61
|
+
'wait to be called': string;
|
|
62
|
+
answered: string;
|
|
63
|
+
'people in the call': string;
|
|
64
|
+
'failed to obtain speakers': string;
|
|
65
|
+
'you have a new call': string;
|
|
66
|
+
'switch camera': string;
|
|
67
|
+
join: string;
|
|
68
|
+
'people on the call': string;
|
|
69
|
+
"Supports a maximum of 9 people for simultaneous calls": string;
|
|
70
|
+
you: string;
|
|
71
|
+
"The network is poor during your current call": string;
|
|
72
|
+
"The other user network is poor during the current call": string;
|
|
73
|
+
"TUICallKit init is not complete": string;
|
|
74
|
+
timeout: string;
|
|
75
|
+
'kick out': string;
|
|
76
|
+
'Invited group call': string;
|
|
77
|
+
'Those involved': string;
|
|
78
|
+
call: string;
|
|
79
|
+
'video-call': string;
|
|
80
|
+
'audio-call': string;
|
|
81
|
+
search: string;
|
|
82
|
+
'search-result': string;
|
|
83
|
+
'Wechat scan right QR code': string;
|
|
84
|
+
'Use-phone-and-computer': string;
|
|
85
|
+
'Scan the QR code above': string;
|
|
86
|
+
'no-user': string;
|
|
87
|
+
'member-not-added': string;
|
|
88
|
+
'not-login': string;
|
|
89
|
+
'login-status-expire': string;
|
|
90
|
+
'experience-multi-call': string;
|
|
91
|
+
'not-support-multi-call': string;
|
|
92
|
+
'input-phone-userID': string;
|
|
93
|
+
userID: string;
|
|
94
|
+
'already-enter': string;
|
|
95
|
+
waiting: string;
|
|
96
|
+
'camera-opened': string;
|
|
97
|
+
'camera-closed': string;
|
|
98
|
+
'microphone-opened': string;
|
|
99
|
+
'microphone-closed': string;
|
|
100
|
+
'image-resolution': string;
|
|
101
|
+
'default-image-resolution': string;
|
|
102
|
+
'invited-person': string;
|
|
103
|
+
'video-to-audio': string;
|
|
104
|
+
me: string;
|
|
105
|
+
'be-rejected': string;
|
|
106
|
+
'be-no-response': string;
|
|
107
|
+
'be-line-busy': string;
|
|
108
|
+
'be-canceled': string;
|
|
109
|
+
'voice-call-end': string;
|
|
110
|
+
'video-call-end': string;
|
|
111
|
+
'method-call-failed': string;
|
|
112
|
+
'failed-to-obtain-permission': string;
|
|
113
|
+
'environment-detection-failed': string;
|
|
114
|
+
'switchToAudioCall-call-failed': string;
|
|
115
|
+
'switchToVideoCall-call-failed': string;
|
|
116
|
+
'microphone-unavailable': string;
|
|
117
|
+
'camera-unavailable': string;
|
|
118
|
+
'ban-device': string;
|
|
119
|
+
'not-supported-webrtc': string;
|
|
120
|
+
'blacklist-user-tips': string;
|
|
121
|
+
'is-already-calling': string;
|
|
122
|
+
'need-init': string;
|
|
123
|
+
"can't call yourself": string;
|
|
124
|
+
'accept-error': string;
|
|
125
|
+
'accept-device-error': string;
|
|
126
|
+
'call-error': string;
|
|
127
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export declare const zh: {
|
|
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
|
+
'end call': string;
|
|
21
|
+
'caller calling message': string;
|
|
22
|
+
'callee calling video message': string;
|
|
23
|
+
'callee calling audio message': string;
|
|
24
|
+
'no microphone access': string;
|
|
25
|
+
'no camera access': string;
|
|
26
|
+
'invite member': string;
|
|
27
|
+
'Invited group call': string;
|
|
28
|
+
'Those involved': 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
|
+
timeout: string;
|
|
80
|
+
'kick out': string;
|
|
81
|
+
call: string;
|
|
82
|
+
'video-call': string;
|
|
83
|
+
'audio-call': string;
|
|
84
|
+
search: string;
|
|
85
|
+
'search-result': string;
|
|
86
|
+
'Wechat scan right QR code': string;
|
|
87
|
+
'Use-phone-and-computer': string;
|
|
88
|
+
'Scan the QR code above': string;
|
|
89
|
+
'no-user': string;
|
|
90
|
+
'member-not-added': string;
|
|
91
|
+
'not-login': string;
|
|
92
|
+
'login-status-expire': string;
|
|
93
|
+
'experience-multi-call': string;
|
|
94
|
+
'not-support-multi-call': string;
|
|
95
|
+
'input-phone-userID': string;
|
|
96
|
+
userID: string;
|
|
97
|
+
'already-enter': string;
|
|
98
|
+
'image-resolution': string;
|
|
99
|
+
'default-image-resolution': string;
|
|
100
|
+
'invited-person': string;
|
|
101
|
+
'be-rejected': string;
|
|
102
|
+
'be-no-response': string;
|
|
103
|
+
'be-line-busy': string;
|
|
104
|
+
'be-canceled': string;
|
|
105
|
+
'voice-call-end': string;
|
|
106
|
+
'video-call-end': string;
|
|
107
|
+
'method-call-failed': string;
|
|
108
|
+
'failed-to-obtain-permission': string;
|
|
109
|
+
'environment-detection-failed': string;
|
|
110
|
+
'switchToAudioCall-call-failed': string;
|
|
111
|
+
'switchToVideoCall-call-failed': string;
|
|
112
|
+
'microphone-unavailable': string;
|
|
113
|
+
'camera-unavailable': string;
|
|
114
|
+
'ban-device': string;
|
|
115
|
+
'not-supported-webrtc': string;
|
|
116
|
+
'blacklist-user-tips': string;
|
|
117
|
+
'is-already-calling': string;
|
|
118
|
+
'need-init': string;
|
|
119
|
+
"can't call yourself": string;
|
|
120
|
+
'accept-error': string;
|
|
121
|
+
'accept-device-error': string;
|
|
122
|
+
'call-error': string;
|
|
123
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class CallManager {
|
|
2
|
+
private _globalCallPagePath;
|
|
3
|
+
init(params: any): Promise<void>;
|
|
4
|
+
private _watchTUIStore;
|
|
5
|
+
private _unwatchTUIStore;
|
|
6
|
+
private _handleCallStatusChange;
|
|
7
|
+
private _handleCallStatusToCalling;
|
|
8
|
+
private _handleCallStatusToIdle;
|
|
9
|
+
getRoute(): any;
|
|
10
|
+
destroyed(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare const isUndefined: (input: any) => boolean;
|
|
2
|
+
export declare const isPlainObject: (input: any) => boolean;
|
|
3
|
+
export declare const isArray: (input: any) => boolean;
|
|
4
|
+
export declare const isPrivateKey: (key: string) => boolean;
|
|
5
|
+
export declare const isUrl: (url: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* 检测input类型是否为string
|
|
8
|
+
* @param {*} input 任意类型的输入
|
|
9
|
+
* @returns {Boolean} true->string / false->not a string
|
|
10
|
+
*/
|
|
11
|
+
export declare const isString: (input: any) => boolean;
|
|
12
|
+
export declare const isBoolean: (input: any) => boolean;
|
|
13
|
+
export declare const isNumber: (input: any) => boolean;
|
|
14
|
+
export declare function formatTime(secondTime: number): string;
|
|
15
|
+
export declare function formatTimeInverse(stringTime: string): number;
|
|
16
|
+
export declare function isJSON(str: string): boolean;
|
|
17
|
+
export declare const JSONToObject: (str: string) => any;
|
|
18
|
+
/**
|
|
19
|
+
* 重试函数, catch 时,重试
|
|
20
|
+
* @param {Promise} promise 需重试的函数
|
|
21
|
+
* @param {number} num 需要重试的次数
|
|
22
|
+
* @param {number} time 间隔时间(s)
|
|
23
|
+
* @returns {Promise<any>} im 接口的 response 原样返回
|
|
24
|
+
*/
|
|
25
|
+
export declare const retryPromise: (promise: Promise<any>, num?: number, time?: number) => Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* web call engine 重复调用时的错误, 这种错误在 TUICallKit 应该忽略
|
|
28
|
+
* @param {any} error 错误信息
|
|
29
|
+
* @returns {Boolean}
|
|
30
|
+
*/
|
|
31
|
+
export declare function handleRepeatedCallError(error: any): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 设备无权限时的错误处理
|
|
34
|
+
* @param {any} error 错误信息
|
|
35
|
+
* @returns {Boolean}
|
|
36
|
+
*/
|
|
37
|
+
export declare function handleNoDevicePermissionError(error: any): boolean;
|
|
38
|
+
export declare function performanceNow(): number;
|
|
39
|
+
/**
|
|
40
|
+
* 检测input类型是否为function
|
|
41
|
+
* @param {*} input 任意类型的输入
|
|
42
|
+
* @returns {Boolean} true->input is a function
|
|
43
|
+
*/
|
|
44
|
+
export declare const isFunction: (input: any) => boolean;
|
|
45
|
+
export declare const getLanguage: () => string;
|
|
46
|
+
export declare function noop(e: any): void;
|
|
47
|
+
/**
|
|
48
|
+
* Get the object type string
|
|
49
|
+
* @param {*} input 任意类型的输入
|
|
50
|
+
* @returns {String} the object type string
|
|
51
|
+
*/
|
|
52
|
+
export declare const getType: (input: any) => any;
|
|
53
|
+
export declare function modifyObjectKey(obj: any, oldKey: any, newKey: any): any;
|
|
54
|
+
/**
|
|
55
|
+
* interpolate function
|
|
56
|
+
* @param {string} str - 'hello {{name}}'
|
|
57
|
+
* @param {object} data - { name: 'sam' }
|
|
58
|
+
* @returns {string} 'hello sam'
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare function interpolate(str: any, data: any): any;
|
|
62
|
+
export declare function initBrowserCloseDetection(callback: Function): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 异步函数重试 Interface
|
|
3
|
+
* @param {number} [retries = 5] 重试次数
|
|
4
|
+
* @param {number} [timeout = 2000] 重试间隔时间
|
|
5
|
+
* @param {Function=} onError 重试错误回调
|
|
6
|
+
* @param {Function=} onRetrying 重试回调
|
|
7
|
+
* @param {Function=} onRetryFailed 重试失败回调
|
|
8
|
+
*/
|
|
9
|
+
interface IPromiseRetryDecoratorSettings {
|
|
10
|
+
retries?: number;
|
|
11
|
+
timeout?: number;
|
|
12
|
+
onError?: Function;
|
|
13
|
+
onRetrying?: Function;
|
|
14
|
+
onRetryFailed?: Function;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 装饰器函数:给异步函数增加重试
|
|
18
|
+
* @param {Object} settings 入参
|
|
19
|
+
* @returns {Function}
|
|
20
|
+
* @example
|
|
21
|
+
* class LocalStream {
|
|
22
|
+
* @promiseRetryDecorator({
|
|
23
|
+
* retries: 10,
|
|
24
|
+
* timeout: 3000,
|
|
25
|
+
* onRetryFailed: function(error) {
|
|
26
|
+
* }
|
|
27
|
+
* })
|
|
28
|
+
* async recoverCapture(options) {}
|
|
29
|
+
* }
|
|
30
|
+
*/
|
|
31
|
+
export default function promiseRetryDecorator(settings: IPromiseRetryDecoratorSettings): (target: any, name: any, descriptor: any) => any;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const IN_WX_MINI_APP: boolean;
|
|
2
|
+
export declare const IN_UNI_NATIVE_APP: boolean;
|
|
3
|
+
export declare const IN_MINI_APP: boolean;
|
|
4
|
+
export declare const IN_UNI_APP: boolean;
|
|
5
|
+
export declare const IN_BROWSER: boolean;
|
|
6
|
+
export declare const APP_NAMESPACE: any;
|
|
7
|
+
export declare const IS_H5: boolean;
|
|
8
|
+
export declare const IS_PC: boolean;
|
|
9
|
+
export declare const IS_WIN: any;
|
|
10
|
+
export declare const IS_MAC: any;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 给异步函数封装重试逻辑
|
|
3
|
+
* @param {Object} options 重试逻辑入参
|
|
4
|
+
* @param {Object} options.retryFunction 需要封装的异步函数
|
|
5
|
+
* @param {Object} options.settings 重试属性
|
|
6
|
+
* @param {Number} [options.settings.retries = 5] 重试次数
|
|
7
|
+
* @param {Number} [options.settings.timeout = 1000] 重试间隔
|
|
8
|
+
* @param {onErrorCallback} options.onError 重试错误回调
|
|
9
|
+
* @param {onRetryingCallback} [options.onRetrying] 重试后的回调
|
|
10
|
+
* @param {Object} options.context 上下文,可选
|
|
11
|
+
* @returns {Function} 封装后的函数
|
|
12
|
+
* @example
|
|
13
|
+
* const getUserMedia = promiseRetry({
|
|
14
|
+
* retryFunction: getUserMedia_,
|
|
15
|
+
* settings: { retries: 5, timeout: 2000 },
|
|
16
|
+
* onError: (error, retry, reject) => {
|
|
17
|
+
* if (error.name === 'NotReadableError') {
|
|
18
|
+
* retry();
|
|
19
|
+
* } else {
|
|
20
|
+
* reject(error);
|
|
21
|
+
* }
|
|
22
|
+
* },
|
|
23
|
+
* onRetrying: retryCount => {
|
|
24
|
+
* console.warn(`getUserMedia NotReadableError observed, retrying [${retryCount}/5]`);
|
|
25
|
+
* }
|
|
26
|
+
* });
|
|
27
|
+
*/
|
|
28
|
+
declare function promiseRetry({ retryFunction, settings, onError, onRetrying, onRetryFailed, context }: {
|
|
29
|
+
retryFunction: any;
|
|
30
|
+
settings: any;
|
|
31
|
+
onError: any;
|
|
32
|
+
onRetrying: any;
|
|
33
|
+
onRetryFailed: any;
|
|
34
|
+
context: any;
|
|
35
|
+
}): (...args: any[]) => Promise<unknown>;
|
|
36
|
+
export default promiseRetry;
|