@polyvharmony/live-scenes-sdk 1.2.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.
Files changed (473) hide show
  1. package/BuildProfile.d.ets +16 -0
  2. package/BuildProfile.js +10 -0
  3. package/CHANGELOG.md +21 -0
  4. package/Index.d.ets +121 -0
  5. package/Index.js +120 -0
  6. package/LICENSE +8 -0
  7. package/README.md +21 -0
  8. package/ResourceTable.txt +51 -0
  9. package/obfuscation.txt +6 -0
  10. package/oh-package.json5 +1 -0
  11. package/package.json +1 -0
  12. package/src/main/ets/common/PLVBaseModule.d.ets +20 -0
  13. package/src/main/ets/common/PLVBaseModule.js +5 -0
  14. package/src/main/ets/common/PLVChannelData.d.ets +206 -0
  15. package/src/main/ets/common/PLVChannelData.js +98 -0
  16. package/src/main/ets/common/PLVDataBaseModule.d.ets +5 -0
  17. package/src/main/ets/common/PLVDataBaseModule.js +9 -0
  18. package/src/main/ets/common/PLVLiveSceneSDK.d.ets +140 -0
  19. package/src/main/ets/common/PLVLiveSceneSDK.js +130 -0
  20. package/src/main/ets/modules/business/PLVBusinessApiManager.d.ets +28 -0
  21. package/src/main/ets/modules/business/PLVBusinessApiManager.js +51 -0
  22. package/src/main/ets/modules/business/model/PLVGetPageViewerVO.d.ets +4 -0
  23. package/src/main/ets/modules/business/model/PLVGetPageViewerVO.js +2 -0
  24. package/src/main/ets/modules/business/model/PLVLiveChannelSettingUpdateRequestVO.d.ets +6 -0
  25. package/src/main/ets/modules/business/model/PLVLiveChannelSettingUpdateRequestVO.js +4 -0
  26. package/src/main/ets/modules/business/model/PLVLiveViewLogVO.d.ets +21 -0
  27. package/src/main/ets/modules/business/model/PLVLiveViewLogVO.js +7 -0
  28. package/src/main/ets/modules/business/model/PLVReportPageViewerVO.d.ets +3 -0
  29. package/src/main/ets/modules/business/model/PLVReportPageViewerVO.js +8 -0
  30. package/src/main/ets/modules/chatroom/PLVChatroomManager.d.ets +219 -0
  31. package/src/main/ets/modules/chatroom/PLVChatroomManager.js +480 -0
  32. package/src/main/ets/modules/chatroom/handler/PLVChatroomBanIpMessageHandler.d.ets +5 -0
  33. package/src/main/ets/modules/chatroom/handler/PLVChatroomBanIpMessageHandler.js +18 -0
  34. package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.d.ets +15 -0
  35. package/src/main/ets/modules/chatroom/handler/PLVChatroomBaseHandler.js +15 -0
  36. package/src/main/ets/modules/chatroom/handler/PLVChatroomCancelTopHandler.d.ets +5 -0
  37. package/src/main/ets/modules/chatroom/handler/PLVChatroomCancelTopHandler.js +13 -0
  38. package/src/main/ets/modules/chatroom/handler/PLVChatroomCloseRoomMessageHandler.d.ets +5 -0
  39. package/src/main/ets/modules/chatroom/handler/PLVChatroomCloseRoomMessageHandler.js +15 -0
  40. package/src/main/ets/modules/chatroom/handler/PLVChatroomDataHandlerFactory.d.ets +5 -0
  41. package/src/main/ets/modules/chatroom/handler/PLVChatroomDataHandlerFactory.js +56 -0
  42. package/src/main/ets/modules/chatroom/handler/PLVChatroomFocusModeHandler.d.ets +5 -0
  43. package/src/main/ets/modules/chatroom/handler/PLVChatroomFocusModeHandler.js +13 -0
  44. package/src/main/ets/modules/chatroom/handler/PLVChatroomLikesMessageHandler.d.ets +5 -0
  45. package/src/main/ets/modules/chatroom/handler/PLVChatroomLikesMessageHandler.js +15 -0
  46. package/src/main/ets/modules/chatroom/handler/PLVChatroomLoginMessageHandler.d.ets +5 -0
  47. package/src/main/ets/modules/chatroom/handler/PLVChatroomLoginMessageHandler.js +29 -0
  48. package/src/main/ets/modules/chatroom/handler/PLVChatroomLogoutMessageHandler.d.ets +5 -0
  49. package/src/main/ets/modules/chatroom/handler/PLVChatroomLogoutMessageHandler.js +15 -0
  50. package/src/main/ets/modules/chatroom/handler/PLVChatroomOnSliceIdMessageHandler.d.ets +5 -0
  51. package/src/main/ets/modules/chatroom/handler/PLVChatroomOnSliceIdMessageHandler.js +21 -0
  52. package/src/main/ets/modules/chatroom/handler/PLVChatroomToTopHandler.d.ets +5 -0
  53. package/src/main/ets/modules/chatroom/handler/PLVChatroomToTopHandler.js +13 -0
  54. package/src/main/ets/modules/chatroom/handler/PLVChatroomUnShieldMessageHandler.d.ets +5 -0
  55. package/src/main/ets/modules/chatroom/handler/PLVChatroomUnShieldMessageHandler.js +18 -0
  56. package/src/main/ets/modules/chatroom/model/IPLVIdEvent.d.ets +31 -0
  57. package/src/main/ets/modules/chatroom/model/IPLVIdEvent.js +35 -0
  58. package/src/main/ets/modules/chatroom/model/PLVBanIpEvent.d.ets +11 -0
  59. package/src/main/ets/modules/chatroom/model/PLVBanIpEvent.js +4 -0
  60. package/src/main/ets/modules/chatroom/model/PLVBulletinEvent.d.ets +4 -0
  61. package/src/main/ets/modules/chatroom/model/PLVBulletinEvent.js +4 -0
  62. package/src/main/ets/modules/chatroom/model/PLVCancelTopEvent.d.ets +4 -0
  63. package/src/main/ets/modules/chatroom/model/PLVCancelTopEvent.js +4 -0
  64. package/src/main/ets/modules/chatroom/model/PLVChatImageUploadTokenVO.d.ets +11 -0
  65. package/src/main/ets/modules/chatroom/model/PLVChatImageUploadTokenVO.js +2 -0
  66. package/src/main/ets/modules/chatroom/model/PLVChatImgContentBean.d.ets +14 -0
  67. package/src/main/ets/modules/chatroom/model/PLVChatImgContentBean.js +26 -0
  68. package/src/main/ets/modules/chatroom/model/PLVChatImgEvent.d.ets +17 -0
  69. package/src/main/ets/modules/chatroom/model/PLVChatImgEvent.js +35 -0
  70. package/src/main/ets/modules/chatroom/model/PLVChatQuoteDataBean.d.ets +17 -0
  71. package/src/main/ets/modules/chatroom/model/PLVChatQuoteDataBean.js +44 -0
  72. package/src/main/ets/modules/chatroom/model/PLVCloseRoomEvent.d.ets +8 -0
  73. package/src/main/ets/modules/chatroom/model/PLVCloseRoomEvent.js +4 -0
  74. package/src/main/ets/modules/chatroom/model/PLVEmotionEvent.d.ets +15 -0
  75. package/src/main/ets/modules/chatroom/model/PLVEmotionEvent.js +41 -0
  76. package/src/main/ets/modules/chatroom/model/PLVEmotionImagesVO.d.ets +13 -0
  77. package/src/main/ets/modules/chatroom/model/PLVEmotionImagesVO.js +22 -0
  78. package/src/main/ets/modules/chatroom/model/PLVFocusModeEvent.d.ets +5 -0
  79. package/src/main/ets/modules/chatroom/model/PLVFocusModeEvent.js +7 -0
  80. package/src/main/ets/modules/chatroom/model/PLVGetFullMessageAckBean.d.ets +10 -0
  81. package/src/main/ets/modules/chatroom/model/PLVGetFullMessageAckBean.js +9 -0
  82. package/src/main/ets/modules/chatroom/model/PLVHistoryChatImgEvent.d.ets +15 -0
  83. package/src/main/ets/modules/chatroom/model/PLVHistoryChatImgEvent.js +33 -0
  84. package/src/main/ets/modules/chatroom/model/PLVHistoryFileShareEvent.d.ets +17 -0
  85. package/src/main/ets/modules/chatroom/model/PLVHistoryFileShareEvent.js +41 -0
  86. package/src/main/ets/modules/chatroom/model/PLVHistorySpeakEvent.d.ets +19 -0
  87. package/src/main/ets/modules/chatroom/model/PLVHistorySpeakEvent.js +46 -0
  88. package/src/main/ets/modules/chatroom/model/PLVHistroyQuizListVO.d.ets +9 -0
  89. package/src/main/ets/modules/chatroom/model/PLVHistroyQuizListVO.js +15 -0
  90. package/src/main/ets/modules/chatroom/model/PLVImageBean.d.ets +14 -0
  91. package/src/main/ets/modules/chatroom/model/PLVImageBean.js +61 -0
  92. package/src/main/ets/modules/chatroom/model/PLVLikesEvent.d.ets +10 -0
  93. package/src/main/ets/modules/chatroom/model/PLVLikesEvent.js +19 -0
  94. package/src/main/ets/modules/chatroom/model/PLVLocalQuizEvent.d.ets +10 -0
  95. package/src/main/ets/modules/chatroom/model/PLVLocalQuizEvent.js +23 -0
  96. package/src/main/ets/modules/chatroom/model/PLVLocalSpeakEvent.d.ets +16 -0
  97. package/src/main/ets/modules/chatroom/model/PLVLocalSpeakEvent.js +35 -0
  98. package/src/main/ets/modules/chatroom/model/PLVLoginEvent.d.ets +8 -0
  99. package/src/main/ets/modules/chatroom/model/PLVLoginEvent.js +5 -0
  100. package/src/main/ets/modules/chatroom/model/PLVLogoutEvent.d.ets +6 -0
  101. package/src/main/ets/modules/chatroom/model/PLVLogoutEvent.js +4 -0
  102. package/src/main/ets/modules/chatroom/model/PLVPPTShareFileDataBean.d.ets +6 -0
  103. package/src/main/ets/modules/chatroom/model/PLVPPTShareFileDataBean.js +16 -0
  104. package/src/main/ets/modules/chatroom/model/PLVRemoveBulletinEvent.d.ets +3 -0
  105. package/src/main/ets/modules/chatroom/model/PLVRemoveBulletinEvent.js +4 -0
  106. package/src/main/ets/modules/chatroom/model/PLVRemoveContentEvent.d.ets +5 -0
  107. package/src/main/ets/modules/chatroom/model/PLVRemoveContentEvent.js +4 -0
  108. package/src/main/ets/modules/chatroom/model/PLVRemoveHistoryEvent.d.ets +3 -0
  109. package/src/main/ets/modules/chatroom/model/PLVRemoveHistoryEvent.js +4 -0
  110. package/src/main/ets/modules/chatroom/model/PLVRewardEvent.d.ets +18 -0
  111. package/src/main/ets/modules/chatroom/model/PLVRewardEvent.js +38 -0
  112. package/src/main/ets/modules/chatroom/model/PLVSpeakEvent.d.ets +29 -0
  113. package/src/main/ets/modules/chatroom/model/PLVSpeakEvent.js +61 -0
  114. package/src/main/ets/modules/chatroom/model/PLVTAnswerEvent.d.ets +16 -0
  115. package/src/main/ets/modules/chatroom/model/PLVTAnswerEvent.js +38 -0
  116. package/src/main/ets/modules/chatroom/model/PLVToTopEvent.d.ets +10 -0
  117. package/src/main/ets/modules/chatroom/model/PLVToTopEvent.js +11 -0
  118. package/src/main/ets/modules/chatroom/model/PLVUnShieldEvent.d.ets +10 -0
  119. package/src/main/ets/modules/chatroom/model/PLVUnShieldEvent.js +4 -0
  120. package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.d.ets +66 -0
  121. package/src/main/ets/modules/chatroom/playback/PLVChatPlaybackManager.js +266 -0
  122. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.d.ets +32 -0
  123. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.js +127 -0
  124. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackOpenHelper.d.ets +19 -0
  125. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackOpenHelper.js +48 -0
  126. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackPartVO.d.ets +7 -0
  127. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackPartVO.js +2 -0
  128. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackToTopVO.d.ets +30 -0
  129. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackToTopVO.js +104 -0
  130. package/src/main/ets/modules/i18n/PLVI18NDataMapper.d.ets +11 -0
  131. package/src/main/ets/modules/i18n/PLVI18NDataMapper.js +53 -0
  132. package/src/main/ets/modules/i18n/PLVLanguageManager.d.ets +45 -0
  133. package/src/main/ets/modules/i18n/PLVLanguageManager.js +58 -0
  134. package/src/main/ets/modules/interact/PLVInteractManager.d.ets +59 -0
  135. package/src/main/ets/modules/interact/PLVInteractManager.js +39 -0
  136. package/src/main/ets/modules/interact/PLVInteractWeb.d.ets +46 -0
  137. package/src/main/ets/modules/interact/PLVInteractWeb.js +308 -0
  138. package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.d.ets +9 -0
  139. package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.js +55 -0
  140. package/src/main/ets/modules/interact/invitePoster/model/PLVInvitePosterSettingVO.d.ets +40 -0
  141. package/src/main/ets/modules/interact/invitePoster/model/PLVInvitePosterSettingVO.js +4 -0
  142. package/src/main/ets/modules/interact/lottery/PLVShowLotteryEvent.d.ets +3 -0
  143. package/src/main/ets/modules/interact/lottery/PLVShowLotteryEvent.js +5 -0
  144. package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.d.ets +9 -0
  145. package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.js +9 -0
  146. package/src/main/ets/modules/interact/model/PLVInteractBean.d.ets +17 -0
  147. package/src/main/ets/modules/interact/model/PLVInteractBean.js +9 -0
  148. package/src/main/ets/modules/interact/model/PLVWebviewUpdateAppStatusVO.d.ets +16 -0
  149. package/src/main/ets/modules/interact/model/PLVWebviewUpdateAppStatusVO.js +6 -0
  150. package/src/main/ets/modules/interact/model/info/PLVInteractInfo.d.ets +7 -0
  151. package/src/main/ets/modules/interact/model/info/PLVInteractInfo.js +4 -0
  152. package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.d.ets +28 -0
  153. package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.js +50 -0
  154. package/src/main/ets/modules/interact/pushcard/model/PLVCardPushVO.d.ets +16 -0
  155. package/src/main/ets/modules/interact/pushcard/model/PLVCardPushVO.js +11 -0
  156. package/src/main/ets/modules/interact/pushcard/model/PLVNewsPushEvent.d.ets +10 -0
  157. package/src/main/ets/modules/interact/pushcard/model/PLVNewsPushEvent.js +5 -0
  158. package/src/main/ets/modules/interact/pushcard/model/PLVShowPushCardEvent.d.ets +6 -0
  159. package/src/main/ets/modules/interact/pushcard/model/PLVShowPushCardEvent.js +9 -0
  160. package/src/main/ets/modules/interact/redpack/model/PLVDelayRedpackStatusVO.d.ets +12 -0
  161. package/src/main/ets/modules/interact/redpack/model/PLVDelayRedpackStatusVO.js +2 -0
  162. package/src/main/ets/modules/interact/redpack/model/PLVDelayRedpackVO.d.ets +4 -0
  163. package/src/main/ets/modules/interact/redpack/model/PLVDelayRedpackVO.js +5 -0
  164. package/src/main/ets/modules/interact/redpack/model/PLVHistoryRedPaperEvent.d.ets +8 -0
  165. package/src/main/ets/modules/interact/redpack/model/PLVHistoryRedPaperEvent.js +21 -0
  166. package/src/main/ets/modules/interact/redpack/model/PLVRedPaperEvent.d.ets +23 -0
  167. package/src/main/ets/modules/interact/redpack/model/PLVRedPaperEvent.js +51 -0
  168. package/src/main/ets/modules/interact/redpack/model/PLVRedPaperForDelayEvent.d.ets +12 -0
  169. package/src/main/ets/modules/interact/redpack/model/PLVRedPaperForDelayEvent.js +16 -0
  170. package/src/main/ets/modules/interact/redpack/model/PLVRedPaperResultEvent.d.ets +13 -0
  171. package/src/main/ets/modules/interact/redpack/model/PLVRedPaperResultEvent.js +19 -0
  172. package/src/main/ets/modules/linkmic/PLVLinkMicManager.d.ets +213 -0
  173. package/src/main/ets/modules/linkmic/PLVLinkMicManager.js +116 -0
  174. package/src/main/ets/modules/linkmic/di/PLVLinkMicModule.d.ets +2 -0
  175. package/src/main/ets/modules/linkmic/di/PLVLinkMicModule.js +25 -0
  176. package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.d.ets +73 -0
  177. package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.js +87 -0
  178. package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.d.ets +14 -0
  179. package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.js +69 -0
  180. package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.d.ets +34 -0
  181. package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.js +151 -0
  182. package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.d.ets +16 -0
  183. package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.js +87 -0
  184. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRate.d.ets +10 -0
  185. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRate.js +34 -0
  186. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.d.ets +16 -0
  187. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.js +34 -0
  188. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicCameraFacing.d.ets +12 -0
  189. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicCameraFacing.js +14 -0
  190. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicChannelStatus.d.ets +47 -0
  191. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicChannelStatus.js +8 -0
  192. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicErrorEvent.d.ets +17 -0
  193. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicErrorEvent.js +9 -0
  194. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.d.ets +6 -0
  195. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.js +6 -0
  196. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicMode.d.ets +10 -0
  197. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicMode.js +5 -0
  198. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicPushResolutionRatio.d.ets +8 -0
  199. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicPushResolutionRatio.js +25 -0
  200. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCEvent.d.ets +14 -0
  201. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCEvent.js +8 -0
  202. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCType.d.ets +3 -0
  203. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCType.js +4 -0
  204. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicSocketEvent.d.ets +153 -0
  205. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicSocketEvent.js +67 -0
  206. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicState.d.ets +22 -0
  207. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicState.js +8 -0
  208. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicTokenRequestStatisticsData.d.ets +22 -0
  209. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicTokenRequestStatisticsData.js +21 -0
  210. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicVideoRenderParam.d.ets +11 -0
  211. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicVideoRenderParam.js +6 -0
  212. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicViewer.d.ets +18 -0
  213. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicViewer.js +15 -0
  214. package/src/main/ets/modules/linkmic/viewmodel/PLVLinkMicViewModel.d.ets +33 -0
  215. package/src/main/ets/modules/linkmic/viewmodel/PLVLinkMicViewModel.js +104 -0
  216. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.d.ets +16 -0
  217. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.js +38 -0
  218. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleQueueOrderUseCase.d.ets +9 -0
  219. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleQueueOrderUseCase.js +47 -0
  220. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleRTCUseCase.d.ets +24 -0
  221. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleRTCUseCase.js +70 -0
  222. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleStateUseCase.d.ets +38 -0
  223. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleStateUseCase.js +92 -0
  224. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicUpdateChannelViewerUseCase.d.ets +27 -0
  225. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicUpdateChannelViewerUseCase.js +247 -0
  226. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicViewLogUseCase.d.ets +17 -0
  227. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicViewLogUseCase.js +79 -0
  228. package/src/main/ets/modules/linkmic/viewmodel/usecase/PLVLinkMicUseCases.d.ets +16 -0
  229. package/src/main/ets/modules/linkmic/viewmodel/usecase/PLVLinkMicUseCases.js +17 -0
  230. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicEncodeParamUseCase.d.ets +11 -0
  231. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicEncodeParamUseCase.js +1 -0
  232. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicHandleRTCUseCase.d.ets +16 -0
  233. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicHandleRTCUseCase.js +1 -0
  234. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicHandleStateUseCase.d.ets +26 -0
  235. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicHandleStateUseCase.js +1 -0
  236. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestEncodeParamUseCase.d.ets +22 -0
  237. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestEncodeParamUseCase.js +153 -0
  238. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.d.ets +22 -0
  239. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.js +91 -0
  240. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleStateUseCase.d.ets +55 -0
  241. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleStateUseCase.js +388 -0
  242. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.d.ets +22 -0
  243. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.js +153 -0
  244. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.d.ets +22 -0
  245. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.js +76 -0
  246. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleStateUseCase.d.ets +49 -0
  247. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleStateUseCase.js +254 -0
  248. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.d.ets +15 -0
  249. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.js +24 -0
  250. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.d.ets +26 -0
  251. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.js +106 -0
  252. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleStateUseCase.d.ets +57 -0
  253. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleStateUseCase.js +373 -0
  254. package/src/main/ets/modules/log/elog/PLVELogSender.d.ets +12 -0
  255. package/src/main/ets/modules/log/elog/PLVELogSender.js +47 -0
  256. package/src/main/ets/modules/log/elog/model/PLVELogDataBean.d.ets +31 -0
  257. package/src/main/ets/modules/log/elog/model/PLVELogDataBean.js +40 -0
  258. package/src/main/ets/modules/log/elog/model/PLVELogModuleConstants.d.ets +10 -0
  259. package/src/main/ets/modules/log/elog/model/PLVELogModuleConstants.js +12 -0
  260. package/src/main/ets/modules/login/PLVSceneLoginManager.d.ets +37 -0
  261. package/src/main/ets/modules/login/PLVSceneLoginManager.js +151 -0
  262. package/src/main/ets/modules/login/model/PLVChatDomainVO.d.ets +12 -0
  263. package/src/main/ets/modules/login/model/PLVChatDomainVO.js +36 -0
  264. package/src/main/ets/modules/login/model/PLVChatFunctionSwitchVO.d.ets +4 -0
  265. package/src/main/ets/modules/login/model/PLVChatFunctionSwitchVO.js +2 -0
  266. package/src/main/ets/modules/login/model/PLVLiveChannelType.d.ets +15 -0
  267. package/src/main/ets/modules/login/model/PLVLiveChannelType.js +26 -0
  268. package/src/main/ets/modules/login/model/PLVLiveDetailVO.d.ets +161 -0
  269. package/src/main/ets/modules/login/model/PLVLiveDetailVO.js +45 -0
  270. package/src/main/ets/modules/login/model/PLVLiveStatus.d.ets +15 -0
  271. package/src/main/ets/modules/login/model/PLVLiveStatus.js +25 -0
  272. package/src/main/ets/modules/login/model/PLVLiveStatusVO.d.ets +4 -0
  273. package/src/main/ets/modules/login/model/PLVLiveStatusVO.js +26 -0
  274. package/src/main/ets/modules/login/model/PLVLoginLiveResult.d.ets +8 -0
  275. package/src/main/ets/modules/login/model/PLVLoginLiveResult.js +7 -0
  276. package/src/main/ets/modules/login/model/PLVLoginPlaybackResult.d.ets +9 -0
  277. package/src/main/ets/modules/login/model/PLVLoginPlaybackResult.js +11 -0
  278. package/src/main/ets/modules/login/model/PLVLoginStreamerVO.d.ets +176 -0
  279. package/src/main/ets/modules/login/model/PLVLoginStreamerVO.js +18 -0
  280. package/src/main/ets/modules/login/model/PLVLoginType.d.ets +8 -0
  281. package/src/main/ets/modules/login/model/PLVLoginType.js +10 -0
  282. package/src/main/ets/modules/member/PLVMemberManager.d.ets +46 -0
  283. package/src/main/ets/modules/member/PLVMemberManager.js +34 -0
  284. package/src/main/ets/modules/member/di/PLVMemberModule.d.ets +2 -0
  285. package/src/main/ets/modules/member/di/PLVMemberModule.js +19 -0
  286. package/src/main/ets/modules/member/mediator/PLVMemberMediator.d.ets +22 -0
  287. package/src/main/ets/modules/member/mediator/PLVMemberMediator.js +37 -0
  288. package/src/main/ets/modules/member/model/PLVMemberRepo.d.ets +10 -0
  289. package/src/main/ets/modules/member/model/PLVMemberRepo.js +12 -0
  290. package/src/main/ets/modules/member/model/datasource/PLVMemberNetworkDataSource.d.ets +9 -0
  291. package/src/main/ets/modules/member/model/datasource/PLVMemberNetworkDataSource.js +21 -0
  292. package/src/main/ets/modules/member/model/vo/PLVMemberChannelViewer.d.ets +16 -0
  293. package/src/main/ets/modules/member/model/vo/PLVMemberChannelViewer.js +12 -0
  294. package/src/main/ets/modules/member/model/vo/PLVMemberErrorEvent.d.ets +13 -0
  295. package/src/main/ets/modules/member/model/vo/PLVMemberErrorEvent.js +8 -0
  296. package/src/main/ets/modules/member/model/vo/PLVMemberListResponseData.d.ets +38 -0
  297. package/src/main/ets/modules/member/model/vo/PLVMemberListResponseData.js +8 -0
  298. package/src/main/ets/modules/member/model/vo/PLVMemberSocketEvent.d.ets +54 -0
  299. package/src/main/ets/modules/member/model/vo/PLVMemberSocketEvent.js +28 -0
  300. package/src/main/ets/modules/member/viewmodel/PLVMemberViewModel.d.ets +12 -0
  301. package/src/main/ets/modules/member/viewmodel/PLVMemberViewModel.js +33 -0
  302. package/src/main/ets/modules/member/viewmodel/usecase/MemberHandleStateUseCase.d.ets +17 -0
  303. package/src/main/ets/modules/member/viewmodel/usecase/MemberHandleStateUseCase.js +40 -0
  304. package/src/main/ets/modules/member/viewmodel/usecase/MemberUpdateViewerUseCase.d.ets +24 -0
  305. package/src/main/ets/modules/member/viewmodel/usecase/MemberUpdateViewerUseCase.js +56 -0
  306. package/src/main/ets/modules/member/viewmodel/usecase/PLVMemberUseCases.d.ets +8 -0
  307. package/src/main/ets/modules/member/viewmodel/usecase/PLVMemberUseCases.js +10 -0
  308. package/src/main/ets/modules/member/viewmodel/usecase/roles/base/IMemberHandleStateUseCase.d.ets +9 -0
  309. package/src/main/ets/modules/member/viewmodel/usecase/roles/base/IMemberHandleStateUseCase.js +1 -0
  310. package/src/main/ets/modules/member/viewmodel/usecase/roles/base/IMemberUpdateViewerUseCase.d.ets +22 -0
  311. package/src/main/ets/modules/member/viewmodel/usecase/roles/base/IMemberUpdateViewerUseCase.js +2 -0
  312. package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestHandleStateUseCase.d.ets +30 -0
  313. package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestHandleStateUseCase.js +139 -0
  314. package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.d.ets +23 -0
  315. package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.js +344 -0
  316. package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherHandleStateUseCase.d.ets +32 -0
  317. package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherHandleStateUseCase.js +245 -0
  318. package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.d.ets +23 -0
  319. package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.js +344 -0
  320. package/src/main/ets/modules/net/PLVApiChatPlvNetApi.d.ets +13 -0
  321. package/src/main/ets/modules/net/PLVApiChatPlvNetApi.js +90 -0
  322. package/src/main/ets/modules/net/PLVApiPlvNetApi.d.ets +52 -0
  323. package/src/main/ets/modules/net/PLVApiPlvNetApi.js +424 -0
  324. package/src/main/ets/modules/net/PLVELogPlvNetApi.d.ets +7 -0
  325. package/src/main/ets/modules/net/PLVELogPlvNetApi.js +23 -0
  326. package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.d.ets +9 -0
  327. package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.js +44 -0
  328. package/src/main/ets/modules/net/PLVNGBPushApi.d.ets +7 -0
  329. package/src/main/ets/modules/net/PLVNGBPushApi.js +20 -0
  330. package/src/main/ets/modules/net/PLVRtasVideoNetApi.d.ets +8 -0
  331. package/src/main/ets/modules/net/PLVRtasVideoNetApi.js +17 -0
  332. package/src/main/ets/modules/net/vo/PLVNetworkQuality.d.ets +30 -0
  333. package/src/main/ets/modules/net/vo/PLVNetworkQuality.js +10 -0
  334. package/src/main/ets/modules/net/vo/PLVNetworkStatistics.d.ets +18 -0
  335. package/src/main/ets/modules/net/vo/PLVNetworkStatistics.js +8 -0
  336. package/src/main/ets/modules/player/PLVPlayerManager.d.ets +12 -0
  337. package/src/main/ets/modules/player/PLVPlayerManager.js +66 -0
  338. package/src/main/ets/modules/player/PLVPlayerMediator.d.ets +6 -0
  339. package/src/main/ets/modules/player/PLVPlayerMediator.js +8 -0
  340. package/src/main/ets/modules/player/playback/PLVPlaybackListType.d.ets +5 -0
  341. package/src/main/ets/modules/player/playback/PLVPlaybackListType.js +6 -0
  342. package/src/main/ets/modules/product/PLVProductManager.d.ets +60 -0
  343. package/src/main/ets/modules/product/PLVProductManager.js +155 -0
  344. package/src/main/ets/modules/product/components/PLVProductControlWeb.d.ets +14 -0
  345. package/src/main/ets/modules/product/components/PLVProductControlWeb.js +86 -0
  346. package/src/main/ets/modules/product/components/PLVProductWeb.d.ets +19 -0
  347. package/src/main/ets/modules/product/components/PLVProductWeb.js +123 -0
  348. package/src/main/ets/modules/product/model/PLVLocalProductClickEvent.d.ets +11 -0
  349. package/src/main/ets/modules/product/model/PLVLocalProductClickEvent.js +6 -0
  350. package/src/main/ets/modules/product/model/PLVProductClickTimesEvent.d.ets +7 -0
  351. package/src/main/ets/modules/product/model/PLVProductClickTimesEvent.js +4 -0
  352. package/src/main/ets/modules/product/model/PLVProductContentBean.d.ets +43 -0
  353. package/src/main/ets/modules/product/model/PLVProductContentBean.js +73 -0
  354. package/src/main/ets/modules/product/model/PLVProductControlEvent.d.ets +12 -0
  355. package/src/main/ets/modules/product/model/PLVProductControlEvent.js +35 -0
  356. package/src/main/ets/modules/product/model/PLVProductDataBean.d.ets +11 -0
  357. package/src/main/ets/modules/product/model/PLVProductDataBean.js +36 -0
  358. package/src/main/ets/modules/product/model/PLVProductEvent.d.ets +17 -0
  359. package/src/main/ets/modules/product/model/PLVProductEvent.js +43 -0
  360. package/src/main/ets/modules/product/model/PLVProductMenuSwitchEvent.d.ets +13 -0
  361. package/src/main/ets/modules/product/model/PLVProductMenuSwitchEvent.js +4 -0
  362. package/src/main/ets/modules/product/model/PLVProductMoveEvent.d.ets +8 -0
  363. package/src/main/ets/modules/product/model/PLVProductMoveEvent.js +10 -0
  364. package/src/main/ets/modules/product/model/PLVProductRemoveEvent.d.ets +10 -0
  365. package/src/main/ets/modules/product/model/PLVProductRemoveEvent.js +4 -0
  366. package/src/main/ets/modules/redpack/PLVRedpackManager.d.ets +72 -0
  367. package/src/main/ets/modules/redpack/PLVRedpackManager.js +128 -0
  368. package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.d.ets +9 -0
  369. package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.js +47 -0
  370. package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.d.ets +15 -0
  371. package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.js +60 -0
  372. package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.d.ets +8 -0
  373. package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.js +15 -0
  374. package/src/main/ets/modules/reward/PLVRewardManager.d.ets +48 -0
  375. package/src/main/ets/modules/reward/PLVRewardManager.js +50 -0
  376. package/src/main/ets/modules/reward/model/PLVRewardPointVO.d.ets +3 -0
  377. package/src/main/ets/modules/reward/model/PLVRewardPointVO.js +8 -0
  378. package/src/main/ets/modules/reward/model/PLVRewardSettingVO.d.ets +39 -0
  379. package/src/main/ets/modules/reward/model/PLVRewardSettingVO.js +83 -0
  380. package/src/main/ets/modules/socket/PLVSocketManager.d.ets +132 -0
  381. package/src/main/ets/modules/socket/PLVSocketManager.js +224 -0
  382. package/src/main/ets/modules/socket/PLVSocketMediator.d.ets +10 -0
  383. package/src/main/ets/modules/socket/PLVSocketMediator.js +20 -0
  384. package/src/main/ets/modules/socket/model/PLVChatTokenVO.d.ets +7 -0
  385. package/src/main/ets/modules/socket/model/PLVChatTokenVO.js +5 -0
  386. package/src/main/ets/modules/socket/model/PLVKickEvent.d.ets +6 -0
  387. package/src/main/ets/modules/socket/model/PLVKickEvent.js +4 -0
  388. package/src/main/ets/modules/socket/model/PLVLocalLoginEvent.d.ets +12 -0
  389. package/src/main/ets/modules/socket/model/PLVLocalLoginEvent.js +7 -0
  390. package/src/main/ets/modules/socket/model/PLVLoginRefuseEvent.d.ets +8 -0
  391. package/src/main/ets/modules/socket/model/PLVLoginRefuseEvent.js +4 -0
  392. package/src/main/ets/modules/socket/model/PLVOnSliceIDEvent.d.ets +11 -0
  393. package/src/main/ets/modules/socket/model/PLVOnSliceIDEvent.js +7 -0
  394. package/src/main/ets/modules/socket/model/PLVReLoginEvent.d.ets +6 -0
  395. package/src/main/ets/modules/socket/model/PLVReLoginEvent.js +4 -0
  396. package/src/main/ets/modules/socket/model/PLVSocketEvent.d.ets +7 -0
  397. package/src/main/ets/modules/socket/model/PLVSocketEvent.js +4 -0
  398. package/src/main/ets/modules/socket/model/PLVSocketEventConstants.d.ets +74 -0
  399. package/src/main/ets/modules/socket/model/PLVSocketEventConstants.js +88 -0
  400. package/src/main/ets/modules/socket/model/PLVSocketUserBean.d.ets +66 -0
  401. package/src/main/ets/modules/socket/model/PLVSocketUserBean.js +89 -0
  402. package/src/main/ets/modules/socket/model/PLVUserConstants.d.ets +3 -0
  403. package/src/main/ets/modules/socket/model/PLVUserConstants.js +3 -0
  404. package/src/main/ets/modules/socket/model/PLVUserType.d.ets +17 -0
  405. package/src/main/ets/modules/socket/model/PLVUserType.js +19 -0
  406. package/src/main/ets/modules/socket/model/interact/PLVCallAppEvent.d.ets +23 -0
  407. package/src/main/ets/modules/socket/model/interact/PLVCallAppEvent.js +41 -0
  408. package/src/main/ets/modules/socket/model/interact/PLVChangeRedpackStatusEvent.d.ets +11 -0
  409. package/src/main/ets/modules/socket/model/interact/PLVChangeRedpackStatusEvent.js +8 -0
  410. package/src/main/ets/modules/socket/model/interact/PLVShowJobDetailEvent.d.ets +5 -0
  411. package/src/main/ets/modules/socket/model/interact/PLVShowJobDetailEvent.js +5 -0
  412. package/src/main/ets/modules/socket/model/interact/PLVUpdateChannelSwitchEvent.d.ets +5 -0
  413. package/src/main/ets/modules/socket/model/interact/PLVUpdateChannelSwitchEvent.js +6 -0
  414. package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.d.ets +23 -0
  415. package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.js +57 -0
  416. package/src/main/ets/modules/streamer/PLVStreamerManager.d.ets +84 -0
  417. package/src/main/ets/modules/streamer/PLVStreamerManager.js +58 -0
  418. package/src/main/ets/modules/streamer/di/PLVStreamerModule.d.ets +2 -0
  419. package/src/main/ets/modules/streamer/di/PLVStreamerModule.js +19 -0
  420. package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.d.ets +24 -0
  421. package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.js +25 -0
  422. package/src/main/ets/modules/streamer/model/PLVStreamerRepo.d.ets +21 -0
  423. package/src/main/ets/modules/streamer/model/PLVStreamerRepo.js +58 -0
  424. package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.d.ets +8 -0
  425. package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.js +17 -0
  426. package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.d.ets +14 -0
  427. package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.js +65 -0
  428. package/src/main/ets/modules/streamer/model/vo/PLVStreamerErrorEvent.d.ets +21 -0
  429. package/src/main/ets/modules/streamer/model/vo/PLVStreamerErrorEvent.js +10 -0
  430. package/src/main/ets/modules/streamer/model/vo/PLVStreamerLiveStatusResponseVO.d.ts +4 -0
  431. package/src/main/ets/modules/streamer/model/vo/PLVStreamerLiveStatusResponseVO.js +2 -0
  432. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionResponse.d.ets +3 -0
  433. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionResponse.js +2 -0
  434. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionVO.d.ets +55 -0
  435. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionVO.js +40 -0
  436. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixLayoutType.d.ets +14 -0
  437. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixLayoutType.js +6 -0
  438. package/src/main/ets/modules/streamer/model/vo/PLVStreamerSessionIdQueryResponse.d.ets +4 -0
  439. package/src/main/ets/modules/streamer/model/vo/PLVStreamerSessionIdQueryResponse.js +2 -0
  440. package/src/main/ets/modules/streamer/model/vo/PLVStreamerSocketEvent.d.ets +64 -0
  441. package/src/main/ets/modules/streamer/model/vo/PLVStreamerSocketEvent.js +21 -0
  442. package/src/main/ets/modules/streamer/model/vo/PLVStreamerState.d.ets +14 -0
  443. package/src/main/ets/modules/streamer/model/vo/PLVStreamerState.js +6 -0
  444. package/src/main/ets/modules/streamer/viewmodel/PLVStreamerViewModel.d.ets +20 -0
  445. package/src/main/ets/modules/streamer/viewmodel/PLVStreamerViewModel.js +53 -0
  446. package/src/main/ets/modules/streamer/viewmodel/usecase/PLVStreamerUseCases.d.ets +8 -0
  447. package/src/main/ets/modules/streamer/viewmodel/usecase/PLVStreamerUseCases.js +10 -0
  448. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerHandleStateUseCase.d.ets +14 -0
  449. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerHandleStateUseCase.js +31 -0
  450. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerMixStreamUseCase.d.ets +12 -0
  451. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerMixStreamUseCase.js +30 -0
  452. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/base/IStreamerHandleStateUseCase.d.ets +6 -0
  453. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/base/IStreamerHandleStateUseCase.js +1 -0
  454. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/base/IStreamerMixStreamUseCase.d.ets +7 -0
  455. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/base/IStreamerMixStreamUseCase.js +1 -0
  456. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestHandleStateUseCase.d.ets +23 -0
  457. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestHandleStateUseCase.js +109 -0
  458. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestMixStreamUseCase.d.ets +11 -0
  459. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestMixStreamUseCase.js +13 -0
  460. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherHandleStateUseCase.d.ets +14 -0
  461. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherHandleStateUseCase.js +75 -0
  462. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherMixStreamUseCase.d.ets +20 -0
  463. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherMixStreamUseCase.js +133 -0
  464. package/src/main/ets/modules/web/PLVSocketWebController.d.ets +19 -0
  465. package/src/main/ets/modules/web/PLVSocketWebController.js +146 -0
  466. package/src/main/ets/modules/web/PLVWebControllerManager.d.ets +22 -0
  467. package/src/main/ets/modules/web/PLVWebControllerManager.js +14 -0
  468. package/src/main/ets/modules/web/PLVWebParams.d.ets +24 -0
  469. package/src/main/ets/modules/web/PLVWebParams.js +35 -0
  470. package/src/main/module.json +28 -0
  471. package/src/main/resources/base/element/string.json +148 -0
  472. package/src/main/resources/en_US/element/string.json +144 -0
  473. package/src/main/resources/zh_CN/element/string.json +144 -0
@@ -0,0 +1,388 @@
1
+ import { PLVDisposable, PLVLogger, PLVRequestSetting } from '@polyvharmony/live-scenes-foundation';
2
+ import { decodeFromJson, encodeToJson, isNullOrUndefined, MutableObserver, Promises, requireNotNull, retry, RetryConditions, runCatching, seconds, withTimeout } from '@polyvharmony/media-player-sdk';
3
+ import { PLVSocketMessageEvent, PLVSocketOnEvent } from '../../../../../socket/model/PLVSocketEventConstants';
4
+ import { PLVUserType } from '../../../../../socket/model/PLVUserType';
5
+ import { PLVLinkMicErrorEvent } from '../../../../model/vo/PLVLinkMicErrorEvent';
6
+ import { PLVLinkMicMode } from '../../../../model/vo/PLVLinkMicMode';
7
+ import { PLVLinkMicSocketJoinAnswerSend, PLVLinkMicSocketJoinAnswerTTLAck, PLVLinkMicSocketJoinAnswerTTLSend, PLVLinkMicSocketJoinLeaveRecv, PLVLinkMicSocketJoinLeaveSend, PLVLinkMicSocketJoinRequestRecv, PLVLinkMicSocketJoinRequestSend, PLVLinkMicSocketJoinResponseRecv, PLVLinkMicSocketJoinResponseSend, PLVLinkMicSocketJoinSuccessRecv, PLVLinkMicSocketMuteUserMicroRecv, PLVLinkMicSocketOpenMicrophoneRecv, PLVLinkMicSocketSwitchViewRecv, PLVLinkMicSocketSwitchViewSend, PLVLinkMicSocketTeacherSetPermissionRecv, PLVLinkMicSocketTeacherSetPermissionSend } from '../../../../model/vo/PLVLinkMicSocketEvent';
8
+ import { PLVLinkMicState } from '../../../../model/vo/PLVLinkMicState';
9
+ import { PLVSocketUserSend } from '../../../../../socket/model/PLVSocketUserBean';
10
+ import { PLVMemberSocketSetNickRecv } from '../../../../../member/model/vo/PLVMemberSocketEvent';
11
+ const TAG = "PLVLinkMicManager";
12
+ export class LinkMicGuestHandleStateUseCase {
13
+ constructor(n143, o143, p143, q143) {
14
+ this.disposables = [];
15
+ this.observers = [];
16
+ this.repo = n143;
17
+ this.handleQueueOrderUseCase = o143;
18
+ this.handleRTCUseCase = p143;
19
+ this.updateChannelViewerUseCase = q143;
20
+ }
21
+ init() {
22
+ this.disposables.push(this.observeSocketEvent(PLVSocketOnEvent.MESSAGE, (data, event) => this.onSocketMessage(data, event)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_REQUEST, (data) => this.onSocketJoinRequest(data)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_RESPONSE, (data) => this.onSocketJoinResponse(data)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_SUCCESS, (data) => this.onSocketJoinSuccess(data)), this.observeSocketEvent(PLVSocketOnEvent.JOIN_LEAVE, (data) => this.onSocketJoinLeave(data)), this.observeSocketEvent(PLVSocketOnEvent.SWITCH_VIEW, (data) => this.onSocketSwitchView(data)));
23
+ }
24
+ async requestJoinLinkMic() {
25
+ const f143 = this.repo.mediator.linkmicState.value;
26
+ if (f143 === PLVLinkMicState.Inviting) {
27
+ this.acceptInvitation();
28
+ return;
29
+ }
30
+ if (await this.isChannelReachLinkMicLimit()) {
31
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
32
+ this.repo.mediator.reportError(PLVLinkMicErrorEvent.REACH_LINKMIC_LIMIT, "requestJoinLinkMic channel reach linkmic limit");
33
+ return;
34
+ }
35
+ const event = new PLVLinkMicSocketJoinRequestSend();
36
+ event.user = this.createSocketUser();
37
+ event.roomId = this.repo.mediator.channelData?.loginChannelId;
38
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_REQUEST, encodeToJson(event), () => {
39
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Requesting);
40
+ });
41
+ }
42
+ async acceptInvitation() {
43
+ if (await this.isChannelReachLinkMicLimit()) {
44
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
45
+ this.repo.mediator.reportError(PLVLinkMicErrorEvent.REACH_LINKMIC_LIMIT, "acceptInvitation channel reach linkmic limit");
46
+ return;
47
+ }
48
+ const event = new PLVLinkMicSocketJoinAnswerSend();
49
+ event.user = this.createSocketUser();
50
+ event.roomId = this.repo.mediator.channelData?.loginChannelId;
51
+ event.status = 1;
52
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(event), () => {
53
+ const e143 = this.repo.mediator.linkmicState.value;
54
+ if (e143 === PLVLinkMicState.Inviting) {
55
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.WaitingResponse);
56
+ }
57
+ });
58
+ }
59
+ refuseInvitation() {
60
+ const event = new PLVLinkMicSocketJoinAnswerSend();
61
+ event.user = this.createSocketUser();
62
+ event.roomId = this.repo.mediator.channelData?.loginChannelId;
63
+ event.status = 0;
64
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER, encodeToJson(event));
65
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
66
+ }
67
+ leaveLinkMic() {
68
+ const c143 = this.repo.mediator.linkmicState.value;
69
+ if (c143 === undefined || ![PLVLinkMicState.Requesting, PLVLinkMicState.Joined].includes(c143)) {
70
+ return;
71
+ }
72
+ const event = new PLVLinkMicSocketJoinLeaveSend();
73
+ event.user = this.createSocketUser();
74
+ event.roomId = this.repo.mediator.channelData?.loginChannelId;
75
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_LEAVE, encodeToJson(event));
76
+ this.revokeSpeaker("");
77
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.NoLinkMic);
78
+ }
79
+ onStreamerStart() {
80
+ this.handleRTCUseCase.joinChannel();
81
+ }
82
+ onLiveStreamStart() {
83
+ this.tryAutoJoinLinkMic();
84
+ this.updateChannelViewerUseCase.startUpdateChannelLinkMicViewersInterval();
85
+ }
86
+ async setLinkMicMode(b143) {
87
+ return false;
88
+ }
89
+ async openLinkMic() {
90
+ return false;
91
+ }
92
+ async closeLinkMic() {
93
+ return false;
94
+ }
95
+ acceptViewerLinkMicRequest(a143) {
96
+ }
97
+ inviteViewerLinkMic(y142, z142) {
98
+ }
99
+ hangupViewerLinkMic(x142) {
100
+ }
101
+ hangupAllViewersLinkMic() {
102
+ }
103
+ setViewerEnableCamera(w142, enable) {
104
+ }
105
+ setViewerEnableMicrophone(v142, enable) {
106
+ }
107
+ grantSpeaker(u142) {
108
+ if (!this.isMyselfSpeaker()) {
109
+ return;
110
+ }
111
+ this.moveSpeaker(u142);
112
+ this.setMainView(u142);
113
+ }
114
+ revokeSpeaker(s142) {
115
+ if (!this.isMyselfSpeaker()) {
116
+ return;
117
+ }
118
+ const t142 = requireNotNull(this.repo.mediator.channelData?.loginChannelId);
119
+ this.moveSpeaker(t142);
120
+ this.setMainView(t142);
121
+ }
122
+ setMainView(p142) {
123
+ if (!this.isMyselfSpeaker()) {
124
+ return;
125
+ }
126
+ const q142 = this.repo.mediator.memberMediator?.findViewerByViewerId(p142);
127
+ if (q142 === undefined) {
128
+ PLVLogger.error(TAG, `setMainView fail, viewerId ${p142} not found.`);
129
+ return;
130
+ }
131
+ const r142 = new PLVLinkMicSocketSwitchViewSend();
132
+ r142.emitMode = 0;
133
+ r142.roomId = this.repo.mediator.channelData?.loginChannelId;
134
+ r142.userId = q142.linkmicId;
135
+ r142.socketId = q142.socketId;
136
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.SWITCH_VIEW, encodeToJson(r142));
137
+ }
138
+ isMyselfSpeaker() {
139
+ const o142 = this.repo.mediator.channelMainViewLinkMicId.value;
140
+ return !isNullOrUndefined(o142) && this.repo.mediator.isMySocketLinkMicId(o142);
141
+ }
142
+ moveSpeaker(m142) {
143
+ const n142 = new PLVLinkMicSocketTeacherSetPermissionSend();
144
+ n142.emitMode = 0;
145
+ n142.roomId = this.repo.mediator.channelData?.loginChannelId;
146
+ n142.sessionId = this.repo.mediator.channelData?.sessionId;
147
+ n142.type = "speaker";
148
+ n142.status = "1";
149
+ n142.userId = m142;
150
+ n142.sign = PLVRequestSetting.createSign(new Map(Object.entries(n142)), "polyvChatSign")
151
+ .toUpperCase();
152
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.MESSAGE, encodeToJson(n142));
153
+ }
154
+ onLiveStreamStop() {
155
+ this.leaveLinkMic();
156
+ this.updateChannelViewerUseCase.stopUpdateChannelLinkMicViewersInterval();
157
+ }
158
+ onStreamerStop() {
159
+ this.leaveLinkMic();
160
+ this.handleRTCUseCase.leaveChannel();
161
+ }
162
+ updateInvitationExpireTime() {
163
+ const event = new PLVLinkMicSocketJoinAnswerTTLSend();
164
+ event.userId = this.repo.mediator.channelData?.viewerId;
165
+ event.roomId = this.repo.mediator.channelData?.loginChannelId;
166
+ event.sessionId = this.repo.mediator.channelData?.sessionId;
167
+ const h142 = Date.now();
168
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_ANSWER_TTL, encodeToJson(event), (data) => {
169
+ const ttl = decodeFromJson(data, PLVLinkMicSocketJoinAnswerTTLAck).message?.[0] ?? 0;
170
+ const expire = h142 + seconds(ttl).toMillis();
171
+ this.repo.mediator.invitationExpireTimestamp.setValue(expire);
172
+ const j142 = expire - Date.now();
173
+ setTimeout(() => {
174
+ const expire = this.repo.mediator.invitationExpireTimestamp.value ?? 0;
175
+ const l142 = this.repo.mediator.linkmicState.value;
176
+ if (l142 === PLVLinkMicState.Inviting && Date.now() >= expire) {
177
+ this.refuseInvitation();
178
+ }
179
+ }, j142);
180
+ });
181
+ }
182
+ onSocketMessage(data, event) {
183
+ switch (event) {
184
+ case PLVSocketMessageEvent.OPEN_MICROPHONE: return this.onSocketOpenMicrophone(data);
185
+ case PLVSocketMessageEvent.MUTE_USER_MICRO: return this.onSocketMuteUserMicro(data);
186
+ case PLVSocketMessageEvent.TEACHER_SET_PERMISSION: return this.onSocketTeacherSetPermission(data);
187
+ case PLVSocketMessageEvent.SET_NICK: return this.onSocketUserSetNick(data);
188
+ default:
189
+ }
190
+ }
191
+ onSocketOpenMicrophone(data) {
192
+ const f142 = decodeFromJson(data, PLVLinkMicSocketOpenMicrophoneRecv);
193
+ const g142 = f142.userId !== undefined;
194
+ if (f142.status === 'open') {
195
+ if (!g142) {
196
+ this.repo.mediator.channelAllowLinkMic.setValue(true);
197
+ this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(true);
198
+ this.updateLinkMicMode(f142.type);
199
+ }
200
+ }
201
+ else if (f142.status === 'close') {
202
+ if (!g142) {
203
+ if (this.repo.mediator.isLinkMicStrategyV2.value === true) {
204
+ this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
205
+ }
206
+ else {
207
+ this.repo.mediator.channelAllowLinkMic.setValue(false);
208
+ this.repo.mediator.channelAllowRequestHandsUpLinkMic.setValue(false);
209
+ }
210
+ }
211
+ if (g142 && this.repo.mediator.isMySocketLinkMicId(f142.userId)) {
212
+ this.repo.mediator.teacherHangUpLinkMicEvent.setValue(Date.now());
213
+ this.leaveLinkMic();
214
+ }
215
+ }
216
+ }
217
+ onSocketMuteUserMicro(data) {
218
+ const e142 = decodeFromJson(data, PLVLinkMicSocketMuteUserMicroRecv);
219
+ if (e142.type === 'audio') {
220
+ if (e142.mute === true) {
221
+ this.handleRTCUseCase.enableMicrophone(false);
222
+ }
223
+ if (e142.mute === false) {
224
+ this.handleRTCUseCase.enableMicrophone(true);
225
+ }
226
+ }
227
+ if (e142.type === 'video') {
228
+ if (e142.mute === true) {
229
+ this.handleRTCUseCase.enableCamera(false);
230
+ }
231
+ if (e142.mute === false) {
232
+ this.handleRTCUseCase.enableCamera(true);
233
+ }
234
+ }
235
+ }
236
+ onSocketTeacherSetPermission(data) {
237
+ const b142 = decodeFromJson(data, PLVLinkMicSocketTeacherSetPermissionRecv);
238
+ this.updateChannelViewerUseCase.onEventTeacherSetPermission(b142);
239
+ if (b142.type === "voice") {
240
+ const c142 = b142.status === "1";
241
+ const d142 = !isNullOrUndefined(b142.userId) && b142.userId === this.repo.mediator.channelData?.viewerId;
242
+ if (d142) {
243
+ this.repo.mediator.linkmicState.setValue(c142 ? PLVLinkMicState.Joined : PLVLinkMicState.NoLinkMic);
244
+ }
245
+ }
246
+ }
247
+ onSocketUserSetNick(data) {
248
+ const y141 = decodeFromJson(data, PLVMemberSocketSetNickRecv);
249
+ const z141 = y141.userId;
250
+ const a142 = this.repo.mediator.findViewerByViewerId(z141);
251
+ if (a142 !== undefined) {
252
+ a142.viewerName.setValue(y141.nick);
253
+ }
254
+ }
255
+ onSocketJoinRequest(data) {
256
+ const x141 = decodeFromJson(data, PLVLinkMicSocketJoinRequestRecv);
257
+ this.handleQueueOrderUseCase.onEventJoinRequest(x141);
258
+ }
259
+ onSocketJoinResponse(data) {
260
+ const v141 = decodeFromJson(data, PLVLinkMicSocketJoinResponseRecv);
261
+ if (!this.repo.mediator.isMySocketLinkMicId(v141.user?.userId)) {
262
+ return;
263
+ }
264
+ this.updateLinkMicMode(v141.type);
265
+ const w141 = this.repo.mediator.linkmicState.value;
266
+ if (v141.isNeedAnswer()) {
267
+ if (w141 === PLVLinkMicState.Requesting) {
268
+ this.acceptInvitation();
269
+ }
270
+ else if (w141 === PLVLinkMicState.NoLinkMic) {
271
+ this.repo.mediator.invitationExpireTimestamp.setValue(Date.now() + seconds(30).toMillis());
272
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Inviting);
273
+ this.updateInvitationExpireTime();
274
+ }
275
+ }
276
+ else {
277
+ this.repo.mediator.linkmicState.setValue(PLVLinkMicState.Joined);
278
+ }
279
+ }
280
+ onSocketJoinSuccess(data) {
281
+ const u141 = decodeFromJson(data, PLVLinkMicSocketJoinSuccessRecv);
282
+ this.handleQueueOrderUseCase.onEventJoinSuccess(u141);
283
+ this.updateChannelViewerUseCase.onEventJoinSuccess(u141);
284
+ }
285
+ onSocketJoinLeave(data) {
286
+ const t141 = decodeFromJson(data, PLVLinkMicSocketJoinLeaveRecv);
287
+ this.handleQueueOrderUseCase.onEventJoinLeave(t141);
288
+ this.updateChannelViewerUseCase.onEventJoinLeave(t141);
289
+ }
290
+ onSocketSwitchView(data) {
291
+ const s141 = decodeFromJson(data, PLVLinkMicSocketSwitchViewRecv);
292
+ if (isNullOrUndefined(s141.userId)) {
293
+ return;
294
+ }
295
+ this.repo.mediator.channelMainViewLinkMicId.setValue(s141.userId);
296
+ this.updateChannelViewerUseCase.onEventSwitchView(s141);
297
+ }
298
+ async tryAutoJoinLinkMic() {
299
+ const i141 = this.repo.mediator.channelData?.streamerData?.colinMicType === "auto";
300
+ if (!i141) {
301
+ return;
302
+ }
303
+ const j141 = Promises.withResolvers();
304
+ const k141 = this.repo.mediator.linkmicState.observe((r141) => {
305
+ if (r141 === PLVLinkMicState.Joined) {
306
+ j141.resolve();
307
+ k141.dispose();
308
+ }
309
+ });
310
+ this.observers.push(k141);
311
+ const l141 = async () => {
312
+ const q141 = new PLVLinkMicSocketJoinResponseSend();
313
+ q141.roomId = await this.repo.mediator.channelData?.loginRoomIdPromise.get();
314
+ q141.value = "1";
315
+ q141.toEmitAll = 1;
316
+ q141.user = this.createSocketUser();
317
+ this.repo.mediator.socketMediator?.emit(PLVSocketOnEvent.JOIN_RESPONSE, encodeToJson(q141));
318
+ };
319
+ await runCatching(retry(async () => {
320
+ await withTimeout(seconds(8), async () => {
321
+ await l141();
322
+ await j141.promise;
323
+ });
324
+ }, RetryConditions.delay(3, seconds(1))));
325
+ k141.dispose();
326
+ }
327
+ onDestroy() {
328
+ this.disposables.forEach((h141) => {
329
+ h141.dispose();
330
+ });
331
+ this.disposables = [];
332
+ MutableObserver.disposeAll(this.observers);
333
+ this.observers = [];
334
+ }
335
+ observeSocketEvent(event, callback) {
336
+ const e141 = requireNotNull(this.repo.mediator.socketMediator);
337
+ e141.onData(event, callback);
338
+ return disposable(() => e141.offData(event, callback));
339
+ }
340
+ createSocketUser() {
341
+ const d141 = new PLVSocketUserSend();
342
+ d141.nick = this.repo.mediator.channelData?.viewerName;
343
+ d141.pic = this.repo.mediator.channelData?.viewerAvatar;
344
+ d141.userType = this.repo.mediator.channelData?.viewerType;
345
+ d141.userId = this.repo.mediator.linkmicId;
346
+ return d141;
347
+ }
348
+ updateLinkMicMode(mode) {
349
+ if (mode === PLVLinkMicMode.AUDIO || mode === PLVLinkMicMode.VIDEO) {
350
+ this.repo.mediator.channelLinkMicMode.setValue(mode);
351
+ }
352
+ }
353
+ async isChannelReachLinkMicLimit() {
354
+ const y140 = this.repo.mediator.channelData?.liveDetail?.linkMicLimit;
355
+ if (y140 === undefined) {
356
+ PLVLogger.warn(TAG, "channel linkmic limit is undefined, treat as reach limit.");
357
+ return true;
358
+ }
359
+ const z140 = await runCatching(this.repo.getChannelLinkMicStatus());
360
+ if (z140.success === false) {
361
+ PLVLogger.warn(TAG, `channel linkmic status response fail: ${z140.error.message}`);
362
+ return true;
363
+ }
364
+ const a141 = z140.data.joinList?.filter(c141 => {
365
+ c141.userType === PLVUserType.USERTYPE_TEACHER || c141.classStatus?.voice === 1;
366
+ })?.length ?? 0;
367
+ if (a141 >= y140 + 1) {
368
+ PLVLogger.warn(TAG, `channel reach linkmic limit, current join ${a141}, limit ${y140}`);
369
+ return true;
370
+ }
371
+ else {
372
+ return false;
373
+ }
374
+ }
375
+ }
376
+ class SocketDisposable extends PLVDisposable {
377
+ constructor(x140) {
378
+ super();
379
+ this.onDispose = x140;
380
+ }
381
+ dispose() {
382
+ super.dispose();
383
+ this.onDispose?.();
384
+ }
385
+ }
386
+ function disposable(w140) {
387
+ return new SocketDisposable(w140);
388
+ }
@@ -0,0 +1,22 @@
1
+ import { PLVPushDowngradePreference, PLVPushOrientation } from '@polyvharmony/rtc-sdk';
2
+ import { PLVLinkMicRepo } from '../../../../model/PLVLinkMicRepo';
3
+ import { PLVLinkMicBitRate } from '../../../../model/vo/PLVLinkMicBitRate';
4
+ import { PLVLinkMicPushResolutionRatio } from '../../../../model/vo/PLVLinkMicPushResolutionRatio';
5
+ import { ILinkMicEncodeParamUseCase } from '../base/ILinkMicEncodeParamUseCase';
6
+ export declare class LinkMicTeacherEncodeParamUseCase implements ILinkMicEncodeParamUseCase {
7
+ private readonly repo;
8
+ constructor(c146: PLVLinkMicRepo);
9
+ init(): void;
10
+ setBitRate(bitRate: PLVLinkMicBitRate): void;
11
+ setPushResolutionRatio(b146: PLVLinkMicPushResolutionRatio): void;
12
+ setPushOrientation(a146: PLVPushOrientation): void;
13
+ setPushMirror(z145: boolean): void;
14
+ setPushDowngradePreference(y145: PLVPushDowngradePreference): void;
15
+ private updateEncodeParam;
16
+ private parseChannelBitRateSetting;
17
+ private parsePushStreamTemplate;
18
+ private parseBuiltinBitRateSetting;
19
+ private reduceEncodeParams;
20
+ private setupDefaultBitRate;
21
+ private isChannelUsePushStreamTemplate;
22
+ }
@@ -0,0 +1,153 @@
1
+ import { extendArray, isLiteralTrue, requireNotNull, runCatching } from '@polyvharmony/media-player-sdk';
2
+ import { PLVPushDowngradePreference, PLVPushOrientation, PLVRTCVideoEncodeParam } from '@polyvharmony/rtc-sdk';
3
+ import { PLVLinkMicBitRate } from '../../../../model/vo/PLVLinkMicBitRate';
4
+ import { DEFAULT_BITRATE_ENCODE_PARAM_TABLE, PLVLinkMicBitRateEncodeParam } from '../../../../model/vo/PLVLinkMicBitRateEncodeParam';
5
+ import { PLVLinkMicPushResolutionRatio } from '../../../../model/vo/PLVLinkMicPushResolutionRatio';
6
+ export class LinkMicTeacherEncodeParamUseCase {
7
+ constructor(c146) {
8
+ this.repo = c146;
9
+ }
10
+ init() {
11
+ this.parseChannelBitRateSetting();
12
+ this.setupDefaultBitRate();
13
+ }
14
+ setBitRate(bitRate) {
15
+ this.repo.mediator.currentBitRate.setValue(bitRate);
16
+ this.updateEncodeParam();
17
+ }
18
+ setPushResolutionRatio(b146) {
19
+ this.repo.mediator.currentPushResolutionRatio.setValue(b146);
20
+ if (!this.isChannelUsePushStreamTemplate()) {
21
+ this.parseChannelBitRateSetting();
22
+ }
23
+ this.updateEncodeParam();
24
+ }
25
+ setPushOrientation(a146) {
26
+ this.repo.mediator.currentPushOrientation.setValue(a146);
27
+ this.updateEncodeParam();
28
+ }
29
+ setPushMirror(z145) {
30
+ this.repo.mediator.currentPushMirror.setValue(z145);
31
+ this.updateEncodeParam();
32
+ }
33
+ setPushDowngradePreference(y145) {
34
+ this.repo.mediator.currentPushDowngradePreference.setValue(y145);
35
+ this.updateEncodeParam();
36
+ }
37
+ updateEncodeParam() {
38
+ const r145 = this.repo.mediator.currentBitRate.value;
39
+ const s145 = this.repo.mediator.channelSupportBitRates.value ?? [PLVLinkMicBitRate.STANDARD];
40
+ let t145 = r145;
41
+ if (t145 === undefined || !s145.includes(t145)) {
42
+ t145 = s145[0];
43
+ }
44
+ if (r145 !== t145) {
45
+ this.setBitRate(t145);
46
+ return;
47
+ }
48
+ const u145 = this.repo.mediator.channelSupportBitRateEncodeParams.value?.find(x145 => x145.bitRate === t145);
49
+ if (u145 === undefined) {
50
+ return;
51
+ }
52
+ this.repo.mediator.currentBitRateEncodeParam.setValue(u145);
53
+ const v145 = new PLVRTCVideoEncodeParam();
54
+ v145.width = u145.videoWidth;
55
+ v145.height = u145.videoHeight;
56
+ v145.frameRate = u145.videoFps;
57
+ v145.targetBitRate = u145.videoBitrate;
58
+ v145.pushOrientation = this.repo.mediator.currentPushOrientation.value ?? PLVPushOrientation.AUTO;
59
+ v145.pushMirror = this.repo.mediator.currentPushMirror.value ?? false;
60
+ v145.pushDowngradePreference = this.repo.mediator.currentPushDowngradePreference.value ?? PLVPushDowngradePreference.PREFER_BETTER_QUALITY;
61
+ this.repo.setLocalVideoEncodeParam(v145);
62
+ }
63
+ parseChannelBitRateSetting() {
64
+ if (this.isChannelUsePushStreamTemplate()) {
65
+ this.parsePushStreamTemplate();
66
+ }
67
+ else {
68
+ this.parseBuiltinBitRateSetting();
69
+ }
70
+ }
71
+ parsePushStreamTemplate() {
72
+ const i145 = requireNotNull(this.repo.mediator.channelData?.streamerData?.pushStreamTemplateJson);
73
+ const j145 = extendArray(i145.VideoParams ?? [])
74
+ .map((o145, index) => {
75
+ const p145 = runCatching(() => {
76
+ const bitRate = new PLVLinkMicBitRate(index, requireNotNull(o145.QualityName));
77
+ return new PLVLinkMicBitRateEncodeParam(bitRate, requireNotNull(o145.VideoFps), requireNotNull(o145.VideoGop), requireNotNull(o145.VideoWidth), requireNotNull(o145.VideoHeight), requireNotNull(o145.VideoBitrate), requireNotNull(o145.ScreenFps), requireNotNull(o145.ScreenGop), requireNotNull(o145.ScreenWidth), requireNotNull(o145.ScreenHeight), requireNotNull(o145.ScreenBitrate));
78
+ });
79
+ return p145.success ? p145.data : null;
80
+ })
81
+ .filterNotNull_ext();
82
+ this.repo.mediator.channelSupportBitRateEncodeParams.setValue(j145);
83
+ const k145 = j145.map(n145 => n145.bitRate);
84
+ this.repo.mediator.channelSupportBitRates.setValue(k145);
85
+ }
86
+ parseBuiltinBitRateSetting() {
87
+ const q144 = requireNotNull(this.repo.mediator.channelData?.streamerData);
88
+ const maxResolution = q144.rtcMaxResolution ?? 0;
89
+ let r144;
90
+ if (isLiteralTrue(q144.appPushResolution1080Enabled) || maxResolution >= 1080) {
91
+ r144 = [PLVLinkMicBitRate.STANDARD, PLVLinkMicBitRate.HIGH, PLVLinkMicBitRate.SUPER, PLVLinkMicBitRate.SUPER_HIGH];
92
+ }
93
+ else if (maxResolution >= 720) {
94
+ r144 = [PLVLinkMicBitRate.STANDARD, PLVLinkMicBitRate.HIGH, PLVLinkMicBitRate.SUPER];
95
+ }
96
+ else if (maxResolution >= 360) {
97
+ r144 = [PLVLinkMicBitRate.STANDARD, PLVLinkMicBitRate.HIGH];
98
+ }
99
+ else {
100
+ r144 = [PLVLinkMicBitRate.STANDARD];
101
+ }
102
+ const s144 = q144.clientParams?.fps ?? 15;
103
+ const t144 = this.repo.mediator.currentPushResolutionRatio.value ?? PLVLinkMicPushResolutionRatio.RATIO_16_9;
104
+ const u144 = extendArray(DEFAULT_BITRATE_ENCODE_PARAM_TABLE)
105
+ .filter(h145 => r144.includes(h145.bitRate))
106
+ .groupBy_ext(g145 => g145.bitRate)
107
+ .filter_ext(f145 => f145[1].length > 0)
108
+ .mapValues_ext(e145 => this.reduceEncodeParams(e145[1], s144, t144))
109
+ .toArray_ext(d145 => d145[1]);
110
+ this.repo.mediator.channelSupportBitRateEncodeParams.setValue(u144);
111
+ const v144 = u144.map(c145 => c145.bitRate);
112
+ this.repo.mediator.channelSupportBitRates.setValue(v144);
113
+ }
114
+ reduceEncodeParams(a144, b144, ratio) {
115
+ const c144 = (a, b) => Math.abs(a - b) < 1e-6;
116
+ const d144 = a144.filter(p144 => p144.videoFps >= b144 && c144(p144.videoWidth / p144.videoHeight, ratio.ratio));
117
+ if (d144.length > 0) {
118
+ if (d144.length === 1) {
119
+ return d144[0];
120
+ }
121
+ else {
122
+ return d144.reduce((n144, o144) => n144.videoFps > o144.videoFps ? o144 : n144);
123
+ }
124
+ }
125
+ const e144 = a144.filter(l144 => c144(l144.videoWidth / l144.videoHeight, ratio.ratio));
126
+ if (e144.length > 0) {
127
+ if (e144.length === 1) {
128
+ return e144[0];
129
+ }
130
+ else {
131
+ return d144.reduce((j144, k144) => j144.videoFps > k144.videoFps ? k144 : j144);
132
+ }
133
+ }
134
+ return a144[0];
135
+ }
136
+ setupDefaultBitRate() {
137
+ if (this.isChannelUsePushStreamTemplate()) {
138
+ const t143 = requireNotNull(this.repo.mediator.channelData?.streamerData?.pushStreamTemplateJson);
139
+ const u143 = t143.VideoParams?.findIndex(z143 => z143.QualityLevel === t143.teacherDefaultQualityLevel);
140
+ const v143 = (this.repo.mediator.channelSupportBitRates.value ?? []).find(y143 => y143.index === u143) ?? PLVLinkMicBitRate.STANDARD;
141
+ this.setBitRate(v143);
142
+ }
143
+ else {
144
+ const s143 = extendArray(this.repo.mediator.channelSupportBitRates.value ?? [])
145
+ .lastOrNull_ext() ?? PLVLinkMicBitRate.STANDARD;
146
+ this.setBitRate(s143);
147
+ }
148
+ }
149
+ isChannelUsePushStreamTemplate() {
150
+ const r143 = this.repo.mediator.channelData?.streamerData;
151
+ return isLiteralTrue(r143?.clientPushStreamTemplateEnabled) && r143?.pushStreamTemplateJson !== undefined;
152
+ }
153
+ }
@@ -0,0 +1,22 @@
1
+ import { PLVRTCClientRole } from '@polyvharmony/rtc-sdk';
2
+ import { PLVLinkMicRepo } from '../../../../model/PLVLinkMicRepo';
3
+ import { PLVLinkMicVideoRenderParam } from '../../../../model/vo/PLVLinkMicVideoRenderParam';
4
+ import { ILinkMicHandleRTCUseCase } from '../base/ILinkMicHandleRTCUseCase';
5
+ export declare class LinkMicTeacherHandleRTCUseCase implements ILinkMicHandleRTCUseCase {
6
+ private readonly repo;
7
+ private observers;
8
+ constructor(l146: PLVLinkMicRepo);
9
+ init(): void;
10
+ joinChannel(): void;
11
+ leaveChannel(): void;
12
+ switchRole(role: PLVRTCClientRole): void;
13
+ enableCamera(enable: boolean): void;
14
+ enableMicrophone(enable: boolean): void;
15
+ enableCameraMicrophoneToLastState(): void;
16
+ switchCamera(): void;
17
+ setLocalRenderMirror(i146: boolean): void;
18
+ setupVideoRender(g146: PLVLinkMicVideoRenderParam): void;
19
+ removeVideoRender(e146: PLVLinkMicVideoRenderParam): void;
20
+ onDestroy(): void;
21
+ private getVideoRenderParam;
22
+ }
@@ -0,0 +1,76 @@
1
+ import { MutableObserver } from '@polyvharmony/media-player-sdk';
2
+ import { PLVRTCClientRole, PLVRTCVideoRenderParam, PLVVideoRenderFitMode } from '@polyvharmony/rtc-sdk';
3
+ import { PLVLinkMicCameraFacing } from '../../../../model/vo/PLVLinkMicCameraFacing';
4
+ import { PLVLinkMicVideoRenderParam } from '../../../../model/vo/PLVLinkMicVideoRenderParam';
5
+ export class LinkMicTeacherHandleRTCUseCase {
6
+ constructor(l146) {
7
+ this.observers = [];
8
+ this.repo = l146;
9
+ }
10
+ init() {
11
+ }
12
+ joinChannel() {
13
+ this.repo.joinRTCChannel();
14
+ this.switchRole(PLVRTCClientRole.BROADCASTER);
15
+ }
16
+ leaveChannel() {
17
+ this.repo.leaveRTCChannel();
18
+ }
19
+ switchRole(role) {
20
+ this.repo.switchRTCRole(role);
21
+ }
22
+ enableCamera(enable) {
23
+ this.repo.enableLocalVideo(enable);
24
+ this.repo.mediator.localLinkMicViewer.value?.isVideoEnable?.setValue(enable);
25
+ }
26
+ enableMicrophone(enable) {
27
+ this.repo.enableLocalAudio(enable);
28
+ this.repo.mediator.localLinkMicViewer.value?.isAudioEnable?.setValue(enable);
29
+ }
30
+ enableCameraMicrophoneToLastState() {
31
+ }
32
+ switchCamera() {
33
+ this.repo.mediator.cameraFacing.value = (this.repo.mediator.cameraFacing.value ?? PLVLinkMicCameraFacing.FRONT).switchNext();
34
+ this.repo.switchCamera();
35
+ }
36
+ setLocalRenderMirror(i146) {
37
+ const j146 = this.repo.mediator.linkmicId;
38
+ if (j146 === undefined) {
39
+ return;
40
+ }
41
+ this.repo.mediator.localRenderMirror.setValue(i146);
42
+ const k146 = this.getVideoRenderParam(j146);
43
+ this.setupVideoRender(new PLVLinkMicVideoRenderParam(j146, k146.viewId));
44
+ }
45
+ setupVideoRender(g146) {
46
+ const h146 = this.getVideoRenderParam(g146.linkmicId);
47
+ h146.viewId = g146.xcomponentId;
48
+ if (this.repo.mediator.isMySocketLinkMicId(g146.linkmicId)) {
49
+ h146.renderMirror = this.repo.mediator.localRenderMirror.value ?? false;
50
+ }
51
+ this.repo.setVideoRender(h146);
52
+ }
53
+ removeVideoRender(e146) {
54
+ const f146 = this.getVideoRenderParam(e146.linkmicId);
55
+ if (e146.xcomponentId === null || f146.viewId === e146.xcomponentId) {
56
+ f146.viewId = null;
57
+ this.repo.setVideoRender(f146);
58
+ }
59
+ }
60
+ onDestroy() {
61
+ MutableObserver.disposeAll(this.observers);
62
+ this.observers = [];
63
+ }
64
+ getVideoRenderParam(d146) {
65
+ let param = this.repo.getVideoRenderParam(d146);
66
+ if (param !== null) {
67
+ return param;
68
+ }
69
+ param = new PLVRTCVideoRenderParam();
70
+ param.linkmicId = d146;
71
+ param.viewId = null;
72
+ param.renderFitMode = PLVVideoRenderFitMode.HIDDEN;
73
+ param.renderMirror = false;
74
+ return param;
75
+ }
76
+ }