@polyvharmony/live-scenes-sdk 1.2.0 → 1.3.0-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 +4 -0
- package/Index.d.ets +15 -4
- package/Index.js +13 -3
- package/ResourceTable.txt +72 -51
- 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 +48 -7
- package/src/main/ets/common/PLVChannelData.js +62 -28
- package/src/main/ets/common/PLVLiveSceneSDK.d.ets +9 -4
- package/src/main/ets/common/PLVLiveSceneSDK.js +14 -8
- package/src/main/ets/modules/business/PLVBusinessApiManager.js +8 -8
- package/src/main/ets/modules/chatroom/PLVChatroomManager.d.ets +20 -13
- package/src/main/ets/modules/chatroom/PLVChatroomManager.js +204 -232
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBanIpMessageHandler.js +4 -4
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.js +2 -2
- package/src/main/ets/modules/chatroom/handler/PLVChatroomCancelTopHandler.js +2 -2
- package/src/main/ets/modules/chatroom/handler/PLVChatroomCloseRoomMessageHandler.js +3 -3
- package/src/main/ets/modules/chatroom/handler/PLVChatroomDataHandlerFactory.d.ets +1 -1
- package/src/main/ets/modules/chatroom/handler/PLVChatroomDataHandlerFactory.js +11 -11
- package/src/main/ets/modules/chatroom/handler/PLVChatroomFocusModeHandler.js +3 -3
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLikesMessageHandler.js +4 -4
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLoginMessageHandler.js +13 -13
- package/src/main/ets/modules/chatroom/handler/PLVChatroomLogoutMessageHandler.js +4 -4
- package/src/main/ets/modules/chatroom/handler/PLVChatroomOnSliceIdMessageHandler.js +6 -6
- package/src/main/ets/modules/chatroom/handler/PLVChatroomToTopHandler.js +3 -3
- package/src/main/ets/modules/chatroom/handler/PLVChatroomUnShieldMessageHandler.js +4 -4
- package/src/main/ets/modules/chatroom/model/IPLVIdEvent.js +4 -4
- package/src/main/ets/modules/chatroom/model/IPLVTimestampEvent.d.ets +6 -0
- package/src/main/ets/modules/chatroom/model/IPLVTimestampEvent.js +1 -0
- package/src/main/ets/modules/chatroom/model/PLVBulletinEvent.d.ets +1 -0
- package/src/main/ets/modules/chatroom/model/PLVChatImgContentBean.js +4 -4
- package/src/main/ets/modules/chatroom/model/PLVChatImgEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVChatImgEvent.js +15 -12
- package/src/main/ets/modules/chatroom/model/PLVChatQuoteDataBean.js +4 -4
- package/src/main/ets/modules/chatroom/model/PLVEmotionEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVEmotionEvent.js +16 -13
- package/src/main/ets/modules/chatroom/model/PLVEmotionImagesVO.js +4 -4
- package/src/main/ets/modules/chatroom/model/PLVHistoryChatImgEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVHistoryChatImgEvent.js +15 -12
- package/src/main/ets/modules/chatroom/model/PLVHistoryFileShareEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVHistoryFileShareEvent.js +15 -12
- package/src/main/ets/modules/chatroom/model/PLVHistorySpeakEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVHistorySpeakEvent.js +16 -13
- package/src/main/ets/modules/chatroom/model/PLVHistroyQuizListVO.js +3 -3
- package/src/main/ets/modules/chatroom/model/PLVImageBean.d.ets +3 -3
- package/src/main/ets/modules/chatroom/model/PLVImageBean.js +31 -31
- package/src/main/ets/modules/chatroom/model/PLVLikesEvent.js +4 -4
- package/src/main/ets/modules/chatroom/model/PLVLocalQuizEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVLocalQuizEvent.js +7 -4
- package/src/main/ets/modules/chatroom/model/PLVLocalSpeakEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVLocalSpeakEvent.js +14 -11
- package/src/main/ets/modules/chatroom/model/PLVNotSupportEvent.d.ets +6 -0
- package/src/main/ets/modules/chatroom/model/PLVNotSupportEvent.js +3 -0
- package/src/main/ets/modules/chatroom/model/PLVPPTShareFileDataBean.js +4 -4
- package/src/main/ets/modules/chatroom/model/PLVRewardEvent.d.ets +4 -1
- package/src/main/ets/modules/chatroom/model/PLVRewardEvent.js +7 -4
- package/src/main/ets/modules/chatroom/model/PLVSpeakEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVSpeakEvent.js +18 -15
- package/src/main/ets/modules/chatroom/model/PLVTAnswerEvent.d.ets +3 -1
- package/src/main/ets/modules/chatroom/model/PLVTAnswerEvent.js +10 -7
- package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.d.ets +2 -2
- package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.js +108 -108
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.d.ets +1 -1
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.js +11 -11
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackOpenHelper.d.ets +4 -4
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackOpenHelper.js +18 -18
- package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackToTopVO.js +29 -29
- package/src/main/ets/modules/i18n/PLVI18NDataMapper.d.ets +4 -2
- package/src/main/ets/modules/i18n/PLVI18NDataMapper.js +35 -8
- package/src/main/ets/modules/i18n/PLVLanguageManager.js +5 -5
- package/src/main/ets/modules/interact/PLVInteractManager.d.ets +12 -4
- package/src/main/ets/modules/interact/PLVInteractManager.js +14 -8
- package/src/main/ets/modules/interact/PLVInteractWeb.d.ets +15 -8
- package/src/main/ets/modules/interact/PLVInteractWeb.js +129 -74
- package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.d.ets +1 -1
- package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.js +16 -16
- package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.d.ets +1 -1
- package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.js +2 -2
- package/src/main/ets/modules/interact/model/PLVInteractBean.d.ets +2 -0
- package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.d.ets +2 -2
- package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.js +16 -16
- package/src/main/ets/modules/interact/pushcard/repo/PLVCardLookTimeLocalRepository.d.ets +5 -0
- package/src/main/ets/modules/interact/pushcard/repo/PLVCardLookTimeLocalRepository.js +13 -0
- package/src/main/ets/modules/interact/redpack/model/PLVHistoryRedPaperEvent.d.ets +3 -1
- package/src/main/ets/modules/interact/redpack/model/PLVHistoryRedPaperEvent.js +7 -4
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperEvent.d.ets +3 -1
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperEvent.js +7 -4
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperResultEvent.d.ets +3 -1
- package/src/main/ets/modules/interact/redpack/model/PLVRedPaperResultEvent.js +11 -1
- package/src/main/ets/modules/linkmic/PLVLinkMicManager.d.ets +12 -12
- package/src/main/ets/modules/linkmic/PLVLinkMicManager.js +33 -33
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.d.ets +2 -2
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.js +10 -10
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.d.ets +6 -6
- package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.js +29 -29
- package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.d.ets +5 -5
- package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.js +52 -52
- package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.d.ets +4 -4
- package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.js +32 -32
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRate.js +7 -22
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.js +6 -6
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.d.ets +1 -1
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.js +2 -2
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicMode.js +3 -3
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicPushResolutionRatio.js +4 -20
- package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCType.js +2 -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 +13 -13
- package/src/main/ets/modules/linkmic/viewmodel/PLVLinkMicViewModel.js +34 -34
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.d.ets +5 -5
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.js +13 -13
- 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 +4 -4
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleRTCUseCase.js +13 -13
- 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 +5 -5
- package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicUpdateChannelViewerUseCase.js +128 -128
- 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 +5 -5
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestEncodeParamUseCase.js +79 -79
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.d.ets +4 -4
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.js +26 -26
- 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 +141 -141
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.d.ets +5 -5
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.js +79 -79
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.d.ets +4 -4
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.js +22 -22
- 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 +111 -111
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.d.ets +5 -5
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.js +12 -12
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.d.ets +4 -4
- package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.js +31 -31
- 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 +108 -108
- package/src/main/ets/modules/log/elog/PLVELogSender.d.ets +4 -4
- package/src/main/ets/modules/log/elog/PLVELogSender.js +11 -11
- package/src/main/ets/modules/log/elog/model/PLVELogDataBean.d.ets +1 -1
- package/src/main/ets/modules/log/elog/model/PLVELogDataBean.js +9 -9
- package/src/main/ets/modules/log/elog/model/PLVELogModuleConstants.js +8 -8
- package/src/main/ets/modules/login/PLVSceneLoginManager.d.ets +2 -2
- package/src/main/ets/modules/login/PLVSceneLoginManager.js +71 -71
- package/src/main/ets/modules/login/model/PLVChatDomainVO.d.ets +3 -2
- package/src/main/ets/modules/login/model/PLVChatDomainVO.js +7 -4
- package/src/main/ets/modules/login/model/PLVLiveChannelType.js +9 -9
- package/src/main/ets/modules/login/model/PLVLiveDetailVO.d.ets +7 -1
- package/src/main/ets/modules/login/model/PLVLiveDetailVO.js +26 -10
- package/src/main/ets/modules/login/model/PLVLiveStatus.js +9 -9
- package/src/main/ets/modules/login/model/PLVLiveStatusVO.js +6 -6
- 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 +6 -1
- package/src/main/ets/modules/login/model/PLVLoginType.js +27 -6
- 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/mediator/PLVMemberMediator.d.ets +2 -2
- package/src/main/ets/modules/member/mediator/PLVMemberMediator.js +6 -6
- 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 +7 -7
- 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/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 +8 -8
- package/src/main/ets/modules/member/viewmodel/usecase/MemberUpdateViewerUseCase.js +19 -19
- 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 +60 -60
- package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.d.ets +8 -8
- package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.js +207 -207
- 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 +131 -131
- package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.d.ets +8 -8
- package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.js +207 -207
- package/src/main/ets/modules/net/PLVApiChatPlvNetApi.d.ets +11 -8
- package/src/main/ets/modules/net/PLVApiChatPlvNetApi.js +47 -27
- package/src/main/ets/modules/net/PLVApiPlvNetApi.d.ets +30 -28
- package/src/main/ets/modules/net/PLVApiPlvNetApi.js +117 -100
- package/src/main/ets/modules/net/PLVELogPlvNetApi.d.ets +2 -2
- package/src/main/ets/modules/net/PLVELogPlvNetApi.js +4 -4
- package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.d.ets +3 -3
- package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.js +7 -7
- 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 -1
- package/src/main/ets/modules/player/PLVPlayerManager.js +26 -20
- package/src/main/ets/modules/player/PLVPlayerMediator.d.ets +8 -1
- package/src/main/ets/modules/player/PLVPlayerMediator.js +32 -2
- package/src/main/ets/modules/player/playback/PLVChapterDataVO.d.ets +10 -0
- package/src/main/ets/modules/player/playback/PLVChapterDataVO.js +2 -0
- package/src/main/ets/modules/player/playback/PLVPlaybackListType.js +4 -4
- package/src/main/ets/modules/player/playback/PLVPreviousListVO.d.ets +48 -0
- package/src/main/ets/modules/player/playback/PLVPreviousListVO.js +21 -0
- package/src/main/ets/modules/player/playback/PLVPreviousManager.d.ets +73 -0
- package/src/main/ets/modules/player/playback/PLVPreviousManager.js +164 -0
- package/src/main/ets/modules/ppt/PLVPPTWeb.d.ets +15 -0
- package/src/main/ets/modules/ppt/PLVPPTWeb.js +97 -0
- package/src/main/ets/modules/ppt/PLVPPTWebController.d.ets +29 -0
- package/src/main/ets/modules/ppt/PLVPPTWebController.js +220 -0
- package/src/main/ets/modules/ppt/model/PLVPPTSocketEvent.d.ets +5 -0
- package/src/main/ets/modules/ppt/model/PLVPPTSocketEvent.js +7 -0
- package/src/main/ets/modules/ppt/model/PLVPPTStatus.d.ets +17 -0
- package/src/main/ets/modules/ppt/model/PLVPPTStatus.js +2 -0
- package/src/main/ets/modules/product/PLVProductManager.d.ets +5 -5
- package/src/main/ets/modules/product/PLVProductManager.js +54 -45
- package/src/main/ets/modules/product/components/PLVProductControlWeb.d.ets +5 -2
- package/src/main/ets/modules/product/components/PLVProductControlWeb.js +61 -29
- package/src/main/ets/modules/product/components/PLVProductWeb.d.ets +5 -2
- package/src/main/ets/modules/product/components/PLVProductWeb.js +64 -34
- package/src/main/ets/modules/product/model/PLVProductContentBean.d.ets +4 -0
- package/src/main/ets/modules/product/model/PLVProductContentBean.js +11 -7
- package/src/main/ets/modules/product/model/PLVProductControlEvent.js +8 -8
- package/src/main/ets/modules/product/model/PLVProductDataBean.d.ets +1 -1
- package/src/main/ets/modules/product/model/PLVProductDataBean.js +13 -13
- package/src/main/ets/modules/product/model/PLVProductEvent.d.ets +1 -0
- package/src/main/ets/modules/product/model/PLVProductEvent.js +12 -9
- package/src/main/ets/modules/redpack/PLVRedpackManager.d.ets +9 -9
- package/src/main/ets/modules/redpack/PLVRedpackManager.js +61 -61
- package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.d.ets +1 -1
- package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.js +10 -10
- package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.d.ets +3 -3
- package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.js +18 -18
- package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.d.ets +3 -3
- package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.js +4 -4
- package/src/main/ets/modules/reward/PLVRewardManager.d.ets +2 -2
- package/src/main/ets/modules/reward/PLVRewardManager.js +18 -18
- package/src/main/ets/modules/reward/model/PLVRewardSettingVO.js +8 -8
- package/src/main/ets/modules/socket/PLVSocketManager.d.ets +13 -7
- package/src/main/ets/modules/socket/PLVSocketManager.js +73 -68
- package/src/main/ets/modules/socket/PLVSocketMediator.d.ets +7 -5
- package/src/main/ets/modules/socket/PLVSocketMediator.js +16 -10
- package/src/main/ets/modules/socket/model/PLVOnSliceIDEvent.d.ets +4 -2
- package/src/main/ets/modules/socket/model/PLVSocketEventConstants.d.ets +8 -0
- package/src/main/ets/modules/socket/model/PLVSocketEventConstants.js +10 -1
- package/src/main/ets/modules/socket/model/PLVSocketUserBean.d.ets +3 -3
- package/src/main/ets/modules/socket/model/PLVSocketUserBean.js +12 -12
- package/src/main/ets/modules/socket/model/PLVUserType.js +15 -15
- package/src/main/ets/modules/socket/model/interact/PLVCallAppEvent.js +5 -5
- package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.d.ets +3 -3
- package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.js +13 -13
- package/src/main/ets/modules/streamer/PLVStreamerManager.d.ets +5 -5
- package/src/main/ets/modules/streamer/PLVStreamerManager.js +18 -18
- package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.d.ets +1 -1
- package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.js +2 -2
- package/src/main/ets/modules/streamer/model/PLVStreamerRepo.d.ets +3 -3
- package/src/main/ets/modules/streamer/model/PLVStreamerRepo.js +30 -30
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.d.ets +2 -2
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.js +8 -8
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.d.ets +7 -7
- package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.js +32 -32
- 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 +5 -5
- package/src/main/ets/modules/streamer/viewmodel/PLVStreamerViewModel.js +14 -14
- 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 +1 -1
- package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerHandleStateUseCase.js +6 -6
- 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 +1 -1
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestHandleStateUseCase.js +27 -27
- 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 +1 -1
- package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherHandleStateUseCase.js +14 -14
- 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 +41 -41
- package/src/main/ets/modules/web/PLVSocketWebController.d.ets +3 -2
- package/src/main/ets/modules/web/PLVSocketWebController.js +28 -16
- package/src/main/ets/modules/web/PLVWebControllerManager.d.ets +10 -2
- package/src/main/ets/modules/web/PLVWebControllerManager.js +10 -5
- package/src/main/ets/modules/web/PLVWebParams.d.ets +2 -1
- package/src/main/ets/modules/web/PLVWebParams.js +21 -20
- package/src/main/ets/modules/web/qa/PLVQAWeb.d.ets +16 -0
- package/src/main/ets/modules/web/qa/PLVQAWeb.js +120 -0
- package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.d.ets +17 -0
- package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.js +129 -0
- package/src/main/module.json +1 -28
- package/src/main/resources/base/element/string.json +80 -0
- package/src/main/resources/en_US/element/string.json +80 -0
- package/src/main/resources/zh_CN/element/string.json +80 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { PLVEventNotify, PLVJSONUtils, PLVLogger, PLVWebController } from '@polyvharmony/live-scenes-foundation';
|
|
2
|
+
import { PLVSocketMessageEvent, PLVSocketOnEvent, PLVSocketTransmitEvent } from '../socket/model/PLVSocketEventConstants';
|
|
3
|
+
import HashMap from "@ohos.util.HashMap";
|
|
4
|
+
import { toWebParams } from '../web/PLVWebParams';
|
|
5
|
+
import { PLVLoginType } from '../login/model/PLVLoginType';
|
|
6
|
+
import { PLVOnSliceIDEvent } from '../socket/model/PLVOnSliceIDEvent';
|
|
7
|
+
import { PLVPPTOnSliceStartEvent } from './model/PLVPPTSocketEvent';
|
|
8
|
+
import { PLVPPTStatus } from './model/PLVPPTStatus';
|
|
9
|
+
import { MutableObserver, PLVMediaPlayerState, watchStates } from '@polyvharmony/media-player-sdk';
|
|
10
|
+
const TAG = '[PLVPPTWebController]';
|
|
11
|
+
const V2_GET_NATIVE_APP_PARAMS_INFO = 'getNativeAppParamsInfo';
|
|
12
|
+
const EVENT_REFRESH_PPT = 'refreshPPT';
|
|
13
|
+
const EVENT_CHANGE_PPT = 'changePPT';
|
|
14
|
+
const EVENT_SET_SEI_DATA = 'setSeiData';
|
|
15
|
+
const EVENT_CHANGE_PPT_PAGE = 'changePPTPage';
|
|
16
|
+
const EVENT_SEND_SOCKET = 'sendSocketEvent';
|
|
17
|
+
const EVENT_PPT_STATUS_CHANGE = 'pptStatusChange';
|
|
18
|
+
const EVENT_VIDEO_DURATION = 'videoDuration';
|
|
19
|
+
const EVENT_CHANGE_PPT_POSITION = 'changePPTPosition';
|
|
20
|
+
const EVENT_VIDEO_START = 'videoStart';
|
|
21
|
+
const EVENT_PPT_PLAY = 'pptPlay';
|
|
22
|
+
const EVENT_PPT_PAUSE = 'pptPause';
|
|
23
|
+
const EVENT_PPT_SEEK = 'pptSeek';
|
|
24
|
+
const EVENT_PPT_PREPARE = 'pptPrepare';
|
|
25
|
+
export class PLVPPTWebController extends PLVWebController {
|
|
26
|
+
constructor(r148, s148, t148, webTag) {
|
|
27
|
+
super(webTag);
|
|
28
|
+
this.delayTime = 5000;
|
|
29
|
+
this.eventNotify = new PLVEventNotify(this);
|
|
30
|
+
this.observers = [];
|
|
31
|
+
this.channelData = r148;
|
|
32
|
+
this.socketMediator = s148;
|
|
33
|
+
this.playerMediator = t148;
|
|
34
|
+
this.callbacks = new HashMap();
|
|
35
|
+
this.init();
|
|
36
|
+
}
|
|
37
|
+
updateDelayTime(q148) {
|
|
38
|
+
this.delayTime = q148 ? 500 : 5000;
|
|
39
|
+
}
|
|
40
|
+
setSEIData(p148) {
|
|
41
|
+
const data = "{\"time\":" + p148 + "}";
|
|
42
|
+
this.callHandle(EVENT_SET_SEI_DATA, data, () => {
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
changePPTPage(type) {
|
|
46
|
+
const data = "{\"type\":\"" + type + "\"}";
|
|
47
|
+
PLVLogger.info(TAG, 'changePPTPage, data=' + data);
|
|
48
|
+
this.callHandle(EVENT_CHANGE_PPT_PAGE, data, () => {
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
videoStart(n148, o148) {
|
|
52
|
+
const data = PLVJSONUtils.safeStringify({
|
|
53
|
+
"type": n148 ?? this.playerMediator.pptPlayType,
|
|
54
|
+
"roomId": this.channelData.loginChannelId,
|
|
55
|
+
"id": o148 ?? this.playerMediator.pptPlayId
|
|
56
|
+
});
|
|
57
|
+
this.callHandle(EVENT_VIDEO_START, data, () => {
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
pptPlay() {
|
|
61
|
+
const data = "{\"time\":" + this.playerMediator.videoCurrentPosition + "}";
|
|
62
|
+
this.callHandle(EVENT_PPT_PLAY, data, () => {
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
pptPause() {
|
|
66
|
+
const data = "{\"time\":" + this.playerMediator.videoCurrentPosition + "}";
|
|
67
|
+
this.callHandle(EVENT_PPT_PAUSE, data, () => {
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
pptSeek(m148) {
|
|
71
|
+
const data = "{\"time\":" + m148 + "}";
|
|
72
|
+
this.callHandle(EVENT_PPT_SEEK, data, () => {
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
destroy() {
|
|
76
|
+
this.eventNotify.clear();
|
|
77
|
+
MutableObserver.disposeAll(this.observers);
|
|
78
|
+
this.callbacks.forEach((value, key) => {
|
|
79
|
+
if (key && value) {
|
|
80
|
+
this.socketMediator.offData(key, value, this);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
init() {
|
|
85
|
+
this.onPlayerData();
|
|
86
|
+
this.addOnControllerAttached(() => {
|
|
87
|
+
this.userAgent(this.channelData.ua() + this.getUserAgent());
|
|
88
|
+
this.onSocketDataAfterAttached();
|
|
89
|
+
this.registerLiveHandlerIfNeed();
|
|
90
|
+
this.registerPlaybackHandlerIfNeed();
|
|
91
|
+
})
|
|
92
|
+
.registerHandler(V2_GET_NATIVE_APP_PARAMS_INFO, async (data, callback) => {
|
|
93
|
+
const params = await toWebParams(this.channelData);
|
|
94
|
+
callback(params);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
onPlayerData() {
|
|
98
|
+
if (PLVLoginType.PLAYBACK === this.channelData.loginType) {
|
|
99
|
+
this.playerMediator.seekStartEvent.observe((l148) => {
|
|
100
|
+
if (l148) {
|
|
101
|
+
PLVLogger.info(TAG, 'send ppt message: seekStartEvent=' + l148 + ', seekTo=' + l148.seekTo);
|
|
102
|
+
this.pptSeek(this.playerMediator.videoCurrentPosition);
|
|
103
|
+
}
|
|
104
|
+
}).pushTo(this.observers);
|
|
105
|
+
watchStates(() => {
|
|
106
|
+
const k148 = this.playerMediator.playerState.value;
|
|
107
|
+
PLVLogger.info(TAG, 'send ppt message: playerState=' + k148 + ", pptPlayType=" + this.playerMediator.pptPlayType + ", pptPlayId=" + this.playerMediator.pptPlayId);
|
|
108
|
+
switch (k148) {
|
|
109
|
+
case PLVMediaPlayerState.STATE_PREPARING:
|
|
110
|
+
this.videoStart(this.playerMediator.pptPlayType, this.playerMediator.pptPlayId);
|
|
111
|
+
break;
|
|
112
|
+
case PLVMediaPlayerState.STATE_PLAYING:
|
|
113
|
+
this.pptPlay();
|
|
114
|
+
break;
|
|
115
|
+
case PLVMediaPlayerState.STATE_PAUSED:
|
|
116
|
+
this.pptPause();
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}).pushTo(this.observers);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
onSocketDataAfterAttached() {
|
|
123
|
+
if (PLVLoginType.PLAYBACK === this.channelData.loginType) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const c148 = (data, event) => {
|
|
127
|
+
const e148 = PLVSocketMessageEvent.ON_SLICE_ID === event
|
|
128
|
+
|| PLVSocketMessageEvent.ON_SLICE_START === event
|
|
129
|
+
|| PLVSocketMessageEvent.ON_SLICE_OPEN === event
|
|
130
|
+
|| PLVSocketMessageEvent.ON_SLICE_DRAW === event
|
|
131
|
+
|| PLVSocketMessageEvent.ON_SLICE_CONTROL === event;
|
|
132
|
+
if (e148) {
|
|
133
|
+
if (this.delayTime > 0) {
|
|
134
|
+
const j148 = data.lastIndexOf('}');
|
|
135
|
+
data = data.substring(0, j148) + `,"delayTime":${this.delayTime}}`;
|
|
136
|
+
}
|
|
137
|
+
PLVLogger.info(TAG, 'receive ppt message: delay=' + data);
|
|
138
|
+
this.callHandle(EVENT_REFRESH_PPT, data, (result) => {
|
|
139
|
+
PLVLogger.info(TAG, 'send ppt message: result=' + result);
|
|
140
|
+
});
|
|
141
|
+
if (PLVSocketMessageEvent.ON_SLICE_ID === event) {
|
|
142
|
+
const h148 = PLVJSONUtils.json2Bean(PLVOnSliceIDEvent, data);
|
|
143
|
+
if (!h148 || !h148.inClass) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const i148 = this.channelData.liveDetail?.isFollowTeacherWatchLayout()
|
|
147
|
+
? h148.pptAndVedioPosition === 0
|
|
148
|
+
: (this.channelData.liveDetail?.isPPTWatchLayout() ? true : false);
|
|
149
|
+
this.eventNotify.emit('switchPPTLocation', i148);
|
|
150
|
+
}
|
|
151
|
+
else if (PLVSocketMessageEvent.ON_SLICE_START === event) {
|
|
152
|
+
const f148 = PLVJSONUtils.json2Bean(PLVPPTOnSliceStartEvent, data);
|
|
153
|
+
if (f148) {
|
|
154
|
+
const g148 = this.channelData.liveDetail?.isFollowTeacherWatchLayout()
|
|
155
|
+
? f148.isPptOnMainScreen()
|
|
156
|
+
: (this.channelData.liveDetail?.isPPTWatchLayout() ? true : false);
|
|
157
|
+
this.eventNotify.emit('switchPPTLocation', g148);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else if (PLVSocketMessageEvent.CHANGE_VIDEO_AND_PPT_POSITION === event) {
|
|
162
|
+
const jsonObject = PLVJSONUtils.safeParse(data);
|
|
163
|
+
if (jsonObject) {
|
|
164
|
+
this.eventNotify.emit('switchPPTLocation', '1' != jsonObject['status']);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
const d148 = (data, event) => {
|
|
169
|
+
if (PLVSocketTransmitEvent.CHANGE_DOUBLE_MODE === event) {
|
|
170
|
+
const jsonObject = PLVJSONUtils.safeParse(data);
|
|
171
|
+
if (jsonObject && jsonObject['autoId'] !== undefined && jsonObject['pageId'] !== undefined) {
|
|
172
|
+
const sendData = PLVJSONUtils.safeStringify({
|
|
173
|
+
'autoId': jsonObject['autoId'],
|
|
174
|
+
'pageId': jsonObject['pageId'],
|
|
175
|
+
'docType': 1,
|
|
176
|
+
'isCamClosed': 0
|
|
177
|
+
});
|
|
178
|
+
this.callHandle(EVENT_CHANGE_PPT, sendData, () => {
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
this.socketMediator.onData(PLVSocketOnEvent.MESSAGE, c148, this);
|
|
184
|
+
this.socketMediator.onData(PLVSocketOnEvent.TRANSMIT, d148, this);
|
|
185
|
+
this.callbacks.set(PLVSocketOnEvent.MESSAGE, c148);
|
|
186
|
+
this.callbacks.set(PLVSocketOnEvent.TRANSMIT, d148);
|
|
187
|
+
}
|
|
188
|
+
registerLiveHandlerIfNeed() {
|
|
189
|
+
if (PLVLoginType.LIVE !== this.channelData.loginType) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
this.registerHandler(EVENT_SEND_SOCKET, (data, callback) => {
|
|
193
|
+
PLVLogger.info(TAG, 'send socket message: ' + data);
|
|
194
|
+
this.socketMediator.emit(PLVSocketOnEvent.MESSAGE, data);
|
|
195
|
+
});
|
|
196
|
+
this.registerHandler(EVENT_PPT_STATUS_CHANGE, (data, callback) => {
|
|
197
|
+
PLVLogger.info(TAG, 'receive ppt status change: ' + data);
|
|
198
|
+
const b148 = PLVJSONUtils.json2Bean(PLVPPTStatus, data);
|
|
199
|
+
if (b148 && b148.maxTeacherOp) {
|
|
200
|
+
this.eventNotify.emit('onPPTStatusChange', b148);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
registerPlaybackHandlerIfNeed() {
|
|
205
|
+
if (PLVLoginType.PLAYBACK !== this.channelData.loginType) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
this.registerHandler(EVENT_PPT_PREPARE, (data, callback) => {
|
|
209
|
+
PLVLogger.info(TAG, 'receive ppt prepare: ' + data);
|
|
210
|
+
callback('function is success');
|
|
211
|
+
});
|
|
212
|
+
this.registerHandler(EVENT_VIDEO_DURATION, (data, callback) => {
|
|
213
|
+
const sendData = "{\"time\":" + this.playerMediator.videoCurrentPosition + "}";
|
|
214
|
+
callback(sendData);
|
|
215
|
+
});
|
|
216
|
+
this.registerHandler(EVENT_CHANGE_PPT_POSITION, (data, callback) => {
|
|
217
|
+
this.eventNotify.emit('switchPPTLocation', 'true' === data);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PLVSocketMessageEvent } from "../../socket/model/PLVSocketEventConstants";
|
|
2
|
+
export class PLVPPTOnSliceStartEvent {
|
|
3
|
+
isPptOnMainScreen() {
|
|
4
|
+
return this.videoAndPPTPosition === 'ppt';
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
PLVPPTOnSliceStartEvent.EVENT = PLVSocketMessageEvent.ON_SLICE_START;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class PLVPPTStatus {
|
|
2
|
+
autoId?: number;
|
|
3
|
+
pageId?: number;
|
|
4
|
+
step?: number;
|
|
5
|
+
total?: number;
|
|
6
|
+
slideEvent?: string;
|
|
7
|
+
roomId?: string;
|
|
8
|
+
userId?: string;
|
|
9
|
+
isAnimation?: boolean;
|
|
10
|
+
docType?: string;
|
|
11
|
+
maxTeacherOp?: MaxTeacherOp;
|
|
12
|
+
}
|
|
13
|
+
export interface MaxTeacherOp {
|
|
14
|
+
pageId?: number;
|
|
15
|
+
autoId?: number;
|
|
16
|
+
step?: number;
|
|
17
|
+
}
|
|
@@ -19,27 +19,27 @@ export declare class PLVProductManager extends PLVBaseModule {
|
|
|
19
19
|
* 事件通知
|
|
20
20
|
*/
|
|
21
21
|
eventNotify: IPLVEventNotify<EventType>;
|
|
22
|
-
constructor(
|
|
22
|
+
constructor(r149: PLVChannelData, s149: PLVSocketMediator);
|
|
23
23
|
/**
|
|
24
24
|
* 通知是否有商品推送
|
|
25
25
|
* @param pushContentBean 不为undefined即为有商品推送
|
|
26
26
|
*/
|
|
27
|
-
notifyPush(
|
|
27
|
+
notifyPush(q149?: PLVProductContentBean): void;
|
|
28
28
|
/**
|
|
29
29
|
* 通知商品库开关
|
|
30
30
|
* @param isOpen
|
|
31
31
|
*/
|
|
32
|
-
notifyOpen(
|
|
32
|
+
notifyOpen(isOpen: boolean): void;
|
|
33
33
|
/**
|
|
34
34
|
* 通知商品推送的点击次数
|
|
35
35
|
* @param clickTimes
|
|
36
36
|
*/
|
|
37
|
-
notifyClickTimes(
|
|
37
|
+
notifyClickTimes(p149: number): void;
|
|
38
38
|
/**
|
|
39
39
|
* 通知商品推送被移动
|
|
40
40
|
* @param showId
|
|
41
41
|
*/
|
|
42
|
-
notifyMove(
|
|
42
|
+
notifyMove(o149?: number): void;
|
|
43
43
|
/**
|
|
44
44
|
* 通知商品推送被点击
|
|
45
45
|
*/
|
|
@@ -11,34 +11,34 @@ import { PLVProductMoveEvent } from './model/PLVProductMoveEvent';
|
|
|
11
11
|
import { PLVProductRemoveEvent } from './model/PLVProductRemoveEvent';
|
|
12
12
|
const TAG = '[PLVProductManager]';
|
|
13
13
|
export class PLVProductManager extends PLVBaseModule {
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
14
|
+
constructor(r149, s149) {
|
|
15
|
+
super(r149);
|
|
16
16
|
this.productDataBean = new PLVProductDataBean();
|
|
17
17
|
this.eventNotify = new PLVEventNotify(this);
|
|
18
|
-
this.socketMediator =
|
|
18
|
+
this.socketMediator = s149;
|
|
19
19
|
this.init();
|
|
20
20
|
}
|
|
21
|
-
notifyPush(
|
|
22
|
-
if (
|
|
21
|
+
notifyPush(q149) {
|
|
22
|
+
if (q149?.productId != this.productDataBean.pushContentBean?.productId) {
|
|
23
23
|
this.productDataBean.hotEffectClickTimes = 0;
|
|
24
24
|
}
|
|
25
|
-
this.productDataBean.hotEffectTips = this.getHotEffectTips(
|
|
26
|
-
this.productDataBean.pushContentBean =
|
|
25
|
+
this.productDataBean.hotEffectTips = this.getHotEffectTips(q149);
|
|
26
|
+
this.productDataBean.pushContentBean = q149;
|
|
27
27
|
this.eventNotify.emit('product_data', this.productDataBean.copy());
|
|
28
28
|
}
|
|
29
|
-
notifyOpen(
|
|
29
|
+
notifyOpen(isOpen) {
|
|
30
30
|
this.productDataBean.hotEffectClickTimes = 0;
|
|
31
31
|
this.productDataBean.pushContentBean = undefined;
|
|
32
|
-
this.productDataBean.isOpenProduct =
|
|
32
|
+
this.productDataBean.isOpenProduct = isOpen;
|
|
33
33
|
this.eventNotify.emit('product_data', this.productDataBean.copy());
|
|
34
34
|
}
|
|
35
|
-
notifyClickTimes(
|
|
36
|
-
this.productDataBean.hotEffectClickTimes =
|
|
35
|
+
notifyClickTimes(p149) {
|
|
36
|
+
this.productDataBean.hotEffectClickTimes = p149;
|
|
37
37
|
this.eventNotify.emit('product_data', this.productDataBean.copy());
|
|
38
38
|
}
|
|
39
|
-
notifyMove(
|
|
39
|
+
notifyMove(o149) {
|
|
40
40
|
if (this.productDataBean.pushContentBean) {
|
|
41
|
-
this.productDataBean.pushContentBean.showId =
|
|
41
|
+
this.productDataBean.pushContentBean.showId = o149;
|
|
42
42
|
}
|
|
43
43
|
this.eventNotify.emit('product_data', this.productDataBean.copy());
|
|
44
44
|
}
|
|
@@ -47,15 +47,15 @@ export class PLVProductManager extends PLVBaseModule {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
PLVLogger.info(TAG, 'notifyClick');
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
const n149 = new PLVLocalProductClickEvent();
|
|
51
|
+
n149.data = {
|
|
52
52
|
type: this.productDataBean.pushContentBean.productType,
|
|
53
53
|
positionName: this.productDataBean.pushContentBean.name,
|
|
54
54
|
productId: this.productDataBean.pushContentBean.productId,
|
|
55
55
|
nickName: this.channelData.viewerName
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
const data = PLVJSONUtils.safeStringify(
|
|
57
|
+
n149.roomId = await this.channelData.loginRoomIdPromise.get();
|
|
58
|
+
const data = PLVJSONUtils.safeStringify(n149);
|
|
59
59
|
this.socketMediator.emit(PLVSocketOnEvent.PRODUCT, data, () => {
|
|
60
60
|
PLVLogger.info(TAG, 'notifyClick success');
|
|
61
61
|
});
|
|
@@ -84,34 +84,40 @@ export class PLVProductManager extends PLVBaseModule {
|
|
|
84
84
|
}, this);
|
|
85
85
|
}
|
|
86
86
|
handleProductEvent(data) {
|
|
87
|
-
const
|
|
88
|
-
if (!
|
|
87
|
+
const i149 = PLVJSONUtils.json2Bean(PLVProductEvent, data);
|
|
88
|
+
if (!i149) {
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
if (!
|
|
91
|
+
if (i149.isProductControlEvent()) {
|
|
92
|
+
const m149 = PLVJSONUtils.toFillData(PLVProductControlEvent, data);
|
|
93
|
+
if (!m149 || !m149.content) {
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
97
|
-
|
|
96
|
+
if (m149.isRedact() && this.productDataBean.pushContentBean?.productId === m149.content.productId) {
|
|
97
|
+
if (!m149.content.productPushRule) {
|
|
98
|
+
m149.content.productPushRule = this.productDataBean.pushContentBean?.productPushRule;
|
|
99
|
+
}
|
|
100
|
+
this.notifyPush(m149.content);
|
|
101
|
+
}
|
|
102
|
+
if (m149.isPush()) {
|
|
103
|
+
this.notifyPush(m149.content);
|
|
98
104
|
}
|
|
99
105
|
}
|
|
100
|
-
else if (
|
|
101
|
-
const
|
|
102
|
-
if (!
|
|
106
|
+
else if (i149.isProductRemoveEvent()) {
|
|
107
|
+
const l149 = PLVJSONUtils.json2Bean(PLVProductRemoveEvent, data);
|
|
108
|
+
if (!l149 || !l149.content || !this.productDataBean.pushContentBean) {
|
|
103
109
|
return;
|
|
104
110
|
}
|
|
105
|
-
if (this.productDataBean.pushContentBean.productId ===
|
|
111
|
+
if (this.productDataBean.pushContentBean.productId === l149.content.productId) {
|
|
106
112
|
this.notifyPush(undefined);
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
|
-
else if (
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
115
|
+
else if (i149.isProductMoveEvent()) {
|
|
116
|
+
const k149 = PLVJSONUtils.json2Bean(PLVProductMoveEvent, data);
|
|
117
|
+
if (!k149 || !k149.content) {
|
|
112
118
|
return;
|
|
113
119
|
}
|
|
114
|
-
|
|
120
|
+
k149.content.some((value) => {
|
|
115
121
|
if (this.productDataBean.pushContentBean?.productId === value.productId) {
|
|
116
122
|
this.notifyMove(value.showId);
|
|
117
123
|
return true;
|
|
@@ -119,34 +125,37 @@ export class PLVProductManager extends PLVBaseModule {
|
|
|
119
125
|
return false;
|
|
120
126
|
});
|
|
121
127
|
}
|
|
122
|
-
else if (
|
|
123
|
-
const
|
|
124
|
-
if (!
|
|
128
|
+
else if (i149.isProductMenuSwitchEvent()) {
|
|
129
|
+
const j149 = PLVJSONUtils.json2Bean(PLVProductMenuSwitchEvent, data);
|
|
130
|
+
if (!j149) {
|
|
125
131
|
return;
|
|
126
132
|
}
|
|
127
|
-
if (('Y' ===
|
|
133
|
+
if (('Y' === j149.content?.enabled) === this.productDataBean.isOpenProduct) {
|
|
128
134
|
return;
|
|
129
135
|
}
|
|
130
136
|
this.notifyOpen(!this.productDataBean.isOpenProduct);
|
|
131
137
|
}
|
|
138
|
+
else if (i149.isCancelPush()) {
|
|
139
|
+
this.notifyPush(undefined);
|
|
140
|
+
}
|
|
132
141
|
}
|
|
133
142
|
handleClickTimesEvent(data) {
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
137
|
-
this.notifyClickTimes(
|
|
143
|
+
const h149 = PLVJSONUtils.json2Bean(PLVProductClickTimesEvent, data);
|
|
144
|
+
if (h149 && h149.times) {
|
|
145
|
+
if (h149.productId === this.productDataBean.pushContentBean?.productId) {
|
|
146
|
+
this.notifyClickTimes(h149.times);
|
|
138
147
|
}
|
|
139
148
|
}
|
|
140
149
|
}
|
|
141
|
-
getHotEffectTips(
|
|
142
|
-
if (
|
|
143
|
-
if (
|
|
150
|
+
getHotEffectTips(g149) {
|
|
151
|
+
if (g149 && this.productHotEffectBean) {
|
|
152
|
+
if (g149.isNormalProduct()) {
|
|
144
153
|
return this.productHotEffectBean.normalProductTips;
|
|
145
154
|
}
|
|
146
|
-
else if (
|
|
155
|
+
else if (g149.isFinanceProduct()) {
|
|
147
156
|
return this.productHotEffectBean.financeProductTips;
|
|
148
157
|
}
|
|
149
|
-
else if (
|
|
158
|
+
else if (g149.isPositionProduct()) {
|
|
150
159
|
return this.productHotEffectBean.jobProductTips;
|
|
151
160
|
}
|
|
152
161
|
}
|
|
@@ -5,10 +5,13 @@ import { PLVInteractManager } from '../../interact/PLVInteractManager';
|
|
|
5
5
|
export declare struct PLVProductControlWeb {
|
|
6
6
|
controller: PLVSocketWebController;
|
|
7
7
|
interactManager: PLVInteractManager;
|
|
8
|
+
customUrl: string;
|
|
8
9
|
private url;
|
|
9
|
-
|
|
10
|
+
@State
|
|
11
|
+
prepared: boolean;
|
|
12
|
+
aboutToAppear(): Promise<void>;
|
|
10
13
|
build(): void;
|
|
11
|
-
config(): void
|
|
14
|
+
config(): Promise<void>;
|
|
12
15
|
initUrl(data?: PLVLanguage): void;
|
|
13
16
|
aboutToDisappear(): void;
|
|
14
17
|
}
|
|
@@ -2,12 +2,14 @@ if (!("finalizeConstruction" in ViewPU.prototype)) {
|
|
|
2
2
|
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => {
|
|
3
3
|
});
|
|
4
4
|
}
|
|
5
|
-
import { PLVSimpleWeb } from '@polyvharmony/live-scenes-foundation';
|
|
5
|
+
import { PLVNetUtils, PLVSimpleWeb } from '@polyvharmony/live-scenes-foundation';
|
|
6
6
|
import { PLVLanguage } from '../../i18n/PLVLanguageManager';
|
|
7
7
|
import { EVENT_TYPE_LANGUAGE } from '../../web/PLVSocketWebController';
|
|
8
8
|
import { lateInit } from '@polyvharmony/media-player-sdk';
|
|
9
9
|
const TAG = '[PLVProductControlWeb]';
|
|
10
10
|
const URL = 'https://websdk.videocc.net/interactions-launch-sdk-ui-webview/latest/product.html';
|
|
11
|
+
const LANG_EN = "en";
|
|
12
|
+
const LANG_ZH = "zh_CN";
|
|
11
13
|
export class PLVProductControlWeb extends ViewPU {
|
|
12
14
|
constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) {
|
|
13
15
|
super(parent, __localStorage, elmtId, extraInfo);
|
|
@@ -16,7 +18,9 @@ export class PLVProductControlWeb extends ViewPU {
|
|
|
16
18
|
}
|
|
17
19
|
this.controller = lateInit();
|
|
18
20
|
this.interactManager = lateInit();
|
|
21
|
+
this.customUrl = URL;
|
|
19
22
|
this.url = URL;
|
|
23
|
+
this.__prepared = new ObservedPropertySimplePU(false, this, "prepared");
|
|
20
24
|
this.setInitiallyProvidedValue(params);
|
|
21
25
|
this.finalizeConstruction();
|
|
22
26
|
}
|
|
@@ -27,55 +31,83 @@ export class PLVProductControlWeb extends ViewPU {
|
|
|
27
31
|
if (params.interactManager !== undefined) {
|
|
28
32
|
this.interactManager = params.interactManager;
|
|
29
33
|
}
|
|
34
|
+
if (params.customUrl !== undefined) {
|
|
35
|
+
this.customUrl = params.customUrl;
|
|
36
|
+
}
|
|
30
37
|
if (params.url !== undefined) {
|
|
31
38
|
this.url = params.url;
|
|
32
39
|
}
|
|
40
|
+
if (params.prepared !== undefined) {
|
|
41
|
+
this.prepared = params.prepared;
|
|
42
|
+
}
|
|
33
43
|
}
|
|
34
44
|
updateStateVars(params) {
|
|
35
45
|
}
|
|
36
46
|
purgeVariableDependenciesOnElmtId(rmElmtId) {
|
|
47
|
+
this.__prepared.purgeDependencyOnElmtId(rmElmtId);
|
|
37
48
|
}
|
|
38
49
|
aboutToBeDeleted() {
|
|
50
|
+
this.__prepared.aboutToBeDeleted();
|
|
39
51
|
SubscriberManager.Get().delete(this.id__());
|
|
40
52
|
this.aboutToBeDeletedInternal();
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
this.
|
|
54
|
+
get prepared() {
|
|
55
|
+
return this.__prepared.get();
|
|
56
|
+
}
|
|
57
|
+
set prepared(newValue) {
|
|
58
|
+
this.__prepared.set(newValue);
|
|
59
|
+
}
|
|
60
|
+
async aboutToAppear() {
|
|
61
|
+
await this.config();
|
|
62
|
+
this.prepared = true;
|
|
44
63
|
}
|
|
45
64
|
initialRender() {
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
|
66
|
+
If.create();
|
|
67
|
+
if (this.prepared) {
|
|
68
|
+
this.ifElseBranchUpdateFunction(0, () => {
|
|
69
|
+
{
|
|
70
|
+
this.observeComponentCreation2((elmtId, isInitialRender) => {
|
|
71
|
+
if (isInitialRender) {
|
|
72
|
+
let componentCall = new PLVSimpleWeb(this, {
|
|
73
|
+
controller: this.controller,
|
|
74
|
+
src: this.url
|
|
75
|
+
}, undefined, elmtId, () => {
|
|
76
|
+
}, { page: "sdk/src/main/ets/modules/product/components/PLVProductControlWeb.ets", line: 29, col: 7 });
|
|
77
|
+
ViewPU.create(componentCall);
|
|
78
|
+
let paramsLambda = () => {
|
|
79
|
+
return {
|
|
80
|
+
controller: this.controller,
|
|
81
|
+
src: this.url
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
componentCall.paramsGenerator_ = paramsLambda;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.updateStateVarsOfChildByElmtId(elmtId, {});
|
|
88
|
+
}
|
|
89
|
+
}, { name: "PLVSimpleWeb" });
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
this.ifElseBranchUpdateFunction(1, () => {
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}, If);
|
|
98
|
+
If.pop();
|
|
68
99
|
}
|
|
69
|
-
config() {
|
|
70
|
-
this.initUrl(this.controller?.channelData.
|
|
100
|
+
async config() {
|
|
101
|
+
this.initUrl(await this.controller?.channelData.languagePromise.get());
|
|
71
102
|
this.controller?.eventNotify.on(EVENT_TYPE_LANGUAGE, (data) => {
|
|
72
103
|
this.initUrl(data);
|
|
73
104
|
this.controller?.loadUrlCatch(this.url);
|
|
74
105
|
}, this);
|
|
75
106
|
}
|
|
76
107
|
initUrl(data) {
|
|
77
|
-
|
|
78
|
-
|
|
108
|
+
this.url = PLVNetUtils.appendParams(this.customUrl, {
|
|
109
|
+
'lang': data == PLVLanguage.EN ? LANG_EN : LANG_ZH
|
|
110
|
+
});
|
|
79
111
|
}
|
|
80
112
|
aboutToDisappear() {
|
|
81
113
|
this.controller?.destroy();
|
|
@@ -9,11 +9,14 @@ export declare struct PLVProductWeb {
|
|
|
9
9
|
controller: PLVSocketWebController | undefined;
|
|
10
10
|
@Link
|
|
11
11
|
interactManager: PLVInteractManager | undefined;
|
|
12
|
+
customUrl: string;
|
|
12
13
|
private url;
|
|
13
|
-
|
|
14
|
+
@State
|
|
15
|
+
prepared: boolean;
|
|
16
|
+
aboutToAppear(): Promise<void>;
|
|
14
17
|
aboutToDisappear(): void;
|
|
15
18
|
build(): void;
|
|
16
|
-
config(): void
|
|
19
|
+
config(): Promise<void>;
|
|
17
20
|
initUrl(data?: PLVLanguage): void;
|
|
18
21
|
open(): void;
|
|
19
22
|
}
|