@polyvharmony/live-scenes-sdk 1.3.1 → 1.3.2
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/BuildProfile.d.ets +2 -2
- package/BuildProfile.js +1 -1
- package/CHANGELOG.md +12 -0
- package/ResourceTable.txt +72 -72
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/modules/chatroom/PLVChatroomManager.d.ets +32 -17
- package/src/main/ets/modules/chatroom/PLVChatroomManager.js +229 -198
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.js +1 -4
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.d.ets +1 -0
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.js +3 -0
- package/src/main/ets/modules/i18n/PLVI18NDataMapper.d.ets +5 -5
- package/src/main/ets/modules/i18n/PLVI18NDataMapper.js +20 -20
- package/src/main/ets/modules/i18n/PLVLanguageManager.js +8 -8
- package/src/main/ets/modules/interact/PLVInteractManager.d.ets +6 -6
- package/src/main/ets/modules/interact/PLVInteractManager.js +12 -12
- package/src/main/ets/modules/interact/PLVInteractWeb.d.ets +13 -13
- package/src/main/ets/modules/interact/PLVInteractWeb.js +148 -148
- package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.d.ets +1 -1
- package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.js +34 -34
- package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.d.ets +1 -1
- package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.js +6 -6
- package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.d.ets +2 -2
- package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.js +21 -21
- package/src/main/ets/modules/interact/pushcard/model/PLVShowPushCardEvent.d.ets +1 -1
- package/src/main/ets/modules/interact/pushcard/model/PLVShowPushCardEvent.js +2 -2
- package/src/main/ets/modules/interact/pushcard/repo/PLVCardLookTimeLocalRepository.d.ets +3 -3
- package/src/main/ets/modules/interact/pushcard/repo/PLVCardLookTimeLocalRepository.js +6 -6
- package/src/main/ets/modules/interact/redpack/model/PLVHistoryRedPaperEvent.js +7 -7
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperEvent.js +7 -7
- package/src/main/ets/modules/linkmic/PLVLinkMicManager.d.ets +14 -14
- package/src/main/ets/modules/linkmic/PLVLinkMicManager.js +37 -37
- package/src/main/ets/modules/linkmic/di/PLVLinkMicModule.js +11 -11
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.d.ets +4 -4
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.js +14 -14
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.d.ets +8 -8
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.js +39 -39
- package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.d.ets +10 -10
- package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.js +69 -69
- package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.d.ets +4 -4
- package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.js +70 -70
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRate.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRate.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.js +12 -12
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicErrorEvent.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicErrorEvent.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicMode.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicPushResolutionRatio.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicPushResolutionRatio.js +4 -4
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCType.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicState.js +6 -6
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicVideoRenderParam.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicVideoRenderParam.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicViewer.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicViewer.js +5 -5
- package/src/main/ets/modules/linkmic/viewmodel/PLVLinkMicViewModel.d.ets +15 -15
- package/src/main/ets/modules/linkmic/viewmodel/PLVLinkMicViewModel.js +40 -40
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.d.ets +6 -6
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.js +15 -15
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleQueueOrderUseCase.d.ets +4 -4
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleQueueOrderUseCase.js +25 -25
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleRTCUseCase.d.ets +7 -7
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleRTCUseCase.js +19 -19
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleStateUseCase.d.ets +10 -10
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleStateUseCase.js +26 -26
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicUpdateChannelViewerUseCase.d.ets +6 -6
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicUpdateChannelViewerUseCase.js +135 -135
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicViewLogUseCase.d.ets +1 -1
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicViewLogUseCase.js +27 -27
- package/src/main/ets/modules/linkmic/viewmodel/usecase/PLVLinkMicUseCases.d.ets +1 -1
- package/src/main/ets/modules/linkmic/viewmodel/usecase/PLVLinkMicUseCases.js +7 -7
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestEncodeParamUseCase.d.ets +6 -6
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestEncodeParamUseCase.js +83 -83
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.d.ets +7 -7
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.js +42 -42
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleStateUseCase.d.ets +10 -10
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleStateUseCase.js +188 -188
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.d.ets +6 -6
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.js +83 -83
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.d.ets +7 -7
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.js +37 -37
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleStateUseCase.d.ets +10 -10
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleStateUseCase.js +128 -128
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.d.ets +6 -6
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.js +13 -13
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.d.ets +7 -7
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.js +53 -53
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleStateUseCase.d.ets +10 -10
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleStateUseCase.js +163 -163
- package/src/main/ets/modules/log/elog/PLVELogSender.d.ets +4 -4
- package/src/main/ets/modules/log/elog/PLVELogSender.js +17 -17
- package/src/main/ets/modules/log/elog/model/PLVELogDataBean.d.ets +1 -1
- package/src/main/ets/modules/log/elog/model/PLVELogDataBean.js +12 -12
- package/src/main/ets/modules/log/elog/model/PLVELogModuleConstants.js +8 -8
- package/src/main/ets/modules/login/PLVSceneLoginManager.d.ets +3 -3
- package/src/main/ets/modules/login/PLVSceneLoginManager.js +102 -102
- package/src/main/ets/modules/login/model/PLVChatDomainVO.d.ets +2 -2
- package/src/main/ets/modules/login/model/PLVChatDomainVO.js +4 -4
- package/src/main/ets/modules/login/model/PLVLiveChannelType.d.ets +1 -1
- package/src/main/ets/modules/login/model/PLVLiveChannelType.js +14 -14
- package/src/main/ets/modules/login/model/PLVLiveDetailVO.d.ets +2 -1
- package/src/main/ets/modules/login/model/PLVLiveDetailVO.js +14 -14
- package/src/main/ets/modules/login/model/PLVLiveStatus.d.ets +1 -1
- package/src/main/ets/modules/login/model/PLVLiveStatus.js +14 -14
- package/src/main/ets/modules/login/model/PLVLiveStatusVO.d.ets +2 -2
- package/src/main/ets/modules/login/model/PLVLiveStatusVO.js +10 -10
- package/src/main/ets/modules/login/model/PLVLoginLiveResult.d.ets +1 -1
- package/src/main/ets/modules/login/model/PLVLoginLiveResult.js +4 -4
- package/src/main/ets/modules/login/model/PLVLoginPlaybackResult.d.ets +1 -1
- package/src/main/ets/modules/login/model/PLVLoginPlaybackResult.js +5 -5
- package/src/main/ets/modules/login/model/PLVLoginType.d.ets +2 -2
- package/src/main/ets/modules/login/model/PLVLoginType.js +16 -16
- package/src/main/ets/modules/member/PLVMemberManager.d.ets +3 -3
- package/src/main/ets/modules/member/PLVMemberManager.js +10 -10
- package/src/main/ets/modules/member/di/PLVMemberModule.js +8 -8
- package/src/main/ets/modules/member/mediator/PLVMemberMediator.d.ets +3 -3
- package/src/main/ets/modules/member/mediator/PLVMemberMediator.js +9 -9
- package/src/main/ets/modules/member/model/PLVMemberRepo.d.ets +2 -2
- package/src/main/ets/modules/member/model/PLVMemberRepo.js +7 -7
- package/src/main/ets/modules/member/model/datasource/PLVMemberNetworkDataSource.d.ets +2 -2
- package/src/main/ets/modules/member/model/datasource/PLVMemberNetworkDataSource.js +11 -11
- package/src/main/ets/modules/member/model/vo/PLVMemberChannelViewer.d.ets +1 -1
- package/src/main/ets/modules/member/model/vo/PLVMemberChannelViewer.js +3 -3
- package/src/main/ets/modules/member/model/vo/PLVMemberErrorEvent.d.ets +1 -1
- package/src/main/ets/modules/member/model/vo/PLVMemberErrorEvent.js +3 -3
- package/src/main/ets/modules/member/viewmodel/PLVMemberViewModel.d.ets +3 -3
- package/src/main/ets/modules/member/viewmodel/PLVMemberViewModel.js +15 -15
- package/src/main/ets/modules/member/viewmodel/usecase/MemberHandleStateUseCase.d.ets +6 -6
- package/src/main/ets/modules/member/viewmodel/usecase/MemberHandleStateUseCase.js +16 -16
- package/src/main/ets/modules/member/viewmodel/usecase/MemberUpdateViewerUseCase.d.ets +9 -9
- package/src/main/ets/modules/member/viewmodel/usecase/MemberUpdateViewerUseCase.js +21 -21
- package/src/main/ets/modules/member/viewmodel/usecase/PLVMemberUseCases.d.ets +1 -1
- package/src/main/ets/modules/member/viewmodel/usecase/PLVMemberUseCases.js +3 -3
- package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestHandleStateUseCase.d.ets +6 -6
- package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestHandleStateUseCase.js +82 -82
- package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.d.ets +9 -9
- package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.js +219 -219
- package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherHandleStateUseCase.d.ets +6 -6
- package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherHandleStateUseCase.js +153 -153
- package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.d.ets +9 -9
- package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.js +219 -219
- package/src/main/ets/modules/net/PLVApiChatPlvNetApi.d.ets +10 -9
- package/src/main/ets/modules/net/PLVApiChatPlvNetApi.js +65 -53
- package/src/main/ets/modules/net/PLVApiPlvNetApi.d.ets +30 -30
- package/src/main/ets/modules/net/PLVApiPlvNetApi.js +164 -164
- package/src/main/ets/modules/net/PLVELogPlvNetApi.d.ets +2 -2
- package/src/main/ets/modules/net/PLVELogPlvNetApi.js +5 -5
- package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.d.ets +3 -3
- package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.js +19 -19
- package/src/main/ets/modules/net/PLVNGBPushApi.d.ets +2 -2
- package/src/main/ets/modules/net/PLVNGBPushApi.js +4 -4
- package/src/main/ets/modules/net/PLVRtasVideoNetApi.d.ets +2 -2
- package/src/main/ets/modules/net/PLVRtasVideoNetApi.js +4 -4
- package/src/main/ets/modules/net/vo/PLVNetworkQuality.js +8 -8
- package/src/main/ets/modules/player/PLVPlayerManager.d.ets +3 -3
- package/src/main/ets/modules/player/PLVPlayerManager.js +8 -8
- package/src/main/ets/modules/player/PLVPlayerMediator.d.ets +1 -1
- package/src/main/ets/modules/player/PLVPlayerMediator.js +8 -8
- package/src/main/ets/modules/player/playback/PLVPlaybackListType.js +4 -4
- package/src/main/ets/modules/player/playback/PLVPreviousListVO.js +8 -8
- package/src/main/ets/modules/player/playback/PLVPreviousManager.d.ets +5 -5
- package/src/main/ets/modules/player/playback/PLVPreviousManager.js +69 -69
- package/src/main/ets/modules/ppt/PLVPPTWeb.js +28 -28
- package/src/main/ets/modules/ppt/PLVPPTWebController.d.ets +6 -6
- package/src/main/ets/modules/ppt/PLVPPTWebController.js +94 -94
- package/src/main/ets/modules/product/PLVProductManager.d.ets +5 -5
- package/src/main/ets/modules/product/PLVProductManager.js +61 -61
- package/src/main/ets/modules/product/components/PLVProductControlWeb.d.ets +1 -1
- package/src/main/ets/modules/product/components/PLVProductControlWeb.js +34 -34
- package/src/main/ets/modules/product/components/PLVProductWeb.d.ets +1 -1
- package/src/main/ets/modules/product/components/PLVProductWeb.js +50 -50
- package/src/main/ets/modules/product/model/PLVProductContentBean.d.ets +1 -1
- package/src/main/ets/modules/product/model/PLVProductContentBean.js +17 -17
- package/src/main/ets/modules/product/model/PLVProductControlEvent.js +7 -7
- package/src/main/ets/modules/product/model/PLVProductDataBean.d.ets +1 -1
- package/src/main/ets/modules/product/model/PLVProductDataBean.js +16 -16
- package/src/main/ets/modules/redpack/PLVRedpackManager.d.ets +9 -9
- package/src/main/ets/modules/redpack/PLVRedpackManager.js +70 -70
- package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.d.ets +1 -1
- package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.js +14 -14
- package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.d.ets +4 -4
- package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.js +28 -28
- package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.d.ets +4 -4
- package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.js +6 -6
- package/src/main/ets/modules/reward/PLVRewardManager.d.ets +2 -2
- package/src/main/ets/modules/reward/PLVRewardManager.js +22 -22
- package/src/main/ets/modules/reward/model/PLVRewardPointVO.d.ets +1 -1
- package/src/main/ets/modules/reward/model/PLVRewardPointVO.js +3 -3
- package/src/main/ets/modules/reward/model/PLVRewardSettingVO.js +24 -24
- package/src/main/ets/modules/socket/PLVSocketManager.d.ets +8 -8
- package/src/main/ets/modules/socket/PLVSocketManager.js +101 -101
- package/src/main/ets/modules/socket/PLVSocketMediator.d.ets +7 -7
- package/src/main/ets/modules/socket/PLVSocketMediator.js +14 -14
- package/src/main/ets/modules/socket/model/PLVSocketUserBean.d.ets +5 -5
- package/src/main/ets/modules/socket/model/PLVSocketUserBean.js +27 -27
- package/src/main/ets/modules/socket/model/PLVUserType.js +15 -15
- package/src/main/ets/modules/socket/model/interact/PLVCallAppEvent.js +6 -6
- package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.d.ets +4 -4
- package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.js +20 -20
- package/src/main/ets/modules/streamer/PLVStreamerManager.d.ets +8 -8
- package/src/main/ets/modules/streamer/PLVStreamerManager.js +24 -24
- package/src/main/ets/modules/streamer/di/PLVStreamerModule.js +8 -8
- package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.d.ets +2 -2
- package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.js +5 -5
- package/src/main/ets/modules/streamer/model/PLVStreamerRepo.d.ets +8 -8
- package/src/main/ets/modules/streamer/model/PLVStreamerRepo.js +41 -41
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.d.ets +2 -2
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.js +10 -10
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.d.ets +7 -7
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.js +48 -48
- package/src/main/ets/modules/streamer/model/vo/PLVStreamerErrorEvent.d.ets +1 -1
- package/src/main/ets/modules/streamer/model/vo/PLVStreamerErrorEvent.js +3 -3
- package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionVO.js +15 -15
- package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixLayoutType.js +4 -4
- package/src/main/ets/modules/streamer/model/vo/PLVStreamerState.js +4 -4
- package/src/main/ets/modules/streamer/viewmodel/PLVStreamerViewModel.d.ets +8 -8
- package/src/main/ets/modules/streamer/viewmodel/PLVStreamerViewModel.js +25 -25
- package/src/main/ets/modules/streamer/viewmodel/usecase/PLVStreamerUseCases.d.ets +1 -1
- package/src/main/ets/modules/streamer/viewmodel/usecase/PLVStreamerUseCases.js +3 -3
- package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerHandleStateUseCase.d.ets +2 -2
- package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerHandleStateUseCase.js +8 -8
- package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerMixStreamUseCase.d.ets +2 -2
- package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerMixStreamUseCase.js +7 -7
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestHandleStateUseCase.d.ets +2 -2
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestHandleStateUseCase.js +42 -42
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestMixStreamUseCase.d.ets +2 -2
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestMixStreamUseCase.js +3 -3
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherHandleStateUseCase.d.ets +2 -2
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherHandleStateUseCase.js +42 -42
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherMixStreamUseCase.d.ets +2 -2
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherMixStreamUseCase.js +51 -51
- package/src/main/ets/modules/web/PLVSocketWebController.d.ets +2 -2
- package/src/main/ets/modules/web/PLVSocketWebController.js +66 -66
- package/src/main/ets/modules/web/PLVWebControllerManager.d.ets +2 -2
- package/src/main/ets/modules/web/PLVWebControllerManager.js +6 -6
- package/src/main/ets/modules/web/PLVWebParams.d.ets +1 -1
- package/src/main/ets/modules/web/PLVWebParams.js +22 -22
- package/src/main/ets/modules/web/qa/PLVQAWeb.d.ets +1 -1
- package/src/main/ets/modules/web/qa/PLVQAWeb.js +34 -34
- package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.d.ets +1 -1
- package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.js +37 -37
- package/src/main/module.json +1 -1
|
@@ -11,27 +11,27 @@ import { PLVSocketUserSend } from '../../../../../socket/model/PLVSocketUserBean
|
|
|
11
11
|
import { PLVMemberSocketSetNickRecv } from '../../../../../member/model/vo/PLVMemberSocketEvent';
|
|
12
12
|
const TAG = "PLVLinkMicManager";
|
|
13
13
|
export class LinkMicViewerHandleStateUseCase {
|
|
14
|
-
constructor(
|
|
14
|
+
constructor(d52, e52, f52, g52) {
|
|
15
15
|
this.taskUpdateMicSetting = undefined;
|
|
16
16
|
this.disposables = [];
|
|
17
17
|
this.observers = [];
|
|
18
|
-
this.repo =
|
|
19
|
-
this.handleQueueOrderUseCase =
|
|
20
|
-
this.handleRTCUseCase =
|
|
21
|
-
this.updateChannelViewerUseCase =
|
|
18
|
+
this.repo = d52;
|
|
19
|
+
this.handleQueueOrderUseCase = e52;
|
|
20
|
+
this.handleRTCUseCase = f52;
|
|
21
|
+
this.updateChannelViewerUseCase = g52;
|
|
22
22
|
}
|
|
23
23
|
init() {
|
|
24
|
-
this.disposables.push(this.observeSocketEvent(PLVSocketOnEvent.MESSAGE, (
|
|
25
|
-
this.repo.mediator.rtcEvent.observe((
|
|
24
|
+
this.disposables.push(this.observeSocketEvent(PLVSocketOnEvent.MESSAGE, (b52, c52) => this.onSocketMessage(b52, c52)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_REQUEST, (a52) => this.onSocketJoinRequest(a52)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_RESPONSE, (z51) => this.onSocketJoinResponse(z51)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_SUCCESS, (y51) => this.onSocketJoinSuccess(y51)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_LEAVE, (x51) => this.onSocketJoinLeave(x51)), this.observeSocketEvent(PLVSocketOnEvent.SWITCH_VIEW, (w51) => this.onSocketSwitchView(w51)));
|
|
25
|
+
this.repo.mediator.rtcEvent.observe((v51) => this.onRTCEvent(v51))
|
|
26
26
|
.pushTo(this.observers);
|
|
27
|
-
this.repo.mediator.viewerLeaveLinkMicEvent.observe(
|
|
27
|
+
this.repo.mediator.viewerLeaveLinkMicEvent.observe(u51 => this.onViewerLeaveLinkMic(u51))
|
|
28
28
|
.pushTo(this.observers);
|
|
29
29
|
this.taskUpdateMicSetting = new PLVScheduledTask(() => this.updateMicSetting(), seconds(1).toMillis(), seconds(10).toMillis());
|
|
30
30
|
this.taskUpdateMicSetting.start();
|
|
31
31
|
}
|
|
32
32
|
async requestJoinLinkMic() {
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const s51 = this.repo.mediator.linkmicState.value;
|
|
34
|
+
if (s51 === PLVLinkMicState.Inviting) {
|
|
35
35
|
this.acceptInvitation();
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
@@ -40,10 +40,10 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
40
40
|
this.repo.mediator.reportError(PLVLinkMicErrorEvent.REACH_LINKMIC_LIMIT, "requestJoinLinkMic channel reach linkmic limit");
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_REQUEST, encodeToJson(
|
|
43
|
+
const t51 = new PLVLinkMicSocketJoinRequestSend();
|
|
44
|
+
t51.user = this.createSocketUser();
|
|
45
|
+
t51.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
46
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_REQUEST, encodeToJson(t51), () => {
|
|
47
47
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Requesting);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -53,35 +53,35 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
53
53
|
this.repo.mediator.reportError(PLVLinkMicErrorEvent.REACH_LINKMIC_LIMIT, "acceptInvitation channel reach linkmic limit");
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
56
|
+
const q51 = new PLVLinkMicSocketJoinAnswerSend();
|
|
57
|
+
q51.user = this.createSocketUser();
|
|
58
|
+
q51.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
59
|
+
q51.status = 1;
|
|
60
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(q51), () => {
|
|
61
|
+
const r51 = this.repo.mediator.linkmicState.value;
|
|
62
|
+
if (r51 === PLVLinkMicState.Inviting) {
|
|
63
63
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.WaitingResponse);
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
refuseInvitation() {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(
|
|
68
|
+
const p51 = new PLVLinkMicSocketJoinAnswerSend();
|
|
69
|
+
p51.user = this.createSocketUser();
|
|
70
|
+
p51.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
71
|
+
p51.status = 0;
|
|
72
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(p51));
|
|
73
73
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
|
|
74
74
|
this.handleRTCUseCase.leaveChannel();
|
|
75
75
|
}
|
|
76
76
|
leaveLinkMic() {
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
77
|
+
const n51 = this.repo.mediator.linkmicState.value;
|
|
78
|
+
if (n51 === undefined || ![PLVLinkMicState.Requesting, PLVLinkMicState.Joined].includes(n51)) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_LEAVE, encodeToJson(
|
|
81
|
+
const o51 = new PLVLinkMicSocketJoinLeaveSend();
|
|
82
|
+
o51.user = this.createSocketUser();
|
|
83
|
+
o51.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
84
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_LEAVE, encodeToJson(o51));
|
|
85
85
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
|
|
86
86
|
this.repo.mediator.channelLinkMicViewers.setValue([]);
|
|
87
87
|
this.repo.mediator.channelMainViewLinkMicId.setValue(undefined);
|
|
@@ -91,7 +91,7 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
91
91
|
}
|
|
92
92
|
onLiveStreamStart() {
|
|
93
93
|
}
|
|
94
|
-
async setLinkMicMode(
|
|
94
|
+
async setLinkMicMode(m51) {
|
|
95
95
|
return false;
|
|
96
96
|
}
|
|
97
97
|
async openLinkMic() {
|
|
@@ -100,75 +100,75 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
100
100
|
async closeLinkMic() {
|
|
101
101
|
return false;
|
|
102
102
|
}
|
|
103
|
-
acceptViewerLinkMicRequest(
|
|
103
|
+
acceptViewerLinkMicRequest(l51) {
|
|
104
104
|
}
|
|
105
|
-
inviteViewerLinkMic(
|
|
105
|
+
inviteViewerLinkMic(j51, k51) {
|
|
106
106
|
}
|
|
107
|
-
hangupViewerLinkMic(
|
|
107
|
+
hangupViewerLinkMic(i51) {
|
|
108
108
|
}
|
|
109
109
|
hangupAllViewersLinkMic() {
|
|
110
110
|
}
|
|
111
|
-
setViewerEnableCamera(
|
|
111
|
+
setViewerEnableCamera(g51, h51) {
|
|
112
112
|
}
|
|
113
|
-
setViewerEnableMicrophone(
|
|
113
|
+
setViewerEnableMicrophone(e51, f51) {
|
|
114
114
|
}
|
|
115
|
-
grantSpeaker(
|
|
115
|
+
grantSpeaker(d51) {
|
|
116
116
|
}
|
|
117
|
-
revokeSpeaker(
|
|
117
|
+
revokeSpeaker(c51) {
|
|
118
118
|
}
|
|
119
|
-
setMainView(
|
|
119
|
+
setMainView(b51) {
|
|
120
120
|
}
|
|
121
121
|
onLiveStreamStop() {
|
|
122
122
|
}
|
|
123
123
|
onStreamerStop() {
|
|
124
124
|
}
|
|
125
125
|
updateInvitationExpireTime() {
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER_TTL, encodeToJson(
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
this.repo.mediator.invitationExpireTimestamp.setValue(
|
|
135
|
-
const
|
|
126
|
+
const t50 = new PLVLinkMicSocketJoinAnswerTTLSend();
|
|
127
|
+
t50.userId = this.repo.mediator.channelData?.viewerId;
|
|
128
|
+
t50.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
129
|
+
t50.sessionId = this.repo.mediator.channelData?.sessionId;
|
|
130
|
+
const u50 = Date.now();
|
|
131
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER_TTL, encodeToJson(t50), (v50) => {
|
|
132
|
+
const w50 = decodeFromJson(v50, PLVLinkMicSocketJoinAnswerTTLAck).message?.[0] ?? 0;
|
|
133
|
+
const x50 = u50 + seconds(w50).toMillis();
|
|
134
|
+
this.repo.mediator.invitationExpireTimestamp.setValue(x50);
|
|
135
|
+
const y50 = x50 - Date.now();
|
|
136
136
|
setTimeout(() => {
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
137
|
+
const z50 = this.repo.mediator.invitationExpireTimestamp.value ?? 0;
|
|
138
|
+
const a51 = this.repo.mediator.linkmicState.value;
|
|
139
|
+
if (a51 === PLVLinkMicState.Inviting && Date.now() >= z50) {
|
|
140
140
|
this.refuseInvitation();
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, y50);
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
onSocketMessage(
|
|
146
|
-
switch (
|
|
145
|
+
onSocketMessage(r50, s50) {
|
|
146
|
+
switch (s50) {
|
|
147
147
|
case PLVSocketMessageEvent.OPEN_MICROPHONE:
|
|
148
|
-
return this.onSocketOpenMicrophone(
|
|
148
|
+
return this.onSocketOpenMicrophone(r50);
|
|
149
149
|
case PLVSocketMessageEvent.MUTE_USER_MICRO:
|
|
150
|
-
return this.onSocketMuteUserMicro(
|
|
150
|
+
return this.onSocketMuteUserMicro(r50);
|
|
151
151
|
case PLVSocketMessageEvent.SET_NICK:
|
|
152
|
-
return this.onSocketUserSetNick(
|
|
152
|
+
return this.onSocketUserSetNick(r50);
|
|
153
153
|
default:
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
onSocketOpenMicrophone(
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
if (!
|
|
156
|
+
onSocketOpenMicrophone(n50) {
|
|
157
|
+
const o50 = decodeFromJson(n50, PLVLinkMicSocketOpenMicrophoneRecv);
|
|
158
|
+
const p50 = o50.userId !== undefined;
|
|
159
|
+
if (o50.status === 'open') {
|
|
160
|
+
if (!p50) {
|
|
161
161
|
this.repo.mediator.channelAllowLinkMic.setValue(true);
|
|
162
162
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(true);
|
|
163
|
-
this.updateLinkMicMode(
|
|
163
|
+
this.updateLinkMicMode(o50.type);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
else if (
|
|
167
|
-
if (!
|
|
166
|
+
else if (o50.status === 'close') {
|
|
167
|
+
if (!p50) {
|
|
168
168
|
if (this.repo.mediator.isLinkMicStrategyV2.value === true) {
|
|
169
169
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
170
|
+
const q50 = this.repo.mediator.linkmicState.value === PLVLinkMicState.Requesting;
|
|
171
|
+
if (q50) {
|
|
172
172
|
this.leaveLinkMic();
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -178,55 +178,55 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
178
178
|
this.leaveLinkMic();
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
if (
|
|
181
|
+
if (p50 && this.repo.mediator.isMySocketLinkMicId(o50.userId)) {
|
|
182
182
|
this.repo.mediator.teacherHangUpLinkMicEvent.setValue(Date.now());
|
|
183
183
|
this.leaveLinkMic();
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
onSocketMuteUserMicro(
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
187
|
+
onSocketMuteUserMicro(l50) {
|
|
188
|
+
const m50 = decodeFromJson(l50, PLVLinkMicSocketMuteUserMicroRecv);
|
|
189
|
+
if (m50.type === 'audio') {
|
|
190
|
+
if (m50.mute === true) {
|
|
191
191
|
this.handleRTCUseCase.enableMicrophone(false);
|
|
192
192
|
}
|
|
193
|
-
if (
|
|
193
|
+
if (m50.mute === false) {
|
|
194
194
|
this.handleRTCUseCase.enableMicrophone(true);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
if (
|
|
198
|
-
if (
|
|
197
|
+
if (m50.type === 'video') {
|
|
198
|
+
if (m50.mute === true) {
|
|
199
199
|
this.handleRTCUseCase.enableCamera(false);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
201
|
+
if (m50.mute === false) {
|
|
202
202
|
this.handleRTCUseCase.enableCamera(true);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
onSocketUserSetNick(
|
|
207
|
-
const
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
|
|
206
|
+
onSocketUserSetNick(h50) {
|
|
207
|
+
const i50 = decodeFromJson(h50, PLVMemberSocketSetNickRecv);
|
|
208
|
+
const j50 = i50.userId;
|
|
209
|
+
const k50 = this.repo.mediator.findViewerByViewerId(j50);
|
|
210
|
+
if (k50 !== undefined) {
|
|
211
|
+
k50.viewerName.setValue(i50.nick);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
onSocketJoinRequest(
|
|
215
|
-
const
|
|
216
|
-
this.handleQueueOrderUseCase.onEventJoinRequest(
|
|
214
|
+
onSocketJoinRequest(f50) {
|
|
215
|
+
const g50 = decodeFromJson(f50, PLVLinkMicSocketJoinRequestRecv);
|
|
216
|
+
this.handleQueueOrderUseCase.onEventJoinRequest(g50);
|
|
217
217
|
}
|
|
218
|
-
onSocketJoinResponse(
|
|
219
|
-
const
|
|
220
|
-
if (!this.repo.mediator.isMySocketLinkMicId(
|
|
218
|
+
onSocketJoinResponse(c50) {
|
|
219
|
+
const d50 = decodeFromJson(c50, PLVLinkMicSocketJoinResponseRecv);
|
|
220
|
+
if (!this.repo.mediator.isMySocketLinkMicId(d50.user?.userId)) {
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
|
-
this.updateLinkMicMode(
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
226
|
-
if (
|
|
223
|
+
this.updateLinkMicMode(d50.type);
|
|
224
|
+
const e50 = this.repo.mediator.linkmicState.value;
|
|
225
|
+
if (d50.isNeedAnswer()) {
|
|
226
|
+
if (e50 === PLVLinkMicState.Requesting) {
|
|
227
227
|
this.acceptInvitation();
|
|
228
228
|
}
|
|
229
|
-
else if (
|
|
229
|
+
else if (e50 === PLVLinkMicState.NoLinkMic) {
|
|
230
230
|
this.repo.mediator.invitationExpireTimestamp.setValue(Date.now() + seconds(30).toMillis());
|
|
231
231
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Inviting);
|
|
232
232
|
this.updateInvitationExpireTime();
|
|
@@ -237,40 +237,40 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
237
237
|
this.handleRTCUseCase.joinChannel();
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
onSocketJoinSuccess(
|
|
241
|
-
const
|
|
242
|
-
this.handleQueueOrderUseCase.onEventJoinSuccess(
|
|
243
|
-
this.updateChannelViewerUseCase.onEventJoinSuccess(
|
|
244
|
-
if (this.repo.mediator.isMySocketLinkMicId(
|
|
240
|
+
onSocketJoinSuccess(a50) {
|
|
241
|
+
const b50 = decodeFromJson(a50, PLVLinkMicSocketJoinSuccessRecv);
|
|
242
|
+
this.handleQueueOrderUseCase.onEventJoinSuccess(b50);
|
|
243
|
+
this.updateChannelViewerUseCase.onEventJoinSuccess(b50);
|
|
244
|
+
if (this.repo.mediator.isMySocketLinkMicId(b50.user?.userId)) {
|
|
245
245
|
this.updateChannelViewerUseCase.startUpdateChannelLinkMicViewersInterval();
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
onSocketJoinLeave(
|
|
249
|
-
const
|
|
250
|
-
this.handleQueueOrderUseCase.onEventJoinLeave(
|
|
251
|
-
this.updateChannelViewerUseCase.onEventJoinLeave(
|
|
252
|
-
if (this.repo.mediator.isMySocketLinkMicId(
|
|
248
|
+
onSocketJoinLeave(y49) {
|
|
249
|
+
const z49 = decodeFromJson(y49, PLVLinkMicSocketJoinLeaveRecv);
|
|
250
|
+
this.handleQueueOrderUseCase.onEventJoinLeave(z49);
|
|
251
|
+
this.updateChannelViewerUseCase.onEventJoinLeave(z49);
|
|
252
|
+
if (this.repo.mediator.isMySocketLinkMicId(z49.user?.userId)) {
|
|
253
253
|
this.updateChannelViewerUseCase.stopUpdateChannelLinkMicViewersInterval();
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
onSocketSwitchView(
|
|
257
|
-
const
|
|
258
|
-
if (isNullOrUndefined(
|
|
256
|
+
onSocketSwitchView(w49) {
|
|
257
|
+
const x49 = decodeFromJson(w49, PLVLinkMicSocketSwitchViewRecv);
|
|
258
|
+
if (isNullOrUndefined(x49.userId)) {
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
|
-
this.repo.mediator.channelMainViewLinkMicId.setValue(
|
|
262
|
-
this.updateChannelViewerUseCase.onEventSwitchView(
|
|
261
|
+
this.repo.mediator.channelMainViewLinkMicId.setValue(x49.userId);
|
|
262
|
+
this.updateChannelViewerUseCase.onEventSwitchView(x49);
|
|
263
263
|
}
|
|
264
264
|
updateMicSetting() {
|
|
265
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.MIC, encodeToJson(new PLVLinkMicSocketMicSettingSend()), (
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
265
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.MIC, encodeToJson(new PLVLinkMicSocketMicSettingSend()), (s49) => {
|
|
266
|
+
const t49 = decodeFromJson(s49, PLVLinkMicSocketMicSettingAck).message?.[0];
|
|
267
|
+
const u49 = t49?.data?.status;
|
|
268
|
+
const v49 = t49?.data?.type;
|
|
269
|
+
if (u49 === 'open') {
|
|
270
270
|
this.repo.mediator.channelAllowLinkMic.setValue(true);
|
|
271
271
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(true);
|
|
272
272
|
}
|
|
273
|
-
else if (
|
|
273
|
+
else if (u49 === 'close') {
|
|
274
274
|
if (this.repo.mediator.isLinkMicStrategyV2.value === true) {
|
|
275
275
|
this.repo.mediator.channelAllowLinkMic.setValue(true);
|
|
276
276
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
|
|
@@ -280,80 +280,80 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
280
280
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
this.updateLinkMicMode(
|
|
283
|
+
this.updateLinkMicMode(v49);
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
onRTCEvent(
|
|
287
|
-
if (
|
|
288
|
-
this.onRTCJoinSuccess(
|
|
286
|
+
onRTCEvent(r49) {
|
|
287
|
+
if (r49 instanceof PLVLinkMicRTCJoinSuccess) {
|
|
288
|
+
this.onRTCJoinSuccess(r49);
|
|
289
289
|
}
|
|
290
|
-
else if (
|
|
291
|
-
this.onRTCKickOut(
|
|
290
|
+
else if (r49 instanceof PLVLinkMicRTCKickOut) {
|
|
291
|
+
this.onRTCKickOut(r49);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
onRTCJoinSuccess(
|
|
294
|
+
onRTCJoinSuccess(p49) {
|
|
295
295
|
this.repo.sendLinkMicIdRelation();
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_SUCCESS, encodeToJson(
|
|
296
|
+
const q49 = new PLVLinkMicSocketJoinSuccessSend();
|
|
297
|
+
q49.user = this.createSocketUser();
|
|
298
|
+
q49.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
299
|
+
q49.sessionId = this.repo.mediator.channelData?.sessionId;
|
|
300
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_SUCCESS, encodeToJson(q49));
|
|
301
301
|
}
|
|
302
|
-
onRTCKickOut(
|
|
302
|
+
onRTCKickOut(o49) {
|
|
303
303
|
this.leaveLinkMic();
|
|
304
304
|
this.repo.mediator.teacherHangUpLinkMicEvent.setValue(Date.now());
|
|
305
305
|
}
|
|
306
|
-
onViewerLeaveLinkMic(
|
|
307
|
-
const
|
|
308
|
-
const
|
|
309
|
-
if (
|
|
306
|
+
onViewerLeaveLinkMic(k49) {
|
|
307
|
+
const l49 = k49.find(n49 => n49.linkmicId === this.repo.mediator.linkmicId) !== undefined;
|
|
308
|
+
const m49 = this.repo.mediator.linkmicState.value === PLVLinkMicState.Joined;
|
|
309
|
+
if (l49 && m49) {
|
|
310
310
|
this.leaveLinkMic();
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
onDestroy() {
|
|
314
314
|
this.taskUpdateMicSetting?.cancel();
|
|
315
315
|
this.taskUpdateMicSetting = undefined;
|
|
316
|
-
this.disposables.forEach((
|
|
317
|
-
|
|
316
|
+
this.disposables.forEach((j49) => {
|
|
317
|
+
j49.dispose();
|
|
318
318
|
});
|
|
319
319
|
this.disposables = [];
|
|
320
320
|
MutableObserver.disposeAll(this.observers);
|
|
321
321
|
this.observers = [];
|
|
322
322
|
}
|
|
323
|
-
observeSocketEvent(
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
return disposable(() =>
|
|
323
|
+
observeSocketEvent(g49, h49) {
|
|
324
|
+
const i49 = requireNotNull(this.repo.mediator.socketMediator);
|
|
325
|
+
i49.onData(g49, h49);
|
|
326
|
+
return disposable(() => i49.offData(g49, h49));
|
|
327
327
|
}
|
|
328
328
|
createSocketUser() {
|
|
329
|
-
const
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
return
|
|
335
|
-
}
|
|
336
|
-
updateLinkMicMode(
|
|
337
|
-
if (
|
|
338
|
-
this.repo.mediator.channelLinkMicMode.setValue(
|
|
329
|
+
const f49 = new PLVSocketUserSend();
|
|
330
|
+
f49.nick = this.repo.mediator.channelData?.viewerName;
|
|
331
|
+
f49.pic = this.repo.mediator.channelData?.viewerAvatar;
|
|
332
|
+
f49.userType = this.repo.mediator.channelData?.viewerType;
|
|
333
|
+
f49.userId = this.repo.mediator.linkmicId;
|
|
334
|
+
return f49;
|
|
335
|
+
}
|
|
336
|
+
updateLinkMicMode(e49) {
|
|
337
|
+
if (e49 === PLVLinkMicMode.AUDIO || e49 === PLVLinkMicMode.VIDEO) {
|
|
338
|
+
this.repo.mediator.channelLinkMicMode.setValue(e49);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
async isChannelReachLinkMicLimit() {
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
342
|
+
const a49 = this.repo.mediator.channelData?.liveDetail?.linkMicLimit;
|
|
343
|
+
if (a49 === undefined) {
|
|
344
344
|
PLVLogger.warn(TAG, "channel linkmic limit is undefined, treat as reach limit.");
|
|
345
345
|
return true;
|
|
346
346
|
}
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
349
|
-
PLVLogger.warn(TAG, `channel linkmic status response fail: ${
|
|
347
|
+
const b49 = await runCatching(this.repo.getChannelLinkMicStatus());
|
|
348
|
+
if (b49.success === false) {
|
|
349
|
+
PLVLogger.warn(TAG, `channel linkmic status response fail: ${b49.error.message}`);
|
|
350
350
|
return true;
|
|
351
351
|
}
|
|
352
|
-
const
|
|
353
|
-
|
|
352
|
+
const c49 = b49.data.joinList?.filter(d49 => {
|
|
353
|
+
d49.userType === PLVUserType.USERTYPE_TEACHER || d49.classStatus?.voice === 1;
|
|
354
354
|
})?.length ?? 0;
|
|
355
|
-
if (
|
|
356
|
-
PLVLogger.warn(TAG, `channel reach linkmic limit, current join ${
|
|
355
|
+
if (c49 >= a49 + 1) {
|
|
356
|
+
PLVLogger.warn(TAG, `channel reach linkmic limit, current join ${c49}, limit ${a49}`);
|
|
357
357
|
return true;
|
|
358
358
|
}
|
|
359
359
|
else {
|
|
@@ -362,15 +362,15 @@ export class LinkMicViewerHandleStateUseCase {
|
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
class SocketDisposable extends PLVDisposable {
|
|
365
|
-
constructor(
|
|
365
|
+
constructor(z48) {
|
|
366
366
|
super();
|
|
367
|
-
this.onDispose =
|
|
367
|
+
this.onDispose = z48;
|
|
368
368
|
}
|
|
369
369
|
dispose() {
|
|
370
370
|
super.dispose();
|
|
371
371
|
this.onDispose?.();
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
function disposable(
|
|
375
|
-
return new SocketDisposable(
|
|
374
|
+
function disposable(y48) {
|
|
375
|
+
return new SocketDisposable(y48);
|
|
376
376
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PLVBaseModule } from '../../../common/PLVBaseModule';
|
|
2
2
|
import { PLVChannelData } from '../../../common/PLVChannelData';
|
|
3
3
|
import { PLVELogDataBean, PLVELogPartData } from './model/PLVELogDataBean';
|
|
4
|
-
export declare function eLogSender(
|
|
4
|
+
export declare function eLogSender(v52: PLVChannelData): PLVELogSender;
|
|
5
5
|
export declare class PLVELogSender extends PLVBaseModule {
|
|
6
6
|
static readonly LOG_ARR: PLVELogDataBean[];
|
|
7
7
|
static batchIntervalId?: number;
|
|
8
|
-
constructor(
|
|
9
|
-
once(
|
|
10
|
-
batch(
|
|
8
|
+
constructor(u52: PLVChannelData);
|
|
9
|
+
once(t52: PLVELogPartData): void;
|
|
10
|
+
batch(r52: PLVELogPartData): void;
|
|
11
11
|
private reportLiveELog;
|
|
12
12
|
}
|
|
@@ -5,12 +5,12 @@ import { toELogData } from './model/PLVELogDataBean';
|
|
|
5
5
|
const TAG = '[PLVELogSender]';
|
|
6
6
|
const BATCH_INTERVAL = 1000 * 60;
|
|
7
7
|
const BATCH_LENGTH = 20;
|
|
8
|
-
export function eLogSender(
|
|
9
|
-
return new PLVELogSender(
|
|
8
|
+
export function eLogSender(v52) {
|
|
9
|
+
return new PLVELogSender(v52);
|
|
10
10
|
}
|
|
11
11
|
export class PLVELogSender extends PLVBaseModule {
|
|
12
|
-
constructor(
|
|
13
|
-
super(
|
|
12
|
+
constructor(u52) {
|
|
13
|
+
super(u52);
|
|
14
14
|
if (PLVELogSender.batchIntervalId == undefined) {
|
|
15
15
|
PLVELogSender.batchIntervalId = setInterval(() => {
|
|
16
16
|
if (PLVELogSender.LOG_ARR.length > 0) {
|
|
@@ -20,25 +20,25 @@ export class PLVELogSender extends PLVBaseModule {
|
|
|
20
20
|
}, BATCH_INTERVAL);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
once(
|
|
24
|
-
this.reportLiveELog([toELogData(this.channelData,
|
|
23
|
+
once(t52) {
|
|
24
|
+
this.reportLiveELog([toELogData(this.channelData, t52)]);
|
|
25
25
|
}
|
|
26
|
-
batch(
|
|
27
|
-
const
|
|
28
|
-
PLVELogSender.LOG_ARR.push(
|
|
29
|
-
PLVLogger.info(TAG, `batch log: ${PLVJSONUtils.safeStringify(
|
|
26
|
+
batch(r52) {
|
|
27
|
+
const s52 = toELogData(this.channelData, r52);
|
|
28
|
+
PLVELogSender.LOG_ARR.push(s52);
|
|
29
|
+
PLVLogger.info(TAG, `batch log: ${PLVJSONUtils.safeStringify(s52)}`);
|
|
30
30
|
if (PLVELogSender.LOG_ARR.length >= BATCH_LENGTH) {
|
|
31
31
|
this.reportLiveELog(PLVELogSender.LOG_ARR);
|
|
32
32
|
PLVELogSender.LOG_ARR.length = 0;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
reportLiveELog(
|
|
36
|
-
return PLVUtils.safePromise(async (
|
|
37
|
-
const
|
|
38
|
-
PLVLogger.info(TAG, `reportLiveELog: ${
|
|
39
|
-
await eLogPlvNetApi(this.channelData).reportLiveELog(this.channelData.loginChannelId,
|
|
40
|
-
.catch((
|
|
41
|
-
return Promise.reject(
|
|
35
|
+
reportLiveELog(m52) {
|
|
36
|
+
return PLVUtils.safePromise(async (n52, o52) => {
|
|
37
|
+
const p52 = PLVJSONUtils.safeStringify(m52);
|
|
38
|
+
PLVLogger.info(TAG, `reportLiveELog: ${p52}`);
|
|
39
|
+
await eLogPlvNetApi(this.channelData).reportLiveELog(this.channelData.loginChannelId, p52)
|
|
40
|
+
.catch((q52) => {
|
|
41
|
+
return Promise.reject(q52.log(TAG, 'reportLiveELog error'));
|
|
42
42
|
});
|
|
43
43
|
PLVLogger.info(TAG, 'reportLiveELog success');
|
|
44
44
|
});
|
|
@@ -28,4 +28,4 @@ export declare class PLVELogPartData {
|
|
|
28
28
|
module: string;
|
|
29
29
|
information?: string;
|
|
30
30
|
}
|
|
31
|
-
export declare function toELogData(
|
|
31
|
+
export declare function toELogData(h52: PLVChannelData, i52: PLVELogPartData): PLVELogDataBean;
|
|
@@ -24,17 +24,17 @@ export class PLVELogPartData {
|
|
|
24
24
|
this.module = 'default_module';
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
export function toELogData(
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
information:
|
|
27
|
+
export function toELogData(h52, i52) {
|
|
28
|
+
const j52 = new PLVELogDataBean();
|
|
29
|
+
j52.errorCode = i52.errorCode || 0;
|
|
30
|
+
j52.event = i52.event || 'default_event';
|
|
31
|
+
j52.module = i52.module || 'default_module';
|
|
32
|
+
j52.logFile = {
|
|
33
|
+
information: i52.information
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return
|
|
35
|
+
j52.appId = h52.appId;
|
|
36
|
+
j52.channelId2 = h52.loginChannelId;
|
|
37
|
+
j52.userId2 = h52.userId;
|
|
38
|
+
j52.viewerId = h52.viewerId;
|
|
39
|
+
return j52;
|
|
40
40
|
}
|