@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,19 @@
|
|
|
1
|
+
import { IBellParams } from '../interface/index';
|
|
2
|
+
export declare class BellContext {
|
|
3
|
+
private _bellContext;
|
|
4
|
+
private _isMuteBell;
|
|
5
|
+
private _calleeBellFilePath;
|
|
6
|
+
private _callRole;
|
|
7
|
+
private _callStatus;
|
|
8
|
+
constructor();
|
|
9
|
+
setBellSrc(): void;
|
|
10
|
+
setBellProperties(bellParams: IBellParams): void;
|
|
11
|
+
play(): Promise<void>;
|
|
12
|
+
stop(): Promise<void>;
|
|
13
|
+
setBellMute(enable: boolean): Promise<void>;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
private _handleAudioInterruptionBegin;
|
|
16
|
+
private _handleAudioInterruptionEnd;
|
|
17
|
+
private _addListenBellContextEvent;
|
|
18
|
+
private _removeListenBellContextEvent;
|
|
19
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export default class ChatCombine {
|
|
2
|
+
static instance: ChatCombine;
|
|
3
|
+
private _callService;
|
|
4
|
+
constructor(options: any);
|
|
5
|
+
static getInstance(options: any): ChatCombine;
|
|
6
|
+
/**
|
|
7
|
+
* message on screen
|
|
8
|
+
* @param {Any} params Parameters for message up-screening
|
|
9
|
+
*/
|
|
10
|
+
callTUIService(params: any): void;
|
|
11
|
+
/**
|
|
12
|
+
* tuicore getExtension
|
|
13
|
+
* @param {String} extensionID extension id
|
|
14
|
+
* @param {Any} params tuicore pass parameters
|
|
15
|
+
* @returns {Any[]} return extension
|
|
16
|
+
*/
|
|
17
|
+
onGetExtension(extensionID: string, params: any): any[];
|
|
18
|
+
onCall(method: String, params: any): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* tuicore notify event manager
|
|
21
|
+
* @param {String} eventName event name
|
|
22
|
+
* @param {String} subKey sub key
|
|
23
|
+
* @param {Any} options tuicore event parameters
|
|
24
|
+
*/
|
|
25
|
+
onNotifyEvent(eventName: string, subKey: string, options?: any): Promise<void>;
|
|
26
|
+
updateStoreBasedOnGroupAttributes(groupAttributes: any): Promise<void>;
|
|
27
|
+
getGroupAttributes(tim: any, groupId: string): Promise<any>;
|
|
28
|
+
isLineBusy(message: any): boolean;
|
|
29
|
+
getCallKitMessage(message: any, tim: any): Promise<{
|
|
30
|
+
messageCardContent?: undefined;
|
|
31
|
+
callMediaType?: undefined;
|
|
32
|
+
inviteeList?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
messageCardContent: string;
|
|
35
|
+
callMediaType: any;
|
|
36
|
+
inviteeList: any;
|
|
37
|
+
}>;
|
|
38
|
+
private _addListenChatEvent;
|
|
39
|
+
private _removeListenChatEvent;
|
|
40
|
+
/**
|
|
41
|
+
* chat start audio/video call via click
|
|
42
|
+
* @param {Any} options Parameters passed in when clicking on an audio/video call from chat
|
|
43
|
+
* @param {CallMediaType} type call media type. 0 - audio; 1 - video.
|
|
44
|
+
*
|
|
45
|
+
* priority: isForceUseV2API > version
|
|
46
|
+
*/
|
|
47
|
+
private _handleTUICoreOnClick;
|
|
48
|
+
private _useV2API;
|
|
49
|
+
private _handleGroupAttributesUpdated;
|
|
50
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default class EngineEventHandler {
|
|
2
|
+
static instance: EngineEventHandler;
|
|
3
|
+
private _callService;
|
|
4
|
+
constructor(options: any);
|
|
5
|
+
static getInstance(options: any): EngineEventHandler;
|
|
6
|
+
addListenTuiCallEngineEvent(): void;
|
|
7
|
+
removeListenTuiCallEngineEvent(): void;
|
|
8
|
+
private _callerChangeToConnected;
|
|
9
|
+
private _unNormalEventsManager;
|
|
10
|
+
private _handleError;
|
|
11
|
+
private _handleNewInvitationReceived;
|
|
12
|
+
private _handleOnCallBegin;
|
|
13
|
+
private _handleUserEnter;
|
|
14
|
+
private _handleUserLeave;
|
|
15
|
+
private _handleInviteeReject;
|
|
16
|
+
private _handleNoResponse;
|
|
17
|
+
private _handleLineBusy;
|
|
18
|
+
private _handleCallNotConnected;
|
|
19
|
+
private _handleOnUserInviting;
|
|
20
|
+
private _handleCallingEnd;
|
|
21
|
+
private _handleSDKReady;
|
|
22
|
+
private _handleKickedOut;
|
|
23
|
+
private _messageSentByMe;
|
|
24
|
+
private _handleCallMessage;
|
|
25
|
+
private _handleCallTypeChange;
|
|
26
|
+
private _handleNetworkQuality;
|
|
27
|
+
private _startRemoteView;
|
|
28
|
+
private _setRemoteUserInfoAudioVideoAvailable;
|
|
29
|
+
private _handleUserVideoAvailable;
|
|
30
|
+
private _handleUserAudioAvailable;
|
|
31
|
+
private _handleUserVoiceVolume;
|
|
32
|
+
private _handleDeviceUpdate;
|
|
33
|
+
private _handleUserUpdate;
|
|
34
|
+
private _addUserToRemoteUserInfoList;
|
|
35
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ICallbackParam, ISelfInfoParams, IInviteUserParams, IInitParams, ICallsParams } from '../interface/ICallService';
|
|
2
|
+
import { LOG_LEVEL, VideoDisplayMode, VideoResolution, FeatureButton, LayoutMode } from '../const/index';
|
|
3
|
+
import { ITUIGlobal, ITUIStore } from '../interface/index';
|
|
4
|
+
declare const TUIGlobal: ITUIGlobal;
|
|
5
|
+
declare const TUIStore: ITUIStore;
|
|
6
|
+
declare const uiDesign: import("./UIDesign").IUIDesign;
|
|
7
|
+
export { TUIGlobal, TUIStore, uiDesign };
|
|
8
|
+
export default class TUICallService {
|
|
9
|
+
static instance: TUICallService;
|
|
10
|
+
_tuiCallEngine: any;
|
|
11
|
+
private _tim;
|
|
12
|
+
private _TUICore;
|
|
13
|
+
private _timerId;
|
|
14
|
+
private _startTimeStamp;
|
|
15
|
+
private _bellContext;
|
|
16
|
+
private _isFromChat;
|
|
17
|
+
private _currentGroupId;
|
|
18
|
+
private _preDevicePermission;
|
|
19
|
+
private _offlinePushInfo;
|
|
20
|
+
private _permissionCheckTimer;
|
|
21
|
+
private _chatCombine;
|
|
22
|
+
private _engineEventHandler;
|
|
23
|
+
constructor();
|
|
24
|
+
static getInstance(): TUICallService;
|
|
25
|
+
init(params: IInitParams): Promise<void>;
|
|
26
|
+
destroyed(): Promise<void>;
|
|
27
|
+
inviteUser(params: IInviteUserParams): Promise<void>;
|
|
28
|
+
calls(callsParams: ICallsParams): Promise<void>;
|
|
29
|
+
join(params: any): Promise<void>;
|
|
30
|
+
getTUICallEngineInstance(): any;
|
|
31
|
+
setLogLevel(level: LOG_LEVEL): void;
|
|
32
|
+
setLanguage(language: string): void;
|
|
33
|
+
enableFloatWindow(enable: boolean): void;
|
|
34
|
+
setSelfInfo(params: ISelfInfoParams): Promise<void>;
|
|
35
|
+
enableVirtualBackground(enable: boolean): Promise<void>;
|
|
36
|
+
enableAIVoice(enable: boolean): Promise<void>;
|
|
37
|
+
setCallingBell(filePath?: string): Promise<void>;
|
|
38
|
+
enableMuteMode(enable: boolean): Promise<void>;
|
|
39
|
+
hideFeatureButton(buttonName: FeatureButton): void;
|
|
40
|
+
setLocalViewBackgroundImage(url: string): void;
|
|
41
|
+
setRemoteViewBackgroundImage(userId: string, url: string): void;
|
|
42
|
+
setLayoutMode(layoutMode: LayoutMode): void;
|
|
43
|
+
setCameraDefaultState(isOpen: boolean): void;
|
|
44
|
+
callExperimentalAPI(jsonStr: string): void;
|
|
45
|
+
accept(): Promise<void>;
|
|
46
|
+
hangup(): Promise<void>;
|
|
47
|
+
reject(): Promise<void>;
|
|
48
|
+
openCamera(videoViewDomID: string): Promise<void>;
|
|
49
|
+
closeCamera(): Promise<void>;
|
|
50
|
+
openMicrophone(): Promise<void>;
|
|
51
|
+
closeMicrophone(): Promise<void>;
|
|
52
|
+
unMuteSpeaker(): void;
|
|
53
|
+
muteSpeaker(): void;
|
|
54
|
+
switchScreen(userId: string): void;
|
|
55
|
+
switchCallMediaType(): Promise<void>;
|
|
56
|
+
switchCamera(): Promise<void>;
|
|
57
|
+
setSoundMode(type?: string): void;
|
|
58
|
+
setBlurBackground(enable: boolean): Promise<void>;
|
|
59
|
+
switchDevice(params: any): Promise<void>;
|
|
60
|
+
getDeviceList(deviceType: string): Promise<any>;
|
|
61
|
+
private _addListenTuiCallEngineEvent;
|
|
62
|
+
private _removeListenTuiCallEngineEvent;
|
|
63
|
+
beforeCalling: ((...args: any[]) => void) | undefined;
|
|
64
|
+
afterCalling: ((...args: any[]) => void) | undefined;
|
|
65
|
+
onMinimized: ((...args: any[]) => void) | undefined;
|
|
66
|
+
onMessageSentByMe: ((...args: any[]) => void) | undefined;
|
|
67
|
+
kickedOut: ((...args: any[]) => void) | undefined;
|
|
68
|
+
statusChanged: ((...args: any[]) => void) | undefined;
|
|
69
|
+
setCallback(params: ICallbackParam): void;
|
|
70
|
+
toggleMinimize(): void;
|
|
71
|
+
executeExternalBeforeCalling(): void;
|
|
72
|
+
executeExternalAfterCalling(): void;
|
|
73
|
+
handleExceptionExit(event?: any): Promise<void>;
|
|
74
|
+
handlePusherError(event: any): void;
|
|
75
|
+
setVideoDisplayMode(displayMode: VideoDisplayMode): void;
|
|
76
|
+
setVideoResolution(resolution: VideoResolution): Promise<void>;
|
|
77
|
+
startTimer(): void;
|
|
78
|
+
private _handleCallError;
|
|
79
|
+
private _updateCallStoreBeforeCall;
|
|
80
|
+
private _updateCallStoreAfterCall;
|
|
81
|
+
private _getFeatureButtonDefaultState;
|
|
82
|
+
private _updateCallDuration;
|
|
83
|
+
private _stopTimer;
|
|
84
|
+
private _resetCallStore;
|
|
85
|
+
getGroupMemberList(count: number, offset: number): Promise<any>;
|
|
86
|
+
getGroupProfile(): Promise<any>;
|
|
87
|
+
private _handleCallStatusChange;
|
|
88
|
+
private _watchTUIStore;
|
|
89
|
+
private _unwatchTUIStore;
|
|
90
|
+
bindTUICore(TUICore: any): void;
|
|
91
|
+
getTim(): any;
|
|
92
|
+
setIsFromChat(isFromChat: boolean): void;
|
|
93
|
+
setCurrentGroupId(groupId: string): void;
|
|
94
|
+
getCurrentGroupId(): string;
|
|
95
|
+
setDefaultOfflinePushInfo(offlinePushInfo: any): void;
|
|
96
|
+
getDefaultOfflinePushInfo(): any;
|
|
97
|
+
getCallMessage(message: any): Promise<any>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CallMediaType, CallStatus } from '../const/index';
|
|
2
|
+
export declare function initialUI(): void;
|
|
3
|
+
export declare function checkRunPlatform(): void;
|
|
4
|
+
export declare function initAndCheckRunEnv(): void;
|
|
5
|
+
export declare function beforeCall(type: CallMediaType, that: any): Promise<CallStatus.IDLE | CallStatus.CALLING>;
|
|
6
|
+
export declare function handlePackageError(error: any): void;
|
|
7
|
+
export declare function handleNoPusherCapabilityError(): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CallMediaType } from '../const/index';
|
|
2
|
+
import { IUserInfo } from '../interface/ICallService';
|
|
3
|
+
export declare function setDefaultUserInfo(userId: string, domId?: string): IUserInfo;
|
|
4
|
+
export declare function getMyProfile(myselfUserId: string, tim: any): Promise<IUserInfo>;
|
|
5
|
+
export declare function getRemoteUserProfile(userIdList: Array<string>, tim: any): Promise<any>;
|
|
6
|
+
export declare function generateText(key: string, prefix?: string, suffix?: string): string;
|
|
7
|
+
export declare function generateStatusChangeText(): string;
|
|
8
|
+
export declare function getGroupMemberList(groupID: string, tim: any, count: any, offset: any): Promise<any>;
|
|
9
|
+
export declare function getGroupProfile(groupID: string, tim: any): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* update roomId and roomIdType
|
|
12
|
+
* @param {number} roomId number roomId
|
|
13
|
+
* @param {string} strRoomId string roomId
|
|
14
|
+
*/
|
|
15
|
+
export declare function updateRoomIdAndRoomIdType(roomId: any, strRoomId: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* web and miniProgram call engine throw event data structure are different
|
|
18
|
+
* @param {any} event call engine throw out data
|
|
19
|
+
* @returns {any} data
|
|
20
|
+
*/
|
|
21
|
+
export declare function analyzeEventData(event: any): any;
|
|
22
|
+
/**
|
|
23
|
+
* delete user from remoteUserInfoList
|
|
24
|
+
* @param {string[]} userIdList to be deleted userIdList
|
|
25
|
+
* @param {ITUIStore} TUIStore TUIStore instance
|
|
26
|
+
*/
|
|
27
|
+
export declare function deleteRemoteUser(userIdList: string[]): void;
|
|
28
|
+
export declare function updateDeviceList(tuiCallEngine: any): void;
|
|
29
|
+
/**
|
|
30
|
+
* update the no device permission toast
|
|
31
|
+
* @param {any} error error
|
|
32
|
+
* @param {CallMediaType} type call midia type
|
|
33
|
+
* @param {any} tuiCallEngine TUICallEngine instance
|
|
34
|
+
*/
|
|
35
|
+
export declare function noDevicePermissionToast(error: any, type: CallMediaType, tuiCallEngine: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* set localUserInfo audio/video available
|
|
38
|
+
* @param {boolean} isAvailable is available
|
|
39
|
+
* @param {string} type callMediaType 'audio' | 'video'
|
|
40
|
+
* @param {ITUIStore} TUIStore TUIStore instance
|
|
41
|
+
*/
|
|
42
|
+
export declare function setLocalUserInfoAudioVideoAvailable(isAvailable: boolean, type: string): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ITUIGlobal } from '../interface/ITUIGlobal';
|
|
2
|
+
export default class TUIGlobal implements ITUIGlobal {
|
|
3
|
+
static instance: TUIGlobal;
|
|
4
|
+
global: any;
|
|
5
|
+
isPC: boolean;
|
|
6
|
+
isH5: boolean;
|
|
7
|
+
isWeChat: boolean;
|
|
8
|
+
isApp: boolean;
|
|
9
|
+
isUniPlatform: boolean;
|
|
10
|
+
isOfficial: boolean;
|
|
11
|
+
isWIN: boolean;
|
|
12
|
+
isMAC: boolean;
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* 获取 TUIGlobal 实例
|
|
16
|
+
* @returns {TUIGlobal}
|
|
17
|
+
*/
|
|
18
|
+
static getInstance(): TUIGlobal;
|
|
19
|
+
initEnv(): void;
|
|
20
|
+
initOfficial(SDKAppID: number): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICallStore } from '../interface/ICallStore';
|
|
2
|
+
export default class CallStore {
|
|
3
|
+
defaultStore: ICallStore;
|
|
4
|
+
store: ICallStore;
|
|
5
|
+
prevStore: ICallStore;
|
|
6
|
+
update(key: keyof ICallStore, data: any): void;
|
|
7
|
+
getPrevData(key: string | undefined): any;
|
|
8
|
+
getData(key: string | undefined): any;
|
|
9
|
+
reset(keyList?: Array<string>): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ITUIStore, IOptions, Task } from '../interface/ITUIStore';
|
|
2
|
+
import { StoreName } from '../const/index';
|
|
3
|
+
export default class TUIStore implements ITUIStore {
|
|
4
|
+
static instance: TUIStore;
|
|
5
|
+
task: Task;
|
|
6
|
+
private storeMap;
|
|
7
|
+
private timerId;
|
|
8
|
+
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* 获取 TUIStore 实例
|
|
11
|
+
* @returns {TUIStore}
|
|
12
|
+
*/
|
|
13
|
+
static getInstance(): TUIStore;
|
|
14
|
+
/**
|
|
15
|
+
* UI 组件注册监听回调
|
|
16
|
+
* @param {StoreName} storeName store 名称
|
|
17
|
+
* @param {IOptions} options 监听信息
|
|
18
|
+
* @param {Object} params 扩展参数
|
|
19
|
+
* @param {String} params.notifyRangeWhenWatch 注册时监听时的通知范围, 'all' - 通知所有注册该 key 的监听; 'myself' - 通知本次注册该 key 的监听; 默认不通知
|
|
20
|
+
*/
|
|
21
|
+
watch(storeName: StoreName, options: IOptions, params?: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* UI 取消组件监听回调
|
|
24
|
+
* @param {StoreName} storeName store 名称
|
|
25
|
+
* @param {IOptions} options 监听信息,包含需要取消的回掉等
|
|
26
|
+
*/
|
|
27
|
+
unwatch(storeName: StoreName, options: IOptions): void;
|
|
28
|
+
/**
|
|
29
|
+
* 通用 store 数据更新,messageList 的变更需要单独处理
|
|
30
|
+
* @param {StoreName} storeName store 名称
|
|
31
|
+
* @param {string} key 变更的 key
|
|
32
|
+
* @param {unknown} data 变更的数据
|
|
33
|
+
*/
|
|
34
|
+
update(storeName: StoreName, key: string, data: unknown): void;
|
|
35
|
+
/**
|
|
36
|
+
* 获取 Store 的上一个状态值
|
|
37
|
+
* @param {StoreName} storeName store 名称
|
|
38
|
+
* @param {string} key 待获取的 key
|
|
39
|
+
* @returns {Any}
|
|
40
|
+
*/
|
|
41
|
+
getPrevData(storeName: StoreName, key: string): any;
|
|
42
|
+
/**
|
|
43
|
+
* 获取 Store 数据
|
|
44
|
+
* @param {StoreName} storeName store 名称
|
|
45
|
+
* @param {string} key 待获取的 key
|
|
46
|
+
* @returns {Any}
|
|
47
|
+
*/
|
|
48
|
+
getData(storeName: StoreName, key: string): any;
|
|
49
|
+
/**
|
|
50
|
+
* UI 组件注册监听回调
|
|
51
|
+
* @param {StoreName} storeName store 名称
|
|
52
|
+
* @param {string} key 变更的 key
|
|
53
|
+
*/
|
|
54
|
+
private notify;
|
|
55
|
+
reset(storeName: StoreName, keyList?: Array<string>, isNotificationNeeded?: boolean): void;
|
|
56
|
+
updateStore(params: any, name?: StoreName): void;
|
|
57
|
+
}
|
|
@@ -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
|
+
}
|