@polyvharmony/live-scenes-sdk 1.4.0 → 1.6.0

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 (145) hide show
  1. package/BuildProfile.d.ets +4 -4
  2. package/CHANGELOG.md +42 -0
  3. package/Index.d.ets +3 -0
  4. package/ets/modules.abc +0 -0
  5. package/oh-package.json5 +1 -1
  6. package/package.json +1 -1
  7. package/src/main/ets/common/PLVLiveSceneSDK.d.ets +5 -0
  8. package/src/main/ets/modules/chatroom/PLVChatroomManager.d.ets +22 -13
  9. package/src/main/ets/modules/chatroom/model/IPLVReliableMessageEvent.d.ets +5 -0
  10. package/src/main/ets/modules/chatroom/model/PLVSpeakEvent.d.ets +3 -1
  11. package/src/main/ets/modules/chatroom/playback/model/PLVChatPlaybackDataVO.d.ets +1 -1
  12. package/src/main/ets/modules/chatroom/reliable/PLVReliableMessageCache.d.ets +11 -0
  13. package/src/main/ets/modules/i18n/PLVI18NDataMapper.d.ets +5 -5
  14. package/src/main/ets/modules/interact/PLVInteractManager.d.ets +6 -6
  15. package/src/main/ets/modules/interact/PLVInteractWeb.d.ets +13 -13
  16. package/src/main/ets/modules/interact/PLVStreamerInteractManager.d.ets +18 -0
  17. package/src/main/ets/modules/interact/PLVStreamerInteractWeb.d.ets +17 -0
  18. package/src/main/ets/modules/interact/PLVStreamerInteractWebController.d.ets +14 -0
  19. package/src/main/ets/modules/interact/invitePoster/PLVInteractInvitePoster.d.ets +1 -1
  20. package/src/main/ets/modules/interact/model/PLVFunctionSwitchBean.d.ets +1 -1
  21. package/src/main/ets/modules/interact/pushcard/PLVPushCardManager.d.ets +2 -2
  22. package/src/main/ets/modules/interact/pushcard/model/PLVShowPushCardEvent.d.ets +1 -1
  23. package/src/main/ets/modules/interact/pushcard/repo/PLVCardLookTimeLocalRepository.d.ets +3 -3
  24. package/src/main/ets/modules/linkmic/PLVLinkMicManager.d.ets +34 -15
  25. package/src/main/ets/modules/linkmic/di/PLVLinkMicModule.d.ets +10 -0
  26. package/src/main/ets/modules/linkmic/mediator/PLVLinkMicMediator.d.ets +71 -4
  27. package/src/main/ets/modules/linkmic/mediator/PLVLinkMicRTCEventCallback.d.ets +13 -8
  28. package/src/main/ets/modules/linkmic/model/PLVLinkMicRepo.d.ets +21 -10
  29. package/src/main/ets/modules/linkmic/model/datasource/PLVLinkMicNetworkDataSource.d.ets +8 -4
  30. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRate.d.ets +4 -1
  31. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicBitRateEncodeParam.d.ets +4 -1
  32. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicCameraFacing.d.ets +3 -0
  33. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicChannelStatus.d.ets +3 -0
  34. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicErrorEvent.d.ets +4 -1
  35. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicInteractEvent.d.ets +4 -1
  36. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicMode.d.ets +3 -0
  37. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicPushResolutionRatio.d.ets +4 -1
  38. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCEvent.d.ets +12 -0
  39. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicRTCType.d.ets +5 -1
  40. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicSocketEvent.d.ets +69 -0
  41. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicState.d.ets +3 -0
  42. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicVideoRenderParam.d.ets +4 -1
  43. package/src/main/ets/modules/linkmic/model/vo/PLVLinkMicViewer.d.ets +4 -1
  44. package/src/main/ets/modules/linkmic/viewmodel/PLVLinkMicViewModel.d.ets +75 -16
  45. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicEncodeParamUseCase.d.ets +27 -7
  46. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleQueueOrderUseCase.d.ets +7 -4
  47. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleRTCUseCase.d.ets +24 -7
  48. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicHandleStateUseCase.d.ets +58 -10
  49. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicUpdateChannelViewerUseCase.d.ets +27 -6
  50. package/src/main/ets/modules/linkmic/viewmodel/usecase/LinkMicViewLogUseCase.d.ets +10 -1
  51. package/src/main/ets/modules/linkmic/viewmodel/usecase/PLVLinkMicUseCases.d.ets +7 -1
  52. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicEncodeParamUseCase.d.ets +19 -0
  53. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicHandleRTCUseCase.d.ets +17 -0
  54. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/base/ILinkMicHandleStateUseCase.d.ets +48 -0
  55. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestEncodeParamUseCase.d.ets +26 -6
  56. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleRTCUseCase.d.ets +24 -7
  57. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/guest/LinkMicGuestHandleStateUseCase.d.ets +55 -10
  58. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherEncodeParamUseCase.d.ets +26 -6
  59. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleRTCUseCase.d.ets +24 -7
  60. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/teacher/LinkMicTeacherHandleStateUseCase.d.ets +55 -10
  61. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerEncodeParamUseCase.d.ets +25 -6
  62. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleRTCUseCase.d.ets +24 -7
  63. package/src/main/ets/modules/linkmic/viewmodel/usecase/roles/viewer/LinkMicViewerHandleStateUseCase.d.ets +55 -10
  64. package/src/main/ets/modules/log/elog/PLVELogSender.d.ets +4 -4
  65. package/src/main/ets/modules/log/elog/model/PLVELogDataBean.d.ets +1 -1
  66. package/src/main/ets/modules/login/PLVSceneLoginManager.d.ets +3 -3
  67. package/src/main/ets/modules/login/model/PLVChatDomainVO.d.ets +2 -2
  68. package/src/main/ets/modules/login/model/PLVLiveChannelType.d.ets +1 -1
  69. package/src/main/ets/modules/login/model/PLVLiveDetailVO.d.ets +1 -1
  70. package/src/main/ets/modules/login/model/PLVLiveStatus.d.ets +1 -1
  71. package/src/main/ets/modules/login/model/PLVLiveStatusVO.d.ets +2 -2
  72. package/src/main/ets/modules/login/model/PLVLoginLiveResult.d.ets +1 -1
  73. package/src/main/ets/modules/login/model/PLVLoginPlaybackResult.d.ets +1 -1
  74. package/src/main/ets/modules/login/model/PLVLoginType.d.ets +2 -2
  75. package/src/main/ets/modules/member/PLVMemberManager.d.ets +3 -3
  76. package/src/main/ets/modules/member/mediator/PLVMemberMediator.d.ets +3 -3
  77. package/src/main/ets/modules/member/model/PLVMemberRepo.d.ets +2 -2
  78. package/src/main/ets/modules/member/model/datasource/PLVMemberNetworkDataSource.d.ets +2 -2
  79. package/src/main/ets/modules/member/model/vo/PLVMemberChannelViewer.d.ets +1 -1
  80. package/src/main/ets/modules/member/model/vo/PLVMemberErrorEvent.d.ets +1 -1
  81. package/src/main/ets/modules/member/viewmodel/PLVMemberViewModel.d.ets +3 -3
  82. package/src/main/ets/modules/member/viewmodel/usecase/MemberHandleStateUseCase.d.ets +6 -6
  83. package/src/main/ets/modules/member/viewmodel/usecase/MemberUpdateViewerUseCase.d.ets +9 -9
  84. package/src/main/ets/modules/member/viewmodel/usecase/PLVMemberUseCases.d.ets +1 -1
  85. package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestHandleStateUseCase.d.ets +6 -6
  86. package/src/main/ets/modules/member/viewmodel/usecase/roles/guest/MemberGuestUpdateViewerUseCase.d.ets +9 -9
  87. package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherHandleStateUseCase.d.ets +6 -6
  88. package/src/main/ets/modules/member/viewmodel/usecase/roles/teacher/MemberTeacherUpdateViewerUseCase.d.ets +9 -9
  89. package/src/main/ets/modules/net/PLVApiChatPlvNetApi.d.ets +10 -10
  90. package/src/main/ets/modules/net/PLVApiPlvNetApi.d.ets +31 -30
  91. package/src/main/ets/modules/net/PLVELogPlvNetApi.d.ets +2 -2
  92. package/src/main/ets/modules/net/PLVLiveImagesVideoNetApi.d.ets +3 -3
  93. package/src/main/ets/modules/net/PLVNGBPushApi.d.ets +2 -2
  94. package/src/main/ets/modules/net/PLVRtasVideoNetApi.d.ets +2 -2
  95. package/src/main/ets/modules/player/PLVPlayerManager.d.ets +3 -3
  96. package/src/main/ets/modules/player/PLVPlayerMediator.d.ets +1 -1
  97. package/src/main/ets/modules/player/playback/PLVPreviousManager.d.ets +5 -5
  98. package/src/main/ets/modules/ppt/PLVPPTWebController.d.ets +6 -6
  99. package/src/main/ets/modules/product/PLVProductManager.d.ets +5 -5
  100. package/src/main/ets/modules/product/components/PLVProductControlWeb.d.ets +1 -1
  101. package/src/main/ets/modules/product/components/PLVProductWeb.d.ets +1 -1
  102. package/src/main/ets/modules/product/model/PLVProductContentBean.d.ets +1 -1
  103. package/src/main/ets/modules/product/model/PLVProductDataBean.d.ets +1 -1
  104. package/src/main/ets/modules/redpack/PLVRedpackManager.d.ets +9 -9
  105. package/src/main/ets/modules/redpack/database/PLVRedpackCacheVO.d.ets +1 -1
  106. package/src/main/ets/modules/redpack/database/PLVRedpackLocalDataSource.d.ets +4 -4
  107. package/src/main/ets/modules/redpack/database/PLVRedpackOpenHelper.d.ets +4 -4
  108. package/src/main/ets/modules/reward/PLVRewardManager.d.ets +2 -2
  109. package/src/main/ets/modules/reward/model/PLVRewardPointVO.d.ets +1 -1
  110. package/src/main/ets/modules/socket/PLVSocketManager.d.ets +8 -8
  111. package/src/main/ets/modules/socket/PLVSocketMediator.d.ets +7 -7
  112. package/src/main/ets/modules/socket/model/PLVSocketEventConstants.d.ets +4 -0
  113. package/src/main/ets/modules/socket/model/PLVSocketUserBean.d.ets +5 -5
  114. package/src/main/ets/modules/socket/model/redpack/RedPaperReceiveType.d.ets +4 -4
  115. package/src/main/ets/modules/streamer/PLVStreamerManager.d.ets +28 -9
  116. package/src/main/ets/modules/streamer/di/PLVStreamerModule.d.ets +7 -0
  117. package/src/main/ets/modules/streamer/mediator/PLVStreamerMediator.d.ets +19 -2
  118. package/src/main/ets/modules/streamer/model/PLVStreamerRepo.d.ets +27 -10
  119. package/src/main/ets/modules/streamer/model/datasource/PLVStreamerLocalDataSource.d.ets +5 -2
  120. package/src/main/ets/modules/streamer/model/datasource/PLVStreamerNetworkDataSource.d.ets +19 -10
  121. package/src/main/ets/modules/streamer/model/vo/PLVStreamerErrorEvent.d.ets +4 -1
  122. package/src/main/ets/modules/streamer/model/vo/PLVStreamerLiveStatusResponseVO.d.ts +3 -0
  123. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionResponse.d.ets +3 -0
  124. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixActionVO.d.ets +27 -0
  125. package/src/main/ets/modules/streamer/model/vo/PLVStreamerMixLayoutType.d.ets +3 -0
  126. package/src/main/ets/modules/streamer/model/vo/PLVStreamerSessionIdQueryResponse.d.ets +3 -0
  127. package/src/main/ets/modules/streamer/model/vo/PLVStreamerSocketEvent.d.ets +21 -0
  128. package/src/main/ets/modules/streamer/model/vo/PLVStreamerState.d.ets +3 -0
  129. package/src/main/ets/modules/streamer/viewmodel/PLVStreamerViewModel.d.ets +50 -9
  130. package/src/main/ets/modules/streamer/viewmodel/usecase/PLVStreamerUseCases.d.ets +7 -1
  131. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerHandleStateUseCase.d.ets +17 -2
  132. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerMixStreamUseCase.d.ets +11 -2
  133. package/src/main/ets/modules/streamer/viewmodel/usecase/StreamerUpdateSplashImageUseCase.d.ets +8 -2
  134. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/base/IStreamerHandleStateUseCase.d.ets +15 -0
  135. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/base/IStreamerMixStreamUseCase.d.ets +9 -0
  136. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestHandleStateUseCase.d.ets +14 -2
  137. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/guest/StreamerGuestMixStreamUseCase.d.ets +11 -2
  138. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherHandleStateUseCase.d.ets +17 -2
  139. package/src/main/ets/modules/streamer/viewmodel/usecase/roles/teacher/StreamerTeacherMixStreamUseCase.d.ets +11 -2
  140. package/src/main/ets/modules/web/PLVSocketWebController.d.ets +4 -4
  141. package/src/main/ets/modules/web/PLVWebControllerManager.d.ets +8 -2
  142. package/src/main/ets/modules/web/PLVWebParams.d.ets +1 -1
  143. package/src/main/ets/modules/web/qa/PLVQAWeb.d.ets +1 -1
  144. package/src/main/ets/modules/web/tuwen/PLVTuwenWeb.d.ets +1 -1
  145. package/src/main/module.json +1 -1
