@polyvharmony/rtc-sdk 1.0.0-dev.1 → 1.0.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## [v1.0.0-dev.1] - 2024-10-11
1
+ ## [v1.0.0-dev.3] - 2024-10-16
2
2
 
3
3
  此项目是保利威鸿蒙 RTC SDK
4
4
 
package/Index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- export * from "./src/main/ets/d/e";
2
- export * from "./src/main/ets/f/g";
3
- export * from "./src/main/ets/f/h";
4
- export * from "./src/main/ets/i/j";
5
- export * from "./src/main/ets/i/k";
6
- export * from "./src/main/ets/i/l";
7
- export * from "./src/main/ets/i/m";
8
- export * from "./src/main/ets/i/n";
9
- export * from "./src/main/ets/i/o";
10
- export * from "./src/main/ets/p";
1
+ export * from './src/main/ets/engine/PLVRTCEngine';
2
+ export * from './src/main/ets/engine/PLVRTCEngineEventCallback';
3
+ export * from './src/main/ets/vo/PLVRTCClientRole';
4
+ export * from './src/main/ets/vo/PLVRTCConfig';
5
+ export * from './src/main/ets/vo/PLVRTCMediaState';
6
+ export * from './src/main/ets/vo/PLVRTCRenderViewParam';
7
+ export * from './src/main/ets/vo/PLVRTCVideoEncodeParam';
8
+ export * from './src/main/ets/vo/PLVRTCVideoRenderParam';
9
+ export * from './src/main/ets/PLVRTCEngineFactory';
package/ets/modules.abc CHANGED
Binary file
package/obfuscation.txt CHANGED
@@ -1,2 +1,2 @@
1
- -enable-property-obfuscation
2
- -enable-toplevel-obfuscation
1
+ -keep-global-name
2
+ *
package/oh-package.json5 CHANGED
@@ -1 +1 @@
1
- {"name":"@polyvharmony/rtc-sdk","version":"1.0.0-dev.1","description":"rtc-sdk","author":"POLYV","repository":"https://github.com/polyv/polyv-harmony-livescenes-sdk-demo","license":"MIT","dependencies":{"@polyvharmony/media-player-foundation":"2.2.0"},"types":"Index.d.ts","artifactType":"obfuscation","metadata":{"byteCodeHar":true,"sourceRoots":["./src/main"],"debug":false,"declarationEntry":[],"useNormalizedOHMUrl":true},"compatibleSdkVersion":12,"compatibleSdkType":"HarmonyOS","obfuscated":true}
1
+ {"name":"@polyvharmony/rtc-sdk","version":"1.0.0-dev.3","description":"rtc-sdk","author":"POLYV","repository":"https://github.com/polyv/polyv-harmony-livescenes-sdk-demo","license":"MIT","dependencies":{"@polyvharmony/media-player-foundation":"2.3.1-dev.1"},"types":"Index.d.ts","artifactType":"obfuscation","metadata":{"byteCodeHar":true,"sourceRoots":["./src/main"],"debug":false,"declarationEntry":[],"useNormalizedOHMUrl":true},"compatibleSdkVersion":12,"compatibleSdkType":"HarmonyOS","obfuscated":true}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@polyvharmony/rtc-sdk","version":"1.0.0-dev.1","description":"rtc-sdk","author":"POLYV","repository":"https://github.com/polyv/polyv-harmony-livescenes-sdk-demo","license":"MIT","dependencies":{"@polyvharmony/media-player-foundation":"2.2.0"},"types":"Index.d.ts","artifactType":"obfuscation","metadata":{"byteCodeHar":true,"sourceRoots":["./src/main"],"debug":false,"declarationEntry":[],"useNormalizedOHMUrl":true},"compatibleSdkVersion":12,"compatibleSdkType":"HarmonyOS","obfuscated":true}
1
+ {"name":"@polyvharmony/rtc-sdk","version":"1.0.0-dev.3","description":"rtc-sdk","author":"POLYV","repository":"https://github.com/polyv/polyv-harmony-livescenes-sdk-demo","license":"MIT","dependencies":{"@polyvharmony/media-player-foundation":"2.3.1-dev.1"},"types":"Index.d.ts","artifactType":"obfuscation","metadata":{"byteCodeHar":true,"sourceRoots":["./src/main"],"debug":false,"declarationEntry":[],"useNormalizedOHMUrl":true},"compatibleSdkVersion":12,"compatibleSdkType":"HarmonyOS","obfuscated":true}
@@ -0,0 +1,9 @@
1
+ import { PLVRTCEngine } from "./engine/PLVRTCEngine";
2
+ import { PLVRTCConfig } from "./vo/PLVRTCConfig";
3
+ import { PLVRTCEngineEventCallback } from "./engine/PLVRTCEngineEventCallback";
4
+ export declare abstract class PLVRTCEngineFactory {
5
+ private static readonly factoryImpls;
6
+ static register(factory: PLVRTCEngineFactory): void;
7
+ static create(rtcConfig: PLVRTCConfig, eventCallback: PLVRTCEngineEventCallback): PLVRTCEngine;
8
+ abstract create(rtcConfig: PLVRTCConfig, eventCallback: PLVRTCEngineEventCallback): PLVRTCEngine | null;
9
+ }
@@ -0,0 +1,75 @@
1
+ import { PLVRTCAppToken, PLVRTCConfig } from "../vo/PLVRTCConfig";
2
+ import { PLVRTCVideoEncodeParam } from "../vo/PLVRTCVideoEncodeParam";
3
+ import { PLVRTCVideoRenderParam } from "../vo/PLVRTCVideoRenderParam";
4
+ import { PLVRTCRenderViewParam } from "../vo/PLVRTCRenderViewParam";
5
+ import { PLVRTCEngineEventCallback } from "./PLVRTCEngineEventCallback";
6
+ import { PLVRTCClientRole } from "../vo/PLVRTCClientRole";
7
+ export declare abstract class PLVRTCEngine {
8
+ readonly rtcConfig: PLVRTCConfig;
9
+ readonly eventCallback: PLVRTCEngineEventCallback;
10
+ constructor(rtcConfig: PLVRTCConfig, eventCallback: PLVRTCEngineEventCallback);
11
+ /**
12
+ * 加入频道
13
+ */
14
+ abstract joinChannel(channelId: string): number;
15
+ /**
16
+ * 离开频道
17
+ */
18
+ abstract leaveChannel(): number;
19
+ /**
20
+ * 更新token
21
+ */
22
+ abstract renewToken(appToken: PLVRTCAppToken): number;
23
+ /**
24
+ * 音频模块开关
25
+ */
26
+ abstract enableAudio(enable: boolean): number;
27
+ /**
28
+ * 本地音频采集开关
29
+ */
30
+ abstract enableLocalAudioCapture(enable: boolean): number;
31
+ /**
32
+ * 是否将本地音频发布到远端
33
+ */
34
+ abstract enableLocalAudioPublish(enable: boolean): number;
35
+ /**
36
+ * 视频模块开关
37
+ */
38
+ abstract enableVideo(enable: boolean): number;
39
+ /**
40
+ * 本地视频采集开关
41
+ */
42
+ abstract enableLocalVideoCapture(enable: boolean): number;
43
+ /**
44
+ * 是否将本地视频发布到远端
45
+ */
46
+ abstract enableLocalVideoPublish(enable: boolean): number;
47
+ /**
48
+ * 设置本地视频编码参数
49
+ */
50
+ abstract setLocalVideoEncodeParam(videoEncodeParam: PLVRTCVideoEncodeParam): number;
51
+ /**
52
+ * 创建渲染视图 XComponent 配置参数
53
+ */
54
+ abstract createRenderViewParam(linkmicId: string): PLVRTCRenderViewParam;
55
+ /**
56
+ * 设置视频渲染 本地&远端
57
+ */
58
+ abstract setVideoRender(renderParam: PLVRTCVideoRenderParam): number;
59
+ /**
60
+ * 设置是否订阅远端音频
61
+ */
62
+ abstract setRemoteAudioRender(linkmicId: string, isRender: boolean): number;
63
+ /**
64
+ * 切换角色
65
+ */
66
+ abstract switchRole(role: PLVRTCClientRole): number;
67
+ /**
68
+ * 切换前后摄像头
69
+ */
70
+ abstract switchCamera(): number;
71
+ /**
72
+ * 销毁
73
+ */
74
+ abstract destroy(): number;
75
+ }
@@ -0,0 +1,37 @@
1
+ import { PLVRTCConfig } from "../vo/PLVRTCConfig";
2
+ import { PLVRTCMediaState } from "../vo/PLVRTCMediaState";
3
+ export declare abstract class PLVRTCEngineEventCallback {
4
+ /**
5
+ * 成功加入频道
6
+ */
7
+ onJoinChannelSuccess(rtcConfig: PLVRTCConfig, channelId: string): void;
8
+ /**
9
+ * 断网重连重新加入频道
10
+ */
11
+ onRejoinChannelSuccess(rtcConfig: PLVRTCConfig, channelId: string): void;
12
+ /**
13
+ * 离开频道
14
+ */
15
+ onLeaveChannel(rtcConfig: PLVRTCConfig, channelId: string): void;
16
+ /**
17
+ * 远端用户加入频道
18
+ */
19
+ onRemoteUserJoin(channelId: string, mediaState: PLVRTCMediaState): void;
20
+ /**
21
+ * 远端用户音视频状态变化
22
+ */
23
+ onRemoteUserMediaStateChanged(channelId: string, mediaState: PLVRTCMediaState): void;
24
+ /**
25
+ * 远端用户离开频道
26
+ */
27
+ onRemoteUserLeave(channelId: string, mediaState: PLVRTCMediaState): void;
28
+ /**
29
+ * token 过期回调
30
+ * @see PLVRTCEngine#renewToken
31
+ */
32
+ onTokenExpired(channelId: string | undefined, rtcConfig: PLVRTCConfig): void;
33
+ /**
34
+ * 错误回调
35
+ */
36
+ onError(code: number, message: string): void;
37
+ }
@@ -0,0 +1,24 @@
1
+ import { PLVRTCEngine } from "../engine/PLVRTCEngine";
2
+ import { PLVRTCRenderViewParam } from "../vo/PLVRTCRenderViewParam";
3
+ import { PLVRTCAppToken } from "../vo/PLVRTCConfig";
4
+ import { PLVRTCVideoEncodeParam } from "../vo/PLVRTCVideoEncodeParam";
5
+ import { PLVRTCVideoRenderParam } from "../vo/PLVRTCVideoRenderParam";
6
+ import { PLVRTCClientRole } from "../vo/PLVRTCClientRole";
7
+ export declare class PLVRTCEngineNoOp extends PLVRTCEngine {
8
+ createRenderViewParam(linkmicId: string): PLVRTCRenderViewParam;
9
+ enableAudio(enable: boolean): number;
10
+ enableLocalAudioCapture(enable: boolean): number;
11
+ enableLocalAudioPublish(enable: boolean): number;
12
+ enableLocalVideoCapture(enable: boolean): number;
13
+ enableLocalVideoPublish(enable: boolean): number;
14
+ enableVideo(enable: boolean): number;
15
+ joinChannel(channelId: string): number;
16
+ renewToken(appToken: PLVRTCAppToken): number;
17
+ setLocalVideoEncodeParam(videoEncodeParam: PLVRTCVideoEncodeParam): number;
18
+ setRemoteAudioRender(linkmicId: string, isRender: boolean): number;
19
+ setVideoRender(renderParam: PLVRTCVideoRenderParam): number;
20
+ switchRole(role: PLVRTCClientRole): number;
21
+ switchCamera(): number;
22
+ destroy(): number;
23
+ leaveChannel(): number;
24
+ }
@@ -1,4 +1,4 @@
1
- export declare enum h1 {
1
+ export declare enum PLVRTCClientRole {
2
2
  /**
3
3
  * 观众 - 只拉流
4
4
  */
@@ -0,0 +1,16 @@
1
+ export declare class PLVRTCConfig {
2
+ rtcType: "artc" | null;
3
+ context: any;
4
+ rtcToken: PLVRTCAppToken | null;
5
+ /**
6
+ * 连麦ID
7
+ *
8
+ * [ARTC] 取值为32位整数
9
+ */
10
+ linkmicId: string | null;
11
+ }
12
+ export type PLVRTCAppToken = PLVARTCAppToken;
13
+ export type PLVARTCAppToken = {
14
+ appId: string;
15
+ token: string;
16
+ };
@@ -0,0 +1,6 @@
1
+ export declare class PLVRTCMediaState {
2
+ readonly linkmicId: string;
3
+ readonly audioEnable: boolean;
4
+ readonly videoEnable: boolean;
5
+ constructor(linkmicId: string, audioEnable: boolean, videoEnable: boolean);
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare class PLVRTCRenderViewParam {
2
+ readonly linkmicId: string;
3
+ readonly componentId: string;
4
+ readonly componentLibraryName: string;
5
+ constructor(linkmicId: string, componentId: string, componentLibraryName: string);
6
+ }
@@ -0,0 +1,19 @@
1
+ export declare class PLVRTCVideoEncodeParam {
2
+ width: number;
3
+ height: number;
4
+ frameRate: number;
5
+ targetBitRate: number | undefined;
6
+ minBitRate: number | undefined;
7
+ pushDowngradePreference: PLVPushDowngradePreference;
8
+ pushOrientation: PLVPushOrientation;
9
+ pushMirror: boolean;
10
+ }
11
+ export declare enum PLVPushDowngradePreference {
12
+ PREFER_BETTER_QUALITY = 0,
13
+ PREFER_BETTER_FLUENCY = 1
14
+ }
15
+ export declare enum PLVPushOrientation {
16
+ AUTO = 0,
17
+ LANDSCAPE = 1,
18
+ PORTRAIT = 2
19
+ }
@@ -0,0 +1,10 @@
1
+ export declare class PLVRTCVideoRenderParam {
2
+ linkmicId: string | null;
3
+ viewId: string | null;
4
+ renderFitMode: PLVVideoRenderFitMode;
5
+ renderMirror: boolean;
6
+ }
7
+ export declare enum PLVVideoRenderFitMode {
8
+ HIDDEN = 0,
9
+ FIT = 1
10
+ }
@@ -1 +0,0 @@
1
- export declare function m(tag?: string): MethodDecorator;
@@ -1,75 +0,0 @@
1
- import { b1, c1 } from "../i/k";
2
- import { d1 } from "../i/n";
3
- import { e1 } from "../i/o";
4
- import { f1 } from "../i/m";
5
- import { g1 } from "./h";
6
- import { h1 } from "../i/j";
7
- export declare abstract class i1 {
8
- readonly o: c1;
9
- readonly t: g1;
10
- constructor(r3: c1, s3: g1);
11
- /**
12
- * 加入频道
13
- */
14
- abstract u(p1: string): number;
15
- /**
16
- * 离开频道
17
- */
18
- abstract a1(): number;
19
- /**
20
- * 更新token
21
- */
22
- abstract j1(o1: b1): number;
23
- /**
24
- * 音频模块开关
25
- */
26
- abstract l1(enable: boolean): number;
27
- /**
28
- * 本地音频采集开关
29
- */
30
- abstract m1(enable: boolean): number;
31
- /**
32
- * 是否将本地音频发布到远端
33
- */
34
- abstract n1(enable: boolean): number;
35
- /**
36
- * 视频模块开关
37
- */
38
- abstract o1(enable: boolean): number;
39
- /**
40
- * 本地视频采集开关
41
- */
42
- abstract q1(enable: boolean): number;
43
- /**
44
- * 是否将本地视频发布到远端
45
- */
46
- abstract s1(enable: boolean): number;
47
- /**
48
- * 设置本地视频编码参数
49
- */
50
- abstract t1(n1: d1): number;
51
- /**
52
- * 创建渲染视图 XComponent 配置参数
53
- */
54
- abstract u1(m1: string): f1;
55
- /**
56
- * 设置视频渲染 本地&远端
57
- */
58
- abstract v1(l1: e1): number;
59
- /**
60
- * 设置是否订阅远端音频
61
- */
62
- abstract w1(j1: string, k1: boolean): number;
63
- /**
64
- * 切换角色
65
- */
66
- abstract z1(role: h1): number;
67
- /**
68
- * 切换前后摄像头
69
- */
70
- abstract a2(): number;
71
- /**
72
- * 销毁
73
- */
74
- abstract destroy(): number;
75
- }
@@ -1,37 +0,0 @@
1
- import { c1 } from "../i/k";
2
- import { b2 } from "../i/l";
3
- export declare abstract class g1 {
4
- /**
5
- * 成功加入频道
6
- */
7
- c2(o2: c1, q2: string): void;
8
- /**
9
- * 断网重连重新加入频道
10
- */
11
- d2(m2: c1, n2: string): void;
12
- /**
13
- * 离开频道
14
- */
15
- e2(k2: c1, l2: string): void;
16
- /**
17
- * 远端用户加入频道
18
- */
19
- f2(i2: string, j2: b2): void;
20
- /**
21
- * 远端用户音视频状态变化
22
- */
23
- g2(g2: string, h2: b2): void;
24
- /**
25
- * 远端用户离开频道
26
- */
27
- h2(e2: string, f2: b2): void;
28
- /**
29
- * token 过期回调
30
- * @see PLVRTCEngine#renewToken
31
- */
32
- i2(c2: string | undefined, d2: c1): void;
33
- /**
34
- * 错误回调
35
- */
36
- onError(code: number, message: string): void;
37
- }
@@ -1,16 +0,0 @@
1
- export declare class c1 {
2
- l2: "artc" | null;
3
- context: any;
4
- m2: b1 | null;
5
- /**
6
- * 连麦ID
7
- *
8
- * [ARTC] 取值为32位整数
9
- */
10
- n2: string | null;
11
- }
12
- export type b1 = l3;
13
- export type l3 = {
14
- appId: string;
15
- token: string;
16
- };
@@ -1,6 +0,0 @@
1
- export declare class b2 {
2
- readonly n2: string;
3
- readonly o2: boolean;
4
- readonly q2: boolean;
5
- constructor(v3: string, w3: boolean, x3: boolean);
6
- }
@@ -1,6 +0,0 @@
1
- export declare class f1 {
2
- readonly n2: string;
3
- readonly componentId: string;
4
- readonly t2: string;
5
- constructor(t3: string, componentId: string, u3: string);
6
- }
@@ -1,19 +0,0 @@
1
- export declare class d1 {
2
- width: number;
3
- height: number;
4
- frameRate: number;
5
- u2: number | undefined;
6
- v2: number | undefined;
7
- w2: m3;
8
- z2: n3;
9
- a3: boolean;
10
- }
11
- export declare enum m3 {
12
- PREFER_BETTER_QUALITY = 0,
13
- PREFER_BETTER_FLUENCY = 1
14
- }
15
- export declare enum n3 {
16
- AUTO = 0,
17
- LANDSCAPE = 1,
18
- PORTRAIT = 2
19
- }
@@ -1,10 +0,0 @@
1
- export declare class e1 {
2
- n2: string | null;
3
- b3: string | null;
4
- d3: q3;
5
- e3: boolean;
6
- }
7
- export declare enum q3 {
8
- HIDDEN = 0,
9
- FIT = 1
10
- }
@@ -1,9 +0,0 @@
1
- import { i1 } from "./f/g";
2
- import { c1 } from "./i/k";
3
- import { g1 } from "./f/h";
4
- export declare abstract class c3 {
5
- private static readonly j2;
6
- static register(j3: c3): void;
7
- static create(f3: c1, g3: g1): i1;
8
- abstract create(f3: c1, g3: g1): i1 | null;
9
- }
@@ -1,24 +0,0 @@
1
- import { i1 } from "../f/g";
2
- import { f1 } from "../i/m";
3
- import { b1 } from "../i/k";
4
- import { d1 } from "../i/n";
5
- import { e1 } from "../i/o";
6
- import { h1 } from "../i/j";
7
- export declare class s2 extends i1 {
8
- u1(b3: string): f1;
9
- l1(enable: boolean): number;
10
- m1(enable: boolean): number;
11
- n1(enable: boolean): number;
12
- q1(enable: boolean): number;
13
- s1(enable: boolean): number;
14
- o1(enable: boolean): number;
15
- u(a3: string): number;
16
- j1(z2: b1): number;
17
- t1(w2: d1): number;
18
- w1(u2: string, v2: boolean): number;
19
- v1(t2: e1): number;
20
- z1(role: h1): number;
21
- a2(): number;
22
- destroy(): number;
23
- a1(): number;
24
- }