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