@@ -18,58 +18,125 @@ import { PLVLinkMicPushResolutionRatio } from '../model/vo/PLVLinkMicPushResolut
18
18
  import { PLVLinkMicRTCEvent } from '../model/vo/PLVLinkMicRTCEvent';
19
19
  import { PLVLinkMicState } from '../model/vo/PLVLinkMicState';
20
20
  import { PLVLinkMicViewer } from '../model/vo/PLVLinkMicViewer';
21
+ /**
22
+ * 模块内状态中介,集中保存跨用例共享状态并桥接外部模块
23
+ */
21
24
  export declare class PLVLinkMicMediator implements LifecycleAwareDependComponent {
25
+ /** 当前登录频道、用户、角色等全局频道数据。 */
22
26
  channelData: PLVChannelData | null;
27
+ /** 聊天室 socket 中介,用于监听和发送连麦协议事件。 */
23
28
  socketMediator: PLVSocketMediator | null;
29
+ /** 播放器中介,用于连麦时暂停/恢复播放器或同步播放状态。 */
24
30
  playerMediator: PLVPlayerMediator | null;
31
+ /** 成员模块中介,用于查找用户资料和复用成员模块的连麦操作。 */
25
32
  memberMediator: PLVMemberMediator | null;
33
+ /** 连麦模块初始化完成信号,外部动作需等待该 Promise 后再执行。 */
26
34
  readonly initFinish: {
27
35
  promise: Promise<void>;
28
36
  resolve: (value: void | PromiseLike<void>) => void;
29
37
  reject: (reason?: any) => void;
30
38
  };
39
+ /** 本地当前连麦状态。 */
31
40
  readonly linkmicState: MutableState<PLVLinkMicState>;
41
+ /** 观众申请连麦后的排队序号,-1 表示当前没有排队。 */
32
42
  readonly joinLinkMicWaitingQueueOrder: MutableState<number>;
43
+ /** 讲师邀请连麦的过期时间戳,用于 UI 倒计时。 */
33
44
  readonly invitationExpireTimestamp: MutableState<number>;
45
+ /** SDK 是否支持当前频道配置下的连麦能力。 */
34
46
  readonly sdkSupportChannelLinkMic: MutableState<boolean>;
47
+ /** SDK 是否支持当前频道配置下的屏幕分享能力。 */
48
+ readonly sdkSupportScreenCapture: MutableState<boolean>;
49
+ /** 本地是否正在进行屏幕分享。 */
50
+ readonly isStartScreenCapture: MutableState<boolean>;
51
+ /** 频道是否允许连麦能力。 */
35
52
  readonly channelAllowLinkMic: MutableState<boolean>;
53
+ /** 频道是否允许观众举手申请连麦。 */
36
54
  readonly channelAllowRequestHandsUpLinkMic: MutableState<boolean>;
55
+ /** 当前频道连麦模式,视频连麦或音频连麦。 */
37
56
  readonly channelLinkMicMode: MutableState<PLVLinkMicMode>;
57
+ /** 本地用户对应的连麦成员信息。 */
38
58
  readonly localLinkMicViewer: MutableState<PLVLinkMicViewer>;
59
+ /** 当前频道正在连麦的成员列表。 */
39
60
  readonly channelLinkMicViewers: MutableState<PLVLinkMicViewer[]>;
61
+ /** 当前第一画面用户的 linkMicId。 */
40
62
  readonly channelMainViewLinkMicId: MutableState<string>;
63
+ /** RTC 网络质量概览。 */
41
64
  readonly linkmicNetworkQuality: MutableState<PLVNetworkQuality>;
65
+ /** RTC 网络上下行统计信息。 */
42
66
  readonly linkmicNetworkStatistics: MutableState<PLVNetworkStatistics>;
67
+ /** 当前推流画面比例。 */
43
68
  readonly currentPushResolutionRatio: MutableState<PLVLinkMicPushResolutionRatio>;
69
+ /** 当前推流方向。 */
44
70
  readonly currentPushOrientation: MutableState<PLVPushOrientation>;
71
+ /** 当前推流清晰度档位。 */
45
72
  readonly currentBitRate: MutableState<PLVLinkMicBitRate>;
73
+ /** 频道支持的推流清晰度档位。 */
46
74
  readonly channelSupportBitRates: MutableState<PLVLinkMicBitRate[]>;
75
+ /** 当前清晰度对应的 RTC 编码参数。 */
47
76
  readonly currentBitRateEncodeParam: MutableState<PLVLinkMicBitRateEncodeParam>;
77
+ /** 频道支持的所有 RTC 编码参数。 */
48
78
  readonly channelSupportBitRateEncodeParams: MutableState<PLVLinkMicBitRateEncodeParam[]>;
79
+ /** 弱网时推流降级策略。 */
49
80
  readonly currentPushDowngradePreference: MutableState<PLVPushDowngradePreference>;
81
+ /** 当前使用的摄像头方向。 */
50
82
  readonly cameraFacing: MutableState<PLVLinkMicCameraFacing>;
83
+ /** 本地预览画面是否镜像。 */
51
84
  readonly localRenderMirror: MutableState<boolean>;
85
+ /** RTC 推流画面是否镜像。 */
52
86
  readonly currentPushMirror: MutableState<boolean>;
87
+ /** 是否使用新版连麦策略。新版策略会区分“讲师 RTC 能力”和“观众举手入口”。 */
53
88
  readonly isLinkMicStrategyV2: MutableState<boolean>;
89
+ /** RTC 层事件透出,例如远端用户发布/取消发布流。 */
54
90
  readonly rtcEvent: MutableEvent<PLVLinkMicRTCEvent>;
91
+ /** 讲师挂断本地连麦事件。 */
55
92
  readonly teacherHangUpLinkMicEvent: MutableEvent<number>;
93
+ /** 成员加入连麦事件。 */
56
94
  readonly viewerJoinLinkMicEvent: MutableEvent<PLVLinkMicViewer[]>;
95
+ /** 成员离开连麦事件。 */
57
96
  readonly viewerLeaveLinkMicEvent: MutableEvent<PLVLinkMicViewer[]>;
97
+ /** 观众响应讲师邀请事件。 */
58
98
  readonly viewerAnswerInvitationEvent: MutableEvent<PLVLinkMicAnswerInvitationEvent>;
99
+ /** 连麦模块统一错误事件。 */
59
100
  readonly errorEvent: MutableEvent<PLVLinkMicErrorEvent>;
101
+ /** 当前用户在 RTC/socket 协议中的连麦 ID。部分场景下它和 viewerId 不一致。 */
60
102
  linkmicId: string | undefined;
103
+ /** linkmicId 是否和 viewerId 不一致。为 true 时匹配自己需要同时兼容两个 ID。 */
61
104
  linkmicIdDifferFromViewerId: boolean;
105
+ /** 推流开始时由 streamer 模块回调,驱动讲师/嘉宾进入连麦状态。 */
62
106
  onStreamerStart: (() => void) | undefined;
107
+ /** 直播开始 socket 事件回调。 */
63
108
  onLiveStreamStart: (() => void) | undefined;
109
+ /** 直播停止 socket 事件回调。 */
64
110
  onLiveStreamStop: (() => void) | undefined;
111
+ /** 推流停止时由 streamer 模块回调,驱动连麦清理。 */
65
112
  onStreamerStop: (() => void) | undefined;
113
+ /** 推流模块回调到连麦编码用例,用于更新码率。 */
66
114
  setBitRate: ((bitRate: PLVLinkMicBitRate) => void) | undefined;
115
+ /** 推流模块回调到连麦编码用例,用于更新画面比例。 */
67
116
  setPushResolutionRatio: ((pushResolutionRatio: PLVLinkMicPushResolutionRatio) => void) | undefined;
117
+ /** 推流模块回调到连麦编码用例,用于更新推流方向。 */
68
118
  setPushOrientation: ((pushOrientation: PLVPushOrientation) => void) | undefined;
119
+ /** 推流模块回调到连麦编码用例,用于更新弱网降级策略。 */
69
120
  setPushDowngradePreference: ((preference: PLVPushDowngradePreference) => void) | undefined;
70
- reportError(g20: number, h20: string): void;
71
- isMySocketLinkMicId(d20: string | undefined | null): boolean;
72
- findViewerByLinkMicId(b20?: string | null): PLVLinkMicViewer | undefined;
73
- findViewerByViewerId(z19?: string | null): PLVLinkMicViewer | undefined;
121
+ /** 推流模块回调到连麦 RTC 用例,用于开始屏幕分享。 */
122
+ startScreenCapture: (() => number) | undefined;
123
+ /** 推流模块回调到连麦 RTC 用例,用于停止屏幕分享。 */
124
+ stopScreenCapture: (() => number) | undefined;
125
+ /**
126
+ * 统一上报模块错误事件,便于业务层监听和展示。
127
+ */
128
+ reportError(q21: number, r21: string): void;
129
+ isMySocketLinkMicId(n21: string | undefined | null): boolean;
130
+ /**
131
+ * 按 linkMicId 查找当前频道连麦成员。
132
+ */
133
+ findViewerByLinkMicId(l21?: string | null): PLVLinkMicViewer | undefined;
134
+ /**
135
+ * 按 viewerId 查找当前频道连麦成员。
136
+ */
137
+ findViewerByViewerId(j21?: string | null): PLVLinkMicViewer | undefined;
138
+ /**
139
+ * 释放当前对象持有的监听、定时器和临时状态,避免页面退出后继续收到回调。
140
+ */
74
141
  onDestroy(): void;
75
142
  }
