@polyvharmony/live-scenes-sdk 1.3.0 → 1.3.2-rc.1
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 +29 -0
- package/ResourceTable.txt +72 -72
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/common/PLVBaseModule.d.ets +1 -1
- package/src/main/ets/common/PLVBaseModule.js +2 -2
- package/src/main/ets/common/PLVChannelData.d.ets +11 -11
- package/src/main/ets/common/PLVChannelData.js +44 -44
- package/src/main/ets/common/PLVDataBaseModule.d.ets +2 -2
- package/src/main/ets/common/PLVDataBaseModule.js +3 -3
- package/src/main/ets/common/PLVLiveSceneSDK.d.ets +6 -6
- package/src/main/ets/common/PLVLiveSceneSDK.js +23 -23
- package/src/main/ets/modules/business/PLVBusinessApiManager.js +17 -17
- package/src/main/ets/modules/business/model/PLVReportPageViewerVO.d.ets +1 -1
- package/src/main/ets/modules/business/model/PLVReportPageViewerVO.js +3 -3
- package/src/main/ets/modules/chatroom/PLVChatroomManager.d.ets +36 -21
- package/src/main/ets/modules/chatroom/PLVChatroomManager.js +298 -267
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBanIpMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBanIpMessageHandler.js +5 -5
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.d.ets +2 -2
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.js +2 -2
- package/src/main/ets/modules/chatroom/handler/PLVChatroomCancelTopHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomCancelTopHandler.js +3 -3
- package/src/main/ets/modules/chatroom/handler/PLVChatroomCloseRoomMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomCloseRoomMessageHandler.js +5 -5
- package/src/main/ets/modules/chatroom/handler/PLVChatroomDataHandlerFactory.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomDataHandlerFactory.js +22 -21
- package/src/main/ets/modules/chatroom/handler/PLVChatroomFocusModeHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomFocusModeHandler.js +4 -4
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLikesMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLikesMessageHandler.js +5 -5
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLoginMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLoginMessageHandler.js +14 -14
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLogoutMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLogoutMessageHandler.js +5 -5
- package/src/main/ets/modules/chatroom/handler/PLVChatroomOnSliceIdMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomOnSliceIdMessageHandler.js +7 -7
- package/src/main/ets/modules/chatroom/handler/PLVChatroomToTopHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomToTopHandler.js +4 -4
- package/src/main/ets/modules/chatroom/handler/PLVChatroomUnShieldMessageHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomUnShieldMessageHandler.js +5 -5
- package/src/main/ets/modules/chatroom/model/IPLVIdEvent.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVChatImgContentBean.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVChatImgEvent.js +15 -15
- package/src/main/ets/modules/chatroom/model/PLVChatQuoteDataBean.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVEmotionEvent.js +16 -16
- package/src/main/ets/modules/chatroom/model/PLVEmotionImagesVO.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVHistoryChatImgEvent.js +15 -15
- package/src/main/ets/modules/chatroom/model/PLVHistoryFileShareEvent.js +15 -15
- package/src/main/ets/modules/chatroom/model/PLVHistorySpeakEvent.js +17 -17
- package/src/main/ets/modules/chatroom/model/PLVHistroyQuizListVO.js +4 -4
- package/src/main/ets/modules/chatroom/model/PLVImageBean.d.ets +3 -3
- package/src/main/ets/modules/chatroom/model/PLVImageBean.js +34 -34
- package/src/main/ets/modules/chatroom/model/PLVLikesEvent.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVLocalQuizEvent.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVLocalSpeakEvent.js +14 -14
- package/src/main/ets/modules/chatroom/model/PLVPPTShareFileDataBean.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVRewardEvent.js +7 -7
- package/src/main/ets/modules/chatroom/model/PLVSpeakEvent.js +19 -19
- package/src/main/ets/modules/chatroom/model/PLVTAnswerEvent.js +10 -10
- package/src/main/ets/modules/chatroom/model/PLVToTopEvent.d.ets +1 -1
- package/src/main/ets/modules/chatroom/model/PLVToTopEvent.js +2 -2
- package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.d.ets +4 -4
- package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.js +133 -136
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.d.ets +3 -2
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.js +27 -24
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackOpenHelper.d.ets +8 -8
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackOpenHelper.js +28 -28
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackToTopVO.d.ets +3 -3
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackToTopVO.js +46 -46
- 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 +14 -14
- package/src/main/ets/modules/interact/PLVInteractWeb.js +150 -151
- 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.d.ets +2 -2
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperEvent.js +7 -7
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperResultEvent.d.ets +1 -1
- 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 +53 -46
- package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.d.ets +10 -10
- package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.js +74 -70
- package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.d.ets +5 -4
- package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.js +79 -56
- 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.d.ets +2 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCType.js +3 -2
- 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 +192 -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 +130 -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 +166 -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 +4 -3
- package/src/main/ets/modules/login/PLVSceneLoginManager.js +111 -101
- 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 +15 -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 +15 -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 +32 -22
- 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 +95 -88
- 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 +160 -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 +67 -53
- package/src/main/ets/modules/net/PLVApiPlvNetApi.d.ets +30 -29
- package/src/main/ets/modules/net/PLVApiPlvNetApi.js +172 -159
- 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 +29 -31
- 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 +35 -37
- package/src/main/ets/modules/product/components/PLVProductWeb.d.ets +1 -1
- package/src/main/ets/modules/product/components/PLVProductWeb.js +51 -53
- 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 +5 -5
- package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.js +28 -28
- package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.d.ets +5 -5
- 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 +103 -102
- 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 +45 -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 +3 -3
- 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 +35 -37
- package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.d.ets +1 -1
- package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.js +38 -40
- package/src/main/module.json +1 -1
package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleStateUseCase.js
CHANGED
|
@@ -10,20 +10,20 @@ import { PLVSocketUserSend } from '../../../../../socket/model/PLVSocketUserBean
|
|
|
10
10
|
import { PLVMemberSocketSetNickRecv } from '../../../../../member/model/vo/PLVMemberSocketEvent';
|
|
11
11
|
const TAG = "PLVLinkMicManager";
|
|
12
12
|
export class LinkMicGuestHandleStateUseCase {
|
|
13
|
-
constructor(
|
|
13
|
+
constructor(u42, v42, w42, x42) {
|
|
14
14
|
this.disposables = [];
|
|
15
15
|
this.observers = [];
|
|
16
|
-
this.repo =
|
|
17
|
-
this.handleQueueOrderUseCase =
|
|
18
|
-
this.handleRTCUseCase =
|
|
19
|
-
this.updateChannelViewerUseCase =
|
|
16
|
+
this.repo = u42;
|
|
17
|
+
this.handleQueueOrderUseCase = v42;
|
|
18
|
+
this.handleRTCUseCase = w42;
|
|
19
|
+
this.updateChannelViewerUseCase = x42;
|
|
20
20
|
}
|
|
21
21
|
init() {
|
|
22
|
-
this.disposables.push(this.observeSocketEvent(PLVSocketOnEvent.MESSAGE, (
|
|
22
|
+
this.disposables.push(this.observeSocketEvent(PLVSocketOnEvent.MESSAGE, (s42, t42) => this.onSocketMessage(s42, t42)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_REQUEST, (r42) => this.onSocketJoinRequest(r42)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_RESPONSE, (q42) => this.onSocketJoinResponse(q42)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_SUCCESS, (p42) => this.onSocketJoinSuccess(p42)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_LEAVE, (o42) => this.onSocketJoinLeave(o42)), this.observeSocketEvent(PLVSocketOnEvent.SWITCH_VIEW, (n42) => this.onSocketSwitchView(n42)));
|
|
23
23
|
}
|
|
24
24
|
async requestJoinLinkMic() {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
25
|
+
const l42 = this.repo.mediator.linkmicState.value;
|
|
26
|
+
if (l42 === PLVLinkMicState.Inviting) {
|
|
27
27
|
this.acceptInvitation();
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
@@ -32,10 +32,10 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
32
32
|
this.repo.mediator.reportError(PLVLinkMicErrorEvent.REACH_LINKMIC_LIMIT, "requestJoinLinkMic channel reach linkmic limit");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_REQUEST, encodeToJson(
|
|
35
|
+
const m42 = new PLVLinkMicSocketJoinRequestSend();
|
|
36
|
+
m42.user = this.createSocketUser();
|
|
37
|
+
m42.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
38
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_REQUEST, encodeToJson(m42), () => {
|
|
39
39
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Requesting);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -45,34 +45,34 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
45
45
|
this.repo.mediator.reportError(PLVLinkMicErrorEvent.REACH_LINKMIC_LIMIT, "acceptInvitation channel reach linkmic limit");
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
48
|
+
const j42 = new PLVLinkMicSocketJoinAnswerSend();
|
|
49
|
+
j42.user = this.createSocketUser();
|
|
50
|
+
j42.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
51
|
+
j42.status = 1;
|
|
52
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(j42), () => {
|
|
53
|
+
const k42 = this.repo.mediator.linkmicState.value;
|
|
54
|
+
if (k42 === PLVLinkMicState.Inviting) {
|
|
55
55
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.WaitingResponse);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
refuseInvitation() {
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(
|
|
60
|
+
const i42 = new PLVLinkMicSocketJoinAnswerSend();
|
|
61
|
+
i42.user = this.createSocketUser();
|
|
62
|
+
i42.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
63
|
+
i42.status = 0;
|
|
64
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(i42));
|
|
65
65
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
|
|
66
66
|
}
|
|
67
67
|
leaveLinkMic() {
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
68
|
+
const g42 = this.repo.mediator.linkmicState.value;
|
|
69
|
+
if (g42 === undefined || ![PLVLinkMicState.Requesting, PLVLinkMicState.Joined].includes(g42)) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_LEAVE, encodeToJson(
|
|
72
|
+
const h42 = new PLVLinkMicSocketJoinLeaveSend();
|
|
73
|
+
h42.user = this.createSocketUser();
|
|
74
|
+
h42.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
75
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_LEAVE, encodeToJson(h42));
|
|
76
76
|
this.revokeSpeaker("");
|
|
77
77
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
|
|
78
78
|
}
|
|
@@ -83,7 +83,7 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
83
83
|
this.tryAutoJoinLinkMic();
|
|
84
84
|
this.updateChannelViewerUseCase.startUpdateChannelLinkMicViewersInterval();
|
|
85
85
|
}
|
|
86
|
-
async setLinkMicMode(
|
|
86
|
+
async setLinkMicMode(f42) {
|
|
87
87
|
return false;
|
|
88
88
|
}
|
|
89
89
|
async openLinkMic() {
|
|
@@ -92,64 +92,64 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
92
92
|
async closeLinkMic() {
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
|
-
acceptViewerLinkMicRequest(
|
|
95
|
+
acceptViewerLinkMicRequest(e42) {
|
|
96
96
|
}
|
|
97
|
-
inviteViewerLinkMic(
|
|
97
|
+
inviteViewerLinkMic(c42, d42) {
|
|
98
98
|
}
|
|
99
|
-
hangupViewerLinkMic(
|
|
99
|
+
hangupViewerLinkMic(b42) {
|
|
100
100
|
}
|
|
101
101
|
hangupAllViewersLinkMic() {
|
|
102
102
|
}
|
|
103
|
-
setViewerEnableCamera(
|
|
103
|
+
setViewerEnableCamera(z41, a42) {
|
|
104
104
|
}
|
|
105
|
-
setViewerEnableMicrophone(
|
|
105
|
+
setViewerEnableMicrophone(x41, y41) {
|
|
106
106
|
}
|
|
107
|
-
grantSpeaker(
|
|
107
|
+
grantSpeaker(w41) {
|
|
108
108
|
if (!this.isMyselfSpeaker()) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
this.moveSpeaker(
|
|
112
|
-
this.setMainView(
|
|
111
|
+
this.moveSpeaker(w41);
|
|
112
|
+
this.setMainView(w41);
|
|
113
113
|
}
|
|
114
|
-
revokeSpeaker(
|
|
114
|
+
revokeSpeaker(u41) {
|
|
115
115
|
if (!this.isMyselfSpeaker()) {
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
const
|
|
119
|
-
this.moveSpeaker(
|
|
120
|
-
this.setMainView(
|
|
118
|
+
const v41 = requireNotNull(this.repo.mediator.channelData?.loginChannelId);
|
|
119
|
+
this.moveSpeaker(v41);
|
|
120
|
+
this.setMainView(v41);
|
|
121
121
|
}
|
|
122
|
-
setMainView(
|
|
122
|
+
setMainView(r41) {
|
|
123
123
|
if (!this.isMyselfSpeaker()) {
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
PLVLogger.error(TAG, `setMainView fail, viewerId ${
|
|
126
|
+
const s41 = this.repo.mediator.memberMediator?.findViewerByViewerId(r41);
|
|
127
|
+
if (s41 === undefined) {
|
|
128
|
+
PLVLogger.error(TAG, `setMainView fail, viewerId ${r41} not found.`);
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.SWITCH_VIEW, encodeToJson(
|
|
131
|
+
const t41 = new PLVLinkMicSocketSwitchViewSend();
|
|
132
|
+
t41.emitMode = 0;
|
|
133
|
+
t41.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
134
|
+
t41.userId = s41.linkmicId;
|
|
135
|
+
t41.socketId = s41.socketId;
|
|
136
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.SWITCH_VIEW, encodeToJson(t41));
|
|
137
137
|
}
|
|
138
138
|
isMyselfSpeaker() {
|
|
139
|
-
const
|
|
140
|
-
return !isNullOrUndefined(
|
|
141
|
-
}
|
|
142
|
-
moveSpeaker(
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
139
|
+
const q41 = this.repo.mediator.channelMainViewLinkMicId.value;
|
|
140
|
+
return !isNullOrUndefined(q41) && this.repo.mediator.isMySocketLinkMicId(q41);
|
|
141
|
+
}
|
|
142
|
+
moveSpeaker(o41) {
|
|
143
|
+
const p41 = new PLVLinkMicSocketTeacherSetPermissionSend();
|
|
144
|
+
p41.emitMode = 0;
|
|
145
|
+
p41.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
146
|
+
p41.sessionId = this.repo.mediator.channelData?.sessionId;
|
|
147
|
+
p41.type = "speaker";
|
|
148
|
+
p41.status = "1";
|
|
149
|
+
p41.userId = o41;
|
|
150
|
+
p41.sign = PLVRequestSetting.createSign(new Map(Object.entries(p41)), "polyvChatSign")
|
|
151
151
|
.toUpperCase();
|
|
152
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.MESSAGE, encodeToJson(
|
|
152
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.MESSAGE, encodeToJson(p41));
|
|
153
153
|
}
|
|
154
154
|
onLiveStreamStop() {
|
|
155
155
|
this.leaveLinkMic();
|
|
@@ -160,46 +160,50 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
160
160
|
this.handleRTCUseCase.leaveChannel();
|
|
161
161
|
}
|
|
162
162
|
updateInvitationExpireTime() {
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER_TTL, encodeToJson(
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
this.repo.mediator.invitationExpireTimestamp.setValue(
|
|
172
|
-
const
|
|
163
|
+
const g41 = new PLVLinkMicSocketJoinAnswerTTLSend();
|
|
164
|
+
g41.userId = this.repo.mediator.channelData?.viewerId;
|
|
165
|
+
g41.roomId = this.repo.mediator.channelData?.loginChannelId;
|
|
166
|
+
g41.sessionId = this.repo.mediator.channelData?.sessionId;
|
|
167
|
+
const h41 = Date.now();
|
|
168
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER_TTL, encodeToJson(g41), (i41) => {
|
|
169
|
+
const j41 = decodeFromJson(i41, PLVLinkMicSocketJoinAnswerTTLAck).message?.[0] ?? 0;
|
|
170
|
+
const k41 = h41 + seconds(j41).toMillis();
|
|
171
|
+
this.repo.mediator.invitationExpireTimestamp.setValue(k41);
|
|
172
|
+
const l41 = k41 - Date.now();
|
|
173
173
|
setTimeout(() => {
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
174
|
+
const m41 = this.repo.mediator.invitationExpireTimestamp.value ?? 0;
|
|
175
|
+
const n41 = this.repo.mediator.linkmicState.value;
|
|
176
|
+
if (n41 === PLVLinkMicState.Inviting && Date.now() >= m41) {
|
|
177
177
|
this.refuseInvitation();
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, l41);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
onSocketMessage(
|
|
183
|
-
switch (
|
|
184
|
-
case PLVSocketMessageEvent.OPEN_MICROPHONE:
|
|
185
|
-
|
|
186
|
-
case PLVSocketMessageEvent.
|
|
187
|
-
|
|
182
|
+
onSocketMessage(e41, f41) {
|
|
183
|
+
switch (f41) {
|
|
184
|
+
case PLVSocketMessageEvent.OPEN_MICROPHONE:
|
|
185
|
+
return this.onSocketOpenMicrophone(e41);
|
|
186
|
+
case PLVSocketMessageEvent.MUTE_USER_MICRO:
|
|
187
|
+
return this.onSocketMuteUserMicro(e41);
|
|
188
|
+
case PLVSocketMessageEvent.TEACHER_SET_PERMISSION:
|
|
189
|
+
return this.onSocketTeacherSetPermission(e41);
|
|
190
|
+
case PLVSocketMessageEvent.SET_NICK:
|
|
191
|
+
return this.onSocketUserSetNick(e41);
|
|
188
192
|
default:
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
|
-
onSocketOpenMicrophone(
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
if (!
|
|
195
|
+
onSocketOpenMicrophone(b41) {
|
|
196
|
+
const c41 = decodeFromJson(b41, PLVLinkMicSocketOpenMicrophoneRecv);
|
|
197
|
+
const d41 = c41.userId !== undefined;
|
|
198
|
+
if (c41.status === 'open') {
|
|
199
|
+
if (!d41) {
|
|
196
200
|
this.repo.mediator.channelAllowLinkMic.setValue(true);
|
|
197
201
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(true);
|
|
198
|
-
this.updateLinkMicMode(
|
|
202
|
+
this.updateLinkMicMode(c41.type);
|
|
199
203
|
}
|
|
200
204
|
}
|
|
201
|
-
else if (
|
|
202
|
-
if (!
|
|
205
|
+
else if (c41.status === 'close') {
|
|
206
|
+
if (!d41) {
|
|
203
207
|
if (this.repo.mediator.isLinkMicStrategyV2.value === true) {
|
|
204
208
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
|
|
205
209
|
}
|
|
@@ -208,66 +212,66 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
208
212
|
this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
|
|
209
213
|
}
|
|
210
214
|
}
|
|
211
|
-
if (
|
|
215
|
+
if (d41 && this.repo.mediator.isMySocketLinkMicId(c41.userId)) {
|
|
212
216
|
this.repo.mediator.teacherHangUpLinkMicEvent.setValue(Date.now());
|
|
213
217
|
this.leaveLinkMic();
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
220
|
}
|
|
217
|
-
onSocketMuteUserMicro(
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
if (
|
|
221
|
+
onSocketMuteUserMicro(z40) {
|
|
222
|
+
const a41 = decodeFromJson(z40, PLVLinkMicSocketMuteUserMicroRecv);
|
|
223
|
+
if (a41.type === 'audio') {
|
|
224
|
+
if (a41.mute === true) {
|
|
221
225
|
this.handleRTCUseCase.enableMicrophone(false);
|
|
222
226
|
}
|
|
223
|
-
if (
|
|
227
|
+
if (a41.mute === false) {
|
|
224
228
|
this.handleRTCUseCase.enableMicrophone(true);
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
|
-
if (
|
|
228
|
-
if (
|
|
231
|
+
if (a41.type === 'video') {
|
|
232
|
+
if (a41.mute === true) {
|
|
229
233
|
this.handleRTCUseCase.enableCamera(false);
|
|
230
234
|
}
|
|
231
|
-
if (
|
|
235
|
+
if (a41.mute === false) {
|
|
232
236
|
this.handleRTCUseCase.enableCamera(true);
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
239
|
}
|
|
236
|
-
onSocketTeacherSetPermission(
|
|
237
|
-
const
|
|
238
|
-
this.updateChannelViewerUseCase.onEventTeacherSetPermission(
|
|
239
|
-
if (
|
|
240
|
-
const
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
243
|
-
this.repo.mediator.linkmicState.setValue(
|
|
240
|
+
onSocketTeacherSetPermission(v40) {
|
|
241
|
+
const w40 = decodeFromJson(v40, PLVLinkMicSocketTeacherSetPermissionRecv);
|
|
242
|
+
this.updateChannelViewerUseCase.onEventTeacherSetPermission(w40);
|
|
243
|
+
if (w40.type === "voice") {
|
|
244
|
+
const x40 = w40.status === "1";
|
|
245
|
+
const y40 = !isNullOrUndefined(w40.userId) && w40.userId === this.repo.mediator.channelData?.viewerId;
|
|
246
|
+
if (y40) {
|
|
247
|
+
this.repo.mediator.linkmicState.setValue(x40 ? PLVLinkMicState.Joined : PLVLinkMicState.NoLinkMic);
|
|
244
248
|
}
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
|
-
onSocketUserSetNick(
|
|
248
|
-
const
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
if (
|
|
252
|
-
|
|
251
|
+
onSocketUserSetNick(r40) {
|
|
252
|
+
const s40 = decodeFromJson(r40, PLVMemberSocketSetNickRecv);
|
|
253
|
+
const t40 = s40.userId;
|
|
254
|
+
const u40 = this.repo.mediator.findViewerByViewerId(t40);
|
|
255
|
+
if (u40 !== undefined) {
|
|
256
|
+
u40.viewerName.setValue(s40.nick);
|
|
253
257
|
}
|
|
254
258
|
}
|
|
255
|
-
onSocketJoinRequest(
|
|
256
|
-
const
|
|
257
|
-
this.handleQueueOrderUseCase.onEventJoinRequest(
|
|
259
|
+
onSocketJoinRequest(p40) {
|
|
260
|
+
const q40 = decodeFromJson(p40, PLVLinkMicSocketJoinRequestRecv);
|
|
261
|
+
this.handleQueueOrderUseCase.onEventJoinRequest(q40);
|
|
258
262
|
}
|
|
259
|
-
onSocketJoinResponse(
|
|
260
|
-
const
|
|
261
|
-
if (!this.repo.mediator.isMySocketLinkMicId(
|
|
263
|
+
onSocketJoinResponse(m40) {
|
|
264
|
+
const n40 = decodeFromJson(m40, PLVLinkMicSocketJoinResponseRecv);
|
|
265
|
+
if (!this.repo.mediator.isMySocketLinkMicId(n40.user?.userId)) {
|
|
262
266
|
return;
|
|
263
267
|
}
|
|
264
|
-
this.updateLinkMicMode(
|
|
265
|
-
const
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
268
|
+
this.updateLinkMicMode(n40.type);
|
|
269
|
+
const o40 = this.repo.mediator.linkmicState.value;
|
|
270
|
+
if (n40.isNeedAnswer()) {
|
|
271
|
+
if (o40 === PLVLinkMicState.Requesting) {
|
|
268
272
|
this.acceptInvitation();
|
|
269
273
|
}
|
|
270
|
-
else if (
|
|
274
|
+
else if (o40 === PLVLinkMicState.NoLinkMic) {
|
|
271
275
|
this.repo.mediator.invitationExpireTimestamp.setValue(Date.now() + seconds(30).toMillis());
|
|
272
276
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Inviting);
|
|
273
277
|
this.updateInvitationExpireTime();
|
|
@@ -277,95 +281,95 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
277
281
|
this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Joined);
|
|
278
282
|
}
|
|
279
283
|
}
|
|
280
|
-
onSocketJoinSuccess(
|
|
281
|
-
const
|
|
282
|
-
this.handleQueueOrderUseCase.onEventJoinSuccess(
|
|
283
|
-
this.updateChannelViewerUseCase.onEventJoinSuccess(
|
|
284
|
+
onSocketJoinSuccess(k40) {
|
|
285
|
+
const l40 = decodeFromJson(k40, PLVLinkMicSocketJoinSuccessRecv);
|
|
286
|
+
this.handleQueueOrderUseCase.onEventJoinSuccess(l40);
|
|
287
|
+
this.updateChannelViewerUseCase.onEventJoinSuccess(l40);
|
|
284
288
|
}
|
|
285
|
-
onSocketJoinLeave(
|
|
286
|
-
const
|
|
287
|
-
this.handleQueueOrderUseCase.onEventJoinLeave(
|
|
288
|
-
this.updateChannelViewerUseCase.onEventJoinLeave(
|
|
289
|
+
onSocketJoinLeave(i40) {
|
|
290
|
+
const j40 = decodeFromJson(i40, PLVLinkMicSocketJoinLeaveRecv);
|
|
291
|
+
this.handleQueueOrderUseCase.onEventJoinLeave(j40);
|
|
292
|
+
this.updateChannelViewerUseCase.onEventJoinLeave(j40);
|
|
289
293
|
}
|
|
290
|
-
onSocketSwitchView(
|
|
291
|
-
const
|
|
292
|
-
if (isNullOrUndefined(
|
|
294
|
+
onSocketSwitchView(g40) {
|
|
295
|
+
const h40 = decodeFromJson(g40, PLVLinkMicSocketSwitchViewRecv);
|
|
296
|
+
if (isNullOrUndefined(h40.userId)) {
|
|
293
297
|
return;
|
|
294
298
|
}
|
|
295
|
-
this.repo.mediator.channelMainViewLinkMicId.setValue(
|
|
296
|
-
this.updateChannelViewerUseCase.onEventSwitchView(
|
|
299
|
+
this.repo.mediator.channelMainViewLinkMicId.setValue(h40.userId);
|
|
300
|
+
this.updateChannelViewerUseCase.onEventSwitchView(h40);
|
|
297
301
|
}
|
|
298
302
|
async tryAutoJoinLinkMic() {
|
|
299
|
-
const
|
|
300
|
-
if (!
|
|
303
|
+
const a40 = this.repo.mediator.channelData?.streamerData?.colinMicType === "auto";
|
|
304
|
+
if (!a40) {
|
|
301
305
|
return;
|
|
302
306
|
}
|
|
303
|
-
const
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
const b40 = Promises.withResolvers();
|
|
308
|
+
const c40 = this.repo.mediator.linkmicState.observe((f40) => {
|
|
309
|
+
if (f40 === PLVLinkMicState.Joined) {
|
|
310
|
+
b40.resolve();
|
|
311
|
+
c40.dispose();
|
|
308
312
|
}
|
|
309
313
|
});
|
|
310
|
-
this.observers.push(
|
|
311
|
-
const
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_RESPONSE, encodeToJson(
|
|
314
|
+
this.observers.push(c40);
|
|
315
|
+
const d40 = async () => {
|
|
316
|
+
const e40 = new PLVLinkMicSocketJoinResponseSend();
|
|
317
|
+
e40.roomId = await this.repo.mediator.channelData?.loginRoomIdPromise.get();
|
|
318
|
+
e40.value = "1";
|
|
319
|
+
e40.toEmitAll = 1;
|
|
320
|
+
e40.user = this.createSocketUser();
|
|
321
|
+
this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_RESPONSE, encodeToJson(e40));
|
|
318
322
|
};
|
|
319
323
|
await runCatching(retry(async () => {
|
|
320
324
|
await withTimeout(seconds(8), async () => {
|
|
321
|
-
await
|
|
322
|
-
await
|
|
325
|
+
await d40();
|
|
326
|
+
await b40.promise;
|
|
323
327
|
});
|
|
324
328
|
}, RetryConditions.delay(3, seconds(1))));
|
|
325
|
-
|
|
329
|
+
c40.dispose();
|
|
326
330
|
}
|
|
327
331
|
onDestroy() {
|
|
328
|
-
this.disposables.forEach((
|
|
329
|
-
|
|
332
|
+
this.disposables.forEach((z39) => {
|
|
333
|
+
z39.dispose();
|
|
330
334
|
});
|
|
331
335
|
this.disposables = [];
|
|
332
336
|
MutableObserver.disposeAll(this.observers);
|
|
333
337
|
this.observers = [];
|
|
334
338
|
}
|
|
335
|
-
observeSocketEvent(
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
return disposable(() =>
|
|
339
|
+
observeSocketEvent(w39, x39) {
|
|
340
|
+
const y39 = requireNotNull(this.repo.mediator.socketMediator);
|
|
341
|
+
y39.onData(w39, x39);
|
|
342
|
+
return disposable(() => y39.offData(w39, x39));
|
|
339
343
|
}
|
|
340
344
|
createSocketUser() {
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return
|
|
347
|
-
}
|
|
348
|
-
updateLinkMicMode(
|
|
349
|
-
if (
|
|
350
|
-
this.repo.mediator.channelLinkMicMode.setValue(
|
|
345
|
+
const v39 = new PLVSocketUserSend();
|
|
346
|
+
v39.nick = this.repo.mediator.channelData?.viewerName;
|
|
347
|
+
v39.pic = this.repo.mediator.channelData?.viewerAvatar;
|
|
348
|
+
v39.userType = this.repo.mediator.channelData?.viewerType;
|
|
349
|
+
v39.userId = this.repo.mediator.linkmicId;
|
|
350
|
+
return v39;
|
|
351
|
+
}
|
|
352
|
+
updateLinkMicMode(u39) {
|
|
353
|
+
if (u39 === PLVLinkMicMode.AUDIO || u39 === PLVLinkMicMode.VIDEO) {
|
|
354
|
+
this.repo.mediator.channelLinkMicMode.setValue(u39);
|
|
351
355
|
}
|
|
352
356
|
}
|
|
353
357
|
async isChannelReachLinkMicLimit() {
|
|
354
|
-
const
|
|
355
|
-
if (
|
|
358
|
+
const q39 = this.repo.mediator.channelData?.liveDetail?.linkMicLimit;
|
|
359
|
+
if (q39 === undefined) {
|
|
356
360
|
PLVLogger.warn(TAG, "channel linkmic limit is undefined, treat as reach limit.");
|
|
357
361
|
return true;
|
|
358
362
|
}
|
|
359
|
-
const
|
|
360
|
-
if (
|
|
361
|
-
PLVLogger.warn(TAG, `channel linkmic status response fail: ${
|
|
363
|
+
const r39 = await runCatching(this.repo.getChannelLinkMicStatus());
|
|
364
|
+
if (r39.success === false) {
|
|
365
|
+
PLVLogger.warn(TAG, `channel linkmic status response fail: ${r39.error.message}`);
|
|
362
366
|
return true;
|
|
363
367
|
}
|
|
364
|
-
const
|
|
365
|
-
|
|
368
|
+
const s39 = r39.data.joinList?.filter(t39 => {
|
|
369
|
+
t39.userType === PLVUserType.USERTYPE_TEACHER || t39.classStatus?.voice === 1;
|
|
366
370
|
})?.length ?? 0;
|
|
367
|
-
if (
|
|
368
|
-
PLVLogger.warn(TAG, `channel reach linkmic limit, current join ${
|
|
371
|
+
if (s39 >= q39 + 1) {
|
|
372
|
+
PLVLogger.warn(TAG, `channel reach linkmic limit, current join ${s39}, limit ${q39}`);
|
|
369
373
|
return true;
|
|
370
374
|
}
|
|
371
375
|
else {
|
|
@@ -374,15 +378,15 @@ export class LinkMicGuestHandleStateUseCase {
|
|
|
374
378
|
}
|
|
375
379
|
}
|
|
376
380
|
class SocketDisposable extends PLVDisposable {
|
|
377
|
-
constructor(
|
|
381
|
+
constructor(p39) {
|
|
378
382
|
super();
|
|
379
|
-
this.onDispose =
|
|
383
|
+
this.onDispose = p39;
|
|
380
384
|
}
|
|
381
385
|
dispose() {
|
|
382
386
|
super.dispose();
|
|
383
387
|
this.onDispose?.();
|
|
384
388
|
}
|
|
385
389
|
}
|
|
386
|
-
function disposable(
|
|
387
|
-
return new SocketDisposable(
|
|
390
|
+
function disposable(o39) {
|
|
391
|
+
return new SocketDisposable(o39);
|
|
388
392
|
}
|
|
@@ -5,13 +5,13 @@ import { PLVLinkMicPushResolutionRatio } from '../../../../model/vo/PLVLinkMicPu
|
|
|
5
5
|
import { ILinkMicEncodeParamUseCase } from '../base/ILinkMicEncodeParamUseCase';
|
|
6
6
|
export declare class LinkMicTeacherEncodeParamUseCase implements ILinkMicEncodeParamUseCase {
|
|
7
7
|
private readonly repo;
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(z44: PLVLinkMicRepo);
|
|
9
9
|
init(): void;
|
|
10
|
-
setBitRate(
|
|
11
|
-
setPushResolutionRatio(
|
|
12
|
-
setPushOrientation(
|
|
13
|
-
setPushMirror(
|
|
14
|
-
setPushDowngradePreference(
|
|
10
|
+
setBitRate(y44: PLVLinkMicBitRate): void;
|
|
11
|
+
setPushResolutionRatio(x44: PLVLinkMicPushResolutionRatio): void;
|
|
12
|
+
setPushOrientation(w44: PLVPushOrientation): void;
|
|
13
|
+
setPushMirror(v44: boolean): void;
|
|
14
|
+
setPushDowngradePreference(u44: PLVPushDowngradePreference): void;
|
|
15
15
|
private updateEncodeParam;
|
|
16
16
|
private parseChannelBitRateSetting;
|
|
17
17
|
private parsePushStreamTemplate;
|