@@ -2,15 +2,20 @@
2
2
  // @ts-nocheck
3
3
  import { PLVRTCConfig, PLVRTCEngineEventCallback, PLVRTCMediaState, PLVRTCNetworkQuality, PLVRTCNetworkStatistics } from '@polyvharmony/rtc-sdk';
4
4
  import { PLVLinkMicMediator } from './PLVLinkMicMediator';
5
+ /**
6
+ * 业务模型,承载当前模块内的结构化数据
7
+ */
5
8
  export declare class PLVLinkMicRTCEventCallback extends PLVRTCEngineEventCallback {
6
9
  private readonly mediator;
7
- constructor(c21: PLVLinkMicMediator);
8
- onJoinChannelSuccess(z20: PLVRTCConfig, a21: string): void;
9
- onUserMediaStateChanged(w20: string, x20: PLVRTCMediaState): void;
10
- onTokenExpired(t20: string | undefined, u20: PLVRTCConfig): void;
11
- onNetworkQuality(p20: string, q20: PLVRTCNetworkQuality, r20: PLVRTCNetworkQuality): void;
12
- onNetworkStatistics(n20: PLVRTCNetworkStatistics): void;
13
- onKickOut(l20: number): void;
14
- onError(j20: number, k20: string): void;
10
+ constructor(m22: PLVLinkMicMediator);
11
+ onJoinChannelSuccess(j22: PLVRTCConfig, k22: string): void;
12
+ onScreenCaptureStarted(): void;
13
+ onScreenCaptureStoped(): void;
14
+ onUserMediaStateChanged(g22: string, h22: PLVRTCMediaState): void;
15
+ onTokenExpired(d22: string | undefined, e22: PLVRTCConfig): void;
16
+ onNetworkQuality(z21: string, a22: PLVRTCNetworkQuality, b22: PLVRTCNetworkQuality): void;
17
+ onNetworkStatistics(x21: PLVRTCNetworkStatistics): void;
18
+ onKickOut(v21: number): void;
19
+ onError(t21: number, u21: string): void;
15
20
  private convertNetworkQuality;
16
21
  }
@@ -6,12 +6,18 @@ import { PLVLinkMicNetworkDataSource } from './datasource/PLVLinkMicNetworkDataS
6
6
  import { PLVRTCClientRole, PLVRTCMediaState, PLVRTCRenderViewParam, PLVRTCVideoEncodeParam, PLVRTCVideoRenderParam } from '@polyvharmony/rtc-sdk';
7
7
  import { PLVLinkMicChannelStatus } from './vo/PLVLinkMicChannelStatus';
8
8
  import { PLVLiveViewLogVO } from '../../business/model/PLVLiveViewLogVO';
9
+ /**
10
+ * 模块数据仓库,封装 mediator、网络数据源、本地数据源和 RTC 依赖的访问入口
11
+ */
9
12
  export declare class PLVLinkMicRepo implements LifecycleAwareDependComponent {
10
13
  readonly mediator: PLVLinkMicMediator;
11
14
  private readonly networkDataSource;
12
15
  private readonly rtcConfig;
13
16
  private rtcEngine;
14
- constructor(v23: PLVLinkMicMediator, w23: PLVLinkMicNetworkDataSource);
17
+ constructor(p25: PLVLinkMicMediator, q25: PLVLinkMicNetworkDataSource);
18
+ /**
19
+ * 初始化当前用例或模块,注册依赖、状态监听和 socket/RTC 回调。
20
+ */
15
21
  init(): Promise<void>;
16
22
  private initLinkMicId;
17
23
  private initRtcEngine;
@@ -19,18 +25,23 @@ export declare class PLVLinkMicRepo implements LifecycleAwareDependComponent {
19
25
  private initLinkMicStrategy;
20
26
  getChannelLinkMicStatus(): Promise<PLVLinkMicChannelStatus>;
21
27
  sendLinkMicIdRelation(): Promise<void>;
22
- sendLiveViewLog(z22: PLVLiveViewLogVO): Promise<void>;
28
+ sendLiveViewLog(t24: PLVLiveViewLogVO): Promise<void>;
23
29
  joinRTCChannel(): void;
24
- switchRTCRole(w22: PLVRTCClientRole): void;
25
- enableLocalVideo(v22: boolean): void;
26
- enableLocalAudio(u22: boolean): void;
30
+ switchRTCRole(q24: PLVRTCClientRole): void;
31
+ startScreenCapture(): number;
32
+ stopScreenCapture(): number;
33
+ enableLocalVideo(p24: boolean): void;
34
+ enableLocalAudio(o24: boolean): void;
27
35
  switchCamera(): void;
28
- setLocalVideoEncodeParam(t22: PLVRTCVideoEncodeParam): void;
29
- setVideoRender(s22: PLVRTCVideoRenderParam): void;
30
- getVideoRenderParam(r22: string): PLVRTCVideoRenderParam | null;
31
- createRenderViewParam(q22: string): PLVRTCRenderViewParam | undefined;
32
- getRemoteViewerMediaState(p22: string): PLVRTCMediaState | undefined;
36
+ setLocalVideoEncodeParam(n24: PLVRTCVideoEncodeParam): void;
37
+ setVideoRender(m24: PLVRTCVideoRenderParam): void;
38
+ getVideoRenderParam(l24: string): PLVRTCVideoRenderParam | null;
39
+ createRenderViewParam(k24: string): PLVRTCRenderViewParam | undefined;
40
+ getRemoteViewerMediaState(j24: string): PLVRTCMediaState | undefined;
33
41
  renewToken(): Promise<void>;
34
42
  leaveRTCChannel(): void;
43
+ /**
44
+ * 释放当前对象持有的监听、定时器和临时状态,避免页面退出后继续收到回调。
45
+ */
35
46
  onDestroy(): Promise<void>;
36
47
  }
@@ -4,15 +4,19 @@ import { PLVLinkMicMediator } from '../../mediator/PLVLinkMicMediator';
4
4
  import { PLVRTCAppToken } from '@polyvharmony/rtc-sdk';
5
5
  import { PLVLinkMicChannelStatus } from '../vo/PLVLinkMicChannelStatus';
6
6
  import { PLVLiveViewLogVO } from '../../../business/model/PLVLiveViewLogVO';
7
+ /**
8
+ * 网络数据源,负责调用服务端接口并屏蔽接口细节
9
+ */
7
10
  export declare class PLVLinkMicNetworkDataSource {
8
11
  private readonly mediator;
9
- constructor(n22: PLVLinkMicMediator);
10
- getChannelLinkMicStatus(h22: string, i22: string): Promise<PLVLinkMicChannelStatus>;
12
+ constructor(h24: PLVLinkMicMediator);
13
+ getChannelLinkMicStatus(b24: string, c24: string): Promise<PLVLinkMicChannelStatus>;
11
14
  getLinkMicToken(): Promise<PLVRTCAppToken>;
12
- sendLinkMicIdRelation(a22: string, b22: string, c22: string): Promise<void>;
13
- sendLiveViewLog(z21: PLVLiveViewLogVO): Promise<void>;
15
+ sendLinkMicIdRelation(u23: string, v23: string, w23: string): Promise<void>;
16
+ sendLiveViewLog(t23: PLVLiveViewLogVO): Promise<void>;
14
17
  private getARTCLinkMicToken;
15
18
  private getTRTCLinkMicToken;
19
+ private getVRTCLinkMicToken;
16
20
  private createLinkMicStatisticsData;
17
21
  private get api_polyv_net();
18
22
  private get rtas_videocc_net();
@@ -1,9 +1,12 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 码率档位模型,描述频道支持的推流清晰度档位
5
+ */
3
6
  export declare class PLVLinkMicBitRate {
4
7
  readonly index: number;
5
8
  readonly name: string | Resource;
6
- constructor(x23: number, y23: string | Resource);
9
+ constructor(r25: number, s25: string | Resource);
7
10
  get nameString(): string;
8
11
  static STANDARD: PLVLinkMicBitRate;
9
12
  static HIGH: PLVLinkMicBitRate;
@@ -1,6 +1,9 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
3
  import { PLVLinkMicBitRate } from './PLVLinkMicBitRate';
4
+ /**
5
+ * 码率编码参数模型,描述 RTC 推流所需的视频编码配置
6
+ */
4
7
  export declare class PLVLinkMicBitRateEncodeParam {
5
8
  readonly bitRate: PLVLinkMicBitRate;
6
9
  readonly videoFps: number;
@@ -13,6 +16,6 @@ export declare class PLVLinkMicBitRateEncodeParam {
13
16
  readonly screenWidth: number;
14
17
  readonly screenHeight: number;
15
18
  readonly screenBitrate: number;
16
- constructor(z23: PLVLinkMicBitRate, a24: number, b24: number, c24: number, d24: number, e24: number, f24: number, g24: number, h24: number, i24: number, j24: number);
19
+ constructor(t25: PLVLinkMicBitRate, u25: number, v25: number, w25: number, x25: number, y25: number, z25: number, a26: number, b26: number, c26: number, d26: number);
17
20
  }
18
21
  export declare const DEFAULT_BITRATE_ENCODE_PARAM_TABLE: PLVLinkMicBitRateEncodeParam[];
@@ -1,5 +1,8 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 业务模型,承载当前模块内的结构化数据
5
+ */
3
6
  export declare class PLVLinkMicCameraFacing {
4
7
  private constructor();
5
8
  /**
@@ -1,5 +1,8 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 业务模型,承载当前模块内的结构化数据
5
+ */
3
6
  export declare class PLVLinkMicChannelStatus {
4
7
  master?: string | null;
5
8
  microphoneStatus?: string | null;
@@ -1,5 +1,8 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 错误事件枚举,定义模块内部向外透出的错误类型
5
+ */
3
6
  export declare class PLVLinkMicErrorEvent {
4
7
  /**
5
8
  * 连麦模块初始化失败
@@ -15,5 +18,5 @@ export declare class PLVLinkMicErrorEvent {
15
18
  static readonly RTC_ENGINE_ERROR = 10;
16
19
  readonly code: number;
17
20
  readonly message: string;
18
- constructor(k24: number, l24: string);
21
+ constructor(e26: number, f26: string);
19
22
  }
@@ -1,8 +1,11 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
3
  import { PLVMemberChannelViewer } from "../../../member/model/vo/PLVMemberChannelViewer";
4
+ /**
5
+ * 连麦交互事件模型,描述邀请、响应等 UI 可感知事件
6
+ */
4
7
  export declare class PLVLinkMicAnswerInvitationEvent {
5
8
  readonly viewer: PLVMemberChannelViewer;
6
9
  readonly accept: boolean;
7
- constructor(m24: PLVMemberChannelViewer, n24: boolean);
10
+ constructor(g26: PLVMemberChannelViewer, h26: boolean);
8
11
  }
@@ -1,5 +1,8 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 模式枚举,定义业务可选工作模式
5
+ */
3
6
  export declare enum PLVLinkMicMode {
4
7
  /**
5
8
  * 音频连麦
@@ -1,10 +1,13 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 业务模型,承载当前模块内的结构化数据
5
+ */
3
6
  export declare class PLVLinkMicPushResolutionRatio {
4
7
  readonly width: number;
5
8
  readonly height: number;
6
9
  readonly ratio: number;
7
- constructor(o24: number, p24: number);
10
+ constructor(i26: number, j26: number);
8
11
  static RATIO_16_9: PLVLinkMicPushResolutionRatio;
9
12
  static RATIO_4_3: PLVLinkMicPushResolutionRatio;
10
13
  }
@@ -1,16 +1,28 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
3
  import { PLVRTCConfig } from '@polyvharmony/rtc-sdk';
4
+ /**
5
+ * 业务模型,承载当前模块内的结构化数据
6
+ */
4
7
  export declare class PLVLinkMicRTCEvent {
5
8
  }
9
+ /**
10
+ * 业务模型,承载当前模块内的结构化数据
11
+ */
6
12
  export declare class PLVLinkMicRTCJoinSuccess extends PLVLinkMicRTCEvent {
7
13
  rtcConfig?: PLVRTCConfig;
8
14
  channelId?: string;
9
15
  }
16
+ /**
17
+ * 业务模型,承载当前模块内的结构化数据
18
+ */
10
19
  export declare class PLVLinkMicRTCTokenExpired extends PLVLinkMicRTCEvent {
11
20
  rtcConfig?: PLVRTCConfig;
12
21
  channelId?: string;
13
22
  }
23
+ /**
24
+ * 业务模型,承载当前模块内的结构化数据
25
+ */
14
26
  export declare class PLVLinkMicRTCKickOut extends PLVLinkMicRTCEvent {
15
27
  code?: number;
16
28
  }
@@ -1,6 +1,10 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 业务模型,承载当前模块内的结构化数据
5
+ */
3
6
  export declare enum PLVLinkMicRTCType {
4
7
  ARTC = "agora",
5
- TRTC = "trtc"
8
+ TRTC = "trtc",
9
+ VRTC = "volc"
6
10
  }
@@ -1,41 +1,65 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
3
  import { PLVSocketUserRecv, PLVSocketUserSend } from '../../../socket/model/PLVSocketUserBean';
4
+ /**
5
+ * 观众响应连麦邀请发送模型
6
+ */
4
7
  export declare class PLVLinkMicSocketJoinAnswerSend {
5
8
  user?: PLVSocketUserSend | null;
6
9
  roomId?: string | null;
7
10
  status?: number | null;
8
11
  }
12
+ /**
13
+ * 观众响应连麦邀请接收模型
14
+ */
9
15
  export declare class PLVLinkMicSocketJoinAnswerRecv {
10
16
  status?: number | null;
11
17
  userId?: string | null;
12
18
  result?: boolean | null;
13
19
  isAutoAnswer?: boolean | null;
14
20
  }
21
+ /**
22
+ * 连麦邀请倒计时/过期时间发送模型
23
+ */
15
24
  export declare class PLVLinkMicSocketJoinAnswerTTLSend {
16
25
  userId?: string | null;
17
26
  roomId?: string | null;
18
27
  sessionId?: string | null;
19
28
  }
29
+ /**
30
+ * 成员离开连麦接收模型
31
+ */
20
32
  export declare class PLVLinkMicSocketJoinLeaveRecv {
21
33
  user?: PLVSocketUserRecv | null;
22
34
  isLeaveMic?: number | null;
23
35
  requestIndex?: number | null;
24
36
  roomId?: string | null;
25
37
  }
38
+ /**
39
+ * 成员离开连麦发送模型
40
+ */
26
41
  export declare class PLVLinkMicSocketJoinLeaveSend {
27
42
  user?: PLVSocketUserSend | null;
28
43
  roomId?: string | null;
29
44
  }
45
+ /**
46
+ * 观众举手申请连麦接收模型
47
+ */
30
48
  export declare class PLVLinkMicSocketJoinRequestRecv {
31
49
  user?: PLVSocketUserRecv | null;
32
50
  requestIndex?: number | null;
33
51
  roomId?: string | null;
34
52
  }
53
+ /**
54
+ * 观众举手申请连麦发送模型
55
+ */
35
56
  export declare class PLVLinkMicSocketJoinRequestSend {
36
57
  user?: PLVSocketUserSend | null;
37
58
  roomId?: string | null;
38
59
  }
60
+ /**
61
+ * 讲师接受或拒绝连麦申请接收模型
62
+ */
39
63
  export declare class PLVLinkMicSocketJoinResponseRecv {
40
64
  user?: PLVSocketUserRecv | null;
41
65
  roomId?: string | null;
@@ -45,6 +69,9 @@ export declare class PLVLinkMicSocketJoinResponseRecv {
45
69
  needAnswer?: number | boolean | string | null;
46
70
  isNeedAnswer(): boolean;
47
71
  }
72
+ /**
73
+ * 讲师接受或拒绝连麦申请发送模型
74
+ */
48
75
  export declare class PLVLinkMicSocketJoinResponseSend {
49
76
  user?: PLVSocketUserSend | null;
50
77
  roomId?: string | null;
@@ -52,23 +79,35 @@ export declare class PLVLinkMicSocketJoinResponseSend {
52
79
  toEmitAll?: number | null;
53
80
  needAnswer?: number | null;
54
81
  }
82
+ /**
83
+ * 成员成功加入连麦接收模型
84
+ */
55
85
  export declare class PLVLinkMicSocketJoinSuccessRecv {
56
86
  user?: PLVSocketUserRecv | null;
57
87
  roomId?: string | null;
58
88
  sessionId?: string | null;
59
89
  requestIndex?: number | null;
60
90
  }
91
+ /**
92
+ * 成员成功加入连麦发送模型
93
+ */
61
94
  export declare class PLVLinkMicSocketJoinSuccessSend {
62
95
  user?: PLVSocketUserSend | null;
63
96
  roomId?: string | null;
64
97
  sessionId?: string | null;
65
98
  }
99
+ /**
100
+ * 频道连麦开关和连麦模式同步接收模型
101
+ */
66
102
  export declare class PLVLinkMicSocketOpenMicrophoneRecv {
67
103
  roomId?: string | null;
68
104
  status?: string | null;
69
105
  type?: string | null;
70
106
  userId?: string | null;
71
107
  }
108
+ /**
109
+ * 频道连麦开关和连麦模式同步发送模型
110
+ */
72
111
  export declare class PLVLinkMicSocketOpenMicrophoneSend {
73
112
  EVENT: string;
74
113
  roomId?: string | null;
@@ -77,12 +116,21 @@ export declare class PLVLinkMicSocketOpenMicrophoneSend {
77
116
  userId?: string | null;
78
117
  type?: string | null;
79
118
  }
119
+ /**
120
+ * 连麦邀请倒计时/过期时间确认回包模型
121
+ */
80
122
  export declare class PLVLinkMicSocketJoinAnswerTTLAck {
81
123
  message?: number[] | null;
82
124
  }
125
+ /**
126
+ * PLVLinkMicSocketMicSettingSend 发送模型
127
+ */
83
128
  export declare class PLVLinkMicSocketMicSettingSend {
84
129
  EVENT: string;
85
130
  }
131
+ /**
132
+ * PLVLinkMicSocketMicSettingAck 确认回包模型
133
+ */
86
134
  export declare class PLVLinkMicSocketMicSettingAck {
87
135
  message?: PLVLinkMicSocketMicSettingAckMessage[] | null;
88
136
  }
@@ -96,23 +144,35 @@ declare class PLVLinkMicSocketMicSettingAckMessageData {
96
144
  status?: string | null;
97
145
  type?: string | null;
98
146
  }
147
+ /**
148
+ * 第一画面切换接收模型
149
+ */
99
150
  export declare class PLVLinkMicSocketSwitchViewRecv {
100
151
  socketId?: string | null;
101
152
  roomId?: string | null;
102
153
  userId?: string | null;
103
154
  }
155
+ /**
156
+ * 第一画面切换发送模型
157
+ */
104
158
  export declare class PLVLinkMicSocketSwitchViewSend {
105
159
  emitMode?: number | null;
106
160
  roomId?: string | null;
107
161
  userId?: string | null;
108
162
  socketId?: string | null;
109
163
  }
164
+ /**
165
+ * PLVLinkMicSocketMuteUserMicroRecv 接收模型
166
+ */
110
167
  export declare class PLVLinkMicSocketMuteUserMicroRecv {
111
168
  socketId?: string | null;
112
169
  userId?: string | null;
113
170
  type?: string | null;
114
171
  mute?: boolean | null;
115
172
  }
173
+ /**
174
+ * 讲师控制成员摄像头或麦克风开关发送模型
175
+ */
116
176
  export declare class PLVLinkMicSocketMuteUserMediaSend {
117
177
  EVENT: string;
118
178
  sessionId?: string | null;
@@ -121,6 +181,9 @@ export declare class PLVLinkMicSocketMuteUserMediaSend {
121
181
  userId?: string | null;
122
182
  type?: string | null;
123
183
  }
184
+ /**
185
+ * 讲师授予或收回成员权限发送模型
186
+ */
124
187
  export declare class PLVLinkMicSocketTeacherSetPermissionSend {
125
188
  EVENT: string;
126
189
  roomId?: string | null;
@@ -132,6 +195,9 @@ export declare class PLVLinkMicSocketTeacherSetPermissionSend {
132
195
  toAll?: boolean | null;
133
196
  sign?: string | null;
134
197
  }
198
+ /**
199
+ * 讲师授予或收回成员权限接收模型
200
+ */
135
201
  export declare class PLVLinkMicSocketTeacherSetPermissionRecv {
136
202
  roomId?: string | null;
137
203
  userId?: string | null;
@@ -142,6 +208,9 @@ export declare class PLVLinkMicSocketTeacherSetPermissionRecv {
142
208
  toDelete?: boolean | null;
143
209
  toJoinMicList?: boolean | null;
144
210
  }
211
+ /**
212
+ * PLVLinkMicSocketSwitchJoinVoiceRecv 接收模型
213
+ */
145
214
  export declare class PLVLinkMicSocketSwitchJoinVoiceRecv {
146
215
  status?: number | null;
147
216
  currentTime?: number | null;
@@ -1,5 +1,8 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 状态枚举,定义模块核心业务状态
5
+ */
3
6
  export declare enum PLVLinkMicState {
4
7
  /**
5
8
  * 未连麦状态
@@ -1,5 +1,8 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
+ /**
4
+ * 视频渲染参数模型,描述远端画面渲染所需的用户和视图信息
5
+ */
3
6
  export declare class PLVLinkMicVideoRenderParam {
4
7
  /**
5
8
  * 连麦ID
@@ -9,5 +12,5 @@ export declare class PLVLinkMicVideoRenderParam {
9
12
  * XComponent 视图ID,null 解除渲染绑定
10
13
  */
11
14
  readonly xcomponentId: string | null;
12
- constructor(q24: string, r24: string | null);
15
+ constructor(k26: string, l26: string | null);
13
16
  }
@@ -1,6 +1,9 @@
1
1
  // @keepTs
2
2
  // @ts-nocheck
3
3
  import { MutableState } from '@polyvharmony/media-player-sdk';
4
+ /**
5
+ * 连麦用户模型,描述本地或频道内连麦成员的关键 RTC 信息
6
+ */
4
7
  export declare class PLVLinkMicViewer {
5
8
  readonly channelId: string;
6
9
  readonly linkmicId: string;
@@ -18,5 +21,5 @@ export declare class PLVLinkMicViewer {
18
21
  viewerActor?: string;
19
22
  isMyself: boolean;
20
23
  linkmicStartTimestamp: number;
21
- constructor(s24: string, t24: string, u24: string, v24: string);
24
+ constructor(m26: string, n26: string, o26: string, p26: string);
22
25
  }