@byteplus/react-native-live-push 1.2.0-rc.0 → 1.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/volcengine/velive/rn/push/VeLiveEffectHelper.java +222 -0
  3. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +2 -0
  4. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +1 -1
  5. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +19 -125
  6. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +1 -37
  7. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +6 -1
  8. package/ios/VeLiveMixerHelper.h +9 -6
  9. package/ios/VeLiveMixerHelper.m +38 -12
  10. package/ios/VeLiveMixerView.h +1 -8
  11. package/ios/VeLiveMixerView.m +178 -231
  12. package/ios/VeLiveMixerViewManager.m +0 -36
  13. package/ios/VeLivePushHelper.h +2 -1
  14. package/ios/VeLivePushHelper.m +7 -0
  15. package/lib/commonjs/index.js +490 -283
  16. package/lib/commonjs/typescript/core/api.d.ts +7 -1
  17. package/lib/commonjs/typescript/core/effect.d.ts +15 -0
  18. package/lib/commonjs/typescript/core/index.d.ts +1 -0
  19. package/lib/commonjs/typescript/core/keytype.d.ts +2 -3
  20. package/lib/commonjs/typescript/platforms/android/extends.d.ts +2 -0
  21. package/lib/commonjs/typescript/platforms/android/helper.d.ts +10 -0
  22. package/lib/commonjs/typescript/platforms/ios/helper.d.ts +1 -0
  23. package/lib/commonjs/typescript/utils/index.d.ts +4 -0
  24. package/lib/commonjs/typescript/view/MixView.d.ts +1 -9
  25. package/lib/module/index.js +490 -284
  26. package/lib/module/typescript/core/api.d.ts +7 -1
  27. package/lib/module/typescript/core/effect.d.ts +15 -0
  28. package/lib/module/typescript/core/index.d.ts +1 -0
  29. package/lib/module/typescript/core/keytype.d.ts +2 -3
  30. package/lib/module/typescript/platforms/android/extends.d.ts +2 -0
  31. package/lib/module/typescript/platforms/android/helper.d.ts +10 -0
  32. package/lib/module/typescript/platforms/ios/helper.d.ts +1 -0
  33. package/lib/module/typescript/utils/index.d.ts +4 -0
  34. package/lib/module/typescript/view/MixView.d.ts +1 -9
  35. package/lib/typescript/core/api.d.ts +7 -1
  36. package/lib/typescript/core/effect.d.ts +15 -0
  37. package/lib/typescript/core/index.d.ts +1 -0
  38. package/lib/typescript/core/keytype.d.ts +2 -3
  39. package/lib/typescript/platforms/android/extends.d.ts +2 -0
  40. package/lib/typescript/platforms/android/helper.d.ts +10 -0
  41. package/lib/typescript/platforms/ios/helper.d.ts +1 -0
  42. package/lib/typescript/utils/index.d.ts +4 -0
  43. package/lib/typescript/view/MixView.d.ts +1 -9
  44. package/package.json +1 -1
  45. package/react-native-velive-push.podspec +3 -3
@@ -1,5 +1,5 @@
1
1
  import { VeLiveAudioDevice, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLiveVideoEffectManager } from '../codegen/pack/api';
2
- import { VeLiveAudioFrame, VeLiveVideoFrame } from '../codegen/pack/keytype';
2
+ import { VeLiveAudioFrame, VeLiveVideoFrame } from '../codegen/pack';
3
3
  import { VeLiveMixerManager } from './mixer';
4
4
  declare module '../codegen/pack/api' {
5
5
  interface VeLivePusher {
@@ -13,6 +13,12 @@ declare module '../codegen/pack/api' {
13
13
  *
14
14
  */
15
15
  getMixerManager(): VeLiveMixerManager;
16
+ /**
17
+ * @detail api
18
+ * @brief 设置美颜SDK管理器
19
+ * @param licenseFileName 美颜SDK License 文件名
20
+ */
21
+ setupEffectManager(licenseFileName: string): Promise<VeLiveVideoEffectManager>;
16
22
  }
17
23
  }
18
24
  export { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame, _VeLivePusher as VeLivePusher, };
@@ -0,0 +1,15 @@
1
+ declare module '../codegen/pack/api' {
2
+ interface VeLivePusher {
3
+ /**
4
+ * @detail api
5
+ * @brief 设置美颜SDK管理器
6
+ * @param licenseFileName 美颜SDK License 文件名
7
+ */
8
+ setupEffectManager(licenseFileName: string): Promise<VeLiveVideoEffectManager>;
9
+ }
10
+ }
11
+ /**
12
+ * @detail api
13
+ * @brief 设置美颜SDK资源,需要在app初识化时设置
14
+ */
15
+ export declare function initVideoEffectResource(): Promise<void>;
@@ -4,3 +4,4 @@ export * from './errorcode';
4
4
  export * from './keytype';
5
5
  export * from './env';
6
6
  export * from './pusher';
7
+ export * from './effect.ts';
@@ -7,12 +7,11 @@ export interface MixConfig {
7
7
  alpha?: number;
8
8
  zOrder?: number;
9
9
  renderMode?: number;
10
- captureMode?: 'onchange' | 'realtime' | 'auto' | 'manual';
10
+ captureMode?: 'onchange' | 'realtime' | 'manual';
11
11
  }
12
12
  export interface MixViewConfig {
13
13
  renderMode?: number;
14
- captureMode?: 'onchange' | 'realtime' | 'auto' | 'manual';
14
+ captureMode?: 'onchange' | 'realtime' | 'manual';
15
15
  captureFramerate?: number;
16
- autoSensitivity?: number;
17
16
  }
18
17
  export { VeLiveOrientation, VeLiveAudioBufferType, VeLiveAudioCaptureConfiguration, VeLiveAudioCaptureType, VeLiveAudioChannel, VeLiveAudioEncoderConfiguration, VeLiveAudioFrameSource, VeLiveAudioMixType, VeLiveAudioPowerLevel, VeLiveAudioProfile, VeLiveAudioSampleRate, VeLiveFileRecorderConfiguration, VeLiveFirstFrameType, VeLiveMixAudioLayout, VeLiveMixVideoLayout, VeLiveNetworkQuality, VeLivePixelFormat, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLivePusherStatistics, VeLivePusherStatus, VeLiveStreamMixDescription, VeLiveVideoBufferType, VeLiveVideoCaptureConfiguration, VeLiveVideoCaptureType, VeLiveVideoCodec, VeLiveVideoEffectLicenseConfiguration, VeLiveVideoEffectLicenseType, VeLiveVideoEncoderConfiguration, VeLiveVideoFrameSource, VeLiveVideoMirrorType, VeLiveVideoResolution, VeLiveVideoRotation, };
@@ -6,3 +6,5 @@ export declare class NativeSurfaceView extends NativeView {
6
6
  }
7
7
  export declare class AndroidView extends NativeView {
8
8
  }
9
+ export declare class ApplicationContext {
10
+ }
@@ -1,4 +1,5 @@
1
1
  import type { VeLivePusher } from '../../codegen/android';
2
+ import type { ApplicationContext } from './extends';
2
3
  export declare class VeLivePushHelper {
3
4
  static pusherMap: WeakMap<VeLivePusher, string>;
4
5
  static setPusher(viewId: string, pusher: VeLivePusher): void;
@@ -6,3 +7,12 @@ export declare class VeLivePushHelper {
6
7
  static setVeLivePusher(viewId: string, pusher: VeLivePusher): void;
7
8
  static removeVeLivePusher(viewId: string): void;
8
9
  }
10
+ export declare class VeLiveEffectHelper {
11
+ static getLicensePath(name: string): string;
12
+ static getModelPath(): string;
13
+ static getBeautyPathByName(subPath: string): string;
14
+ static getStickerPathByName(name: string): string;
15
+ static getFilterPathByName(name: string): string;
16
+ static initVideoEffectResource(): void;
17
+ static copyAssetFolder(context: ApplicationContext, srcName: string, dstName: string): boolean;
18
+ }
@@ -5,4 +5,5 @@ export declare class VeLivePushHelper {
5
5
  static removePusher(pusher: VeLivePusher): void;
6
6
  static setVeLivePusher(pusher: VeLivePusher, viewId: string): void;
7
7
  static removeVeLivePusher(viewId: string): void;
8
+ static getResourcePath(subPath: string): string;
8
9
  }
@@ -0,0 +1,4 @@
1
+ import { IPackClassInterface } from '@vcloud-lux/hybrid-runtime';
2
+ import * as $p_a from '../codegen/android';
3
+ import * as $p_i from '../codegen/ios';
4
+ export declare function runImpl<T = any>(context: IPackClassInterface, androidImpl: (engine: $p_a.VeLivePusher) => T, iosImpl: (engine: $p_i.VeLivePusher) => T): T;
@@ -17,20 +17,12 @@ export interface NativeMixViewProps extends ViewProps, Partial<MixViewConfig> {
17
17
  * - 'manual': User controls capture timing via ref methods
18
18
  * Best for: Custom scenarios where you want full control
19
19
  * Performance: Depends on user implementation
20
- *
21
- * - 'auto': Automatically detect based on content behavior (experimental)
22
- * Monitors view changes and switches between onchange/realtime
23
20
  */
24
- captureMode?: 'onchange' | 'realtime' | 'manual' | 'auto';
21
+ captureMode?: 'onchange' | 'realtime' | 'manual';
25
22
  /**
26
23
  * For realtime mode: custom framerate (default uses stream framerate)
27
24
  */
28
25
  captureFramerate?: number;
29
- /**
30
- * For auto mode: sensitivity threshold for switching to realtime
31
- * Higher values = less sensitive to changes
32
- */
33
- autoSensitivity?: number;
34
26
  }
35
27
  export interface MixViewEventProps {
36
28
  /**
@@ -1,5 +1,5 @@
1
1
  import { VeLiveAudioDevice, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLiveVideoEffectManager } from '../codegen/pack/api';
2
- import { VeLiveAudioFrame, VeLiveVideoFrame } from '../codegen/pack/keytype';
2
+ import { VeLiveAudioFrame, VeLiveVideoFrame } from '../codegen/pack';
3
3
  import { VeLiveMixerManager } from './mixer';
4
4
  declare module '../codegen/pack/api' {
5
5
  interface VeLivePusher {
@@ -13,6 +13,12 @@ declare module '../codegen/pack/api' {
13
13
  *
14
14
  */
15
15
  getMixerManager(): VeLiveMixerManager;
16
+ /**
17
+ * @detail api
18
+ * @brief 设置美颜SDK管理器
19
+ * @param licenseFileName 美颜SDK License 文件名
20
+ */
21
+ setupEffectManager(licenseFileName: string): Promise<VeLiveVideoEffectManager>;
16
22
  }
17
23
  }
18
24
  export { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame, _VeLivePusher as VeLivePusher, };
@@ -0,0 +1,15 @@
1
+ declare module '../codegen/pack/api' {
2
+ interface VeLivePusher {
3
+ /**
4
+ * @detail api
5
+ * @brief 设置美颜SDK管理器
6
+ * @param licenseFileName 美颜SDK License 文件名
7
+ */
8
+ setupEffectManager(licenseFileName: string): Promise<VeLiveVideoEffectManager>;
9
+ }
10
+ }
11
+ /**
12
+ * @detail api
13
+ * @brief 设置美颜SDK资源,需要在app初识化时设置
14
+ */
15
+ export declare function initVideoEffectResource(): Promise<void>;
@@ -4,3 +4,4 @@ export * from './errorcode';
4
4
  export * from './keytype';
5
5
  export * from './env';
6
6
  export * from './pusher';
7
+ export * from './effect.ts';
@@ -7,12 +7,11 @@ export interface MixConfig {
7
7
  alpha?: number;
8
8
  zOrder?: number;
9
9
  renderMode?: number;
10
- captureMode?: 'onchange' | 'realtime' | 'auto' | 'manual';
10
+ captureMode?: 'onchange' | 'realtime' | 'manual';
11
11
  }
12
12
  export interface MixViewConfig {
13
13
  renderMode?: number;
14
- captureMode?: 'onchange' | 'realtime' | 'auto' | 'manual';
14
+ captureMode?: 'onchange' | 'realtime' | 'manual';
15
15
  captureFramerate?: number;
16
- autoSensitivity?: number;
17
16
  }
18
17
  export { VeLiveOrientation, VeLiveAudioBufferType, VeLiveAudioCaptureConfiguration, VeLiveAudioCaptureType, VeLiveAudioChannel, VeLiveAudioEncoderConfiguration, VeLiveAudioFrameSource, VeLiveAudioMixType, VeLiveAudioPowerLevel, VeLiveAudioProfile, VeLiveAudioSampleRate, VeLiveFileRecorderConfiguration, VeLiveFirstFrameType, VeLiveMixAudioLayout, VeLiveMixVideoLayout, VeLiveNetworkQuality, VeLivePixelFormat, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLivePusherStatistics, VeLivePusherStatus, VeLiveStreamMixDescription, VeLiveVideoBufferType, VeLiveVideoCaptureConfiguration, VeLiveVideoCaptureType, VeLiveVideoCodec, VeLiveVideoEffectLicenseConfiguration, VeLiveVideoEffectLicenseType, VeLiveVideoEncoderConfiguration, VeLiveVideoFrameSource, VeLiveVideoMirrorType, VeLiveVideoResolution, VeLiveVideoRotation, };
@@ -6,3 +6,5 @@ export declare class NativeSurfaceView extends NativeView {
6
6
  }
7
7
  export declare class AndroidView extends NativeView {
8
8
  }
9
+ export declare class ApplicationContext {
10
+ }
@@ -1,4 +1,5 @@
1
1
  import type { VeLivePusher } from '../../codegen/android';
2
+ import type { ApplicationContext } from './extends';
2
3
  export declare class VeLivePushHelper {
3
4
  static pusherMap: WeakMap<VeLivePusher, string>;
4
5
  static setPusher(viewId: string, pusher: VeLivePusher): void;
@@ -6,3 +7,12 @@ export declare class VeLivePushHelper {
6
7
  static setVeLivePusher(viewId: string, pusher: VeLivePusher): void;
7
8
  static removeVeLivePusher(viewId: string): void;
8
9
  }
10
+ export declare class VeLiveEffectHelper {
11
+ static getLicensePath(name: string): string;
12
+ static getModelPath(): string;
13
+ static getBeautyPathByName(subPath: string): string;
14
+ static getStickerPathByName(name: string): string;
15
+ static getFilterPathByName(name: string): string;
16
+ static initVideoEffectResource(): void;
17
+ static copyAssetFolder(context: ApplicationContext, srcName: string, dstName: string): boolean;
18
+ }
@@ -5,4 +5,5 @@ export declare class VeLivePushHelper {
5
5
  static removePusher(pusher: VeLivePusher): void;
6
6
  static setVeLivePusher(pusher: VeLivePusher, viewId: string): void;
7
7
  static removeVeLivePusher(viewId: string): void;
8
+ static getResourcePath(subPath: string): string;
8
9
  }
@@ -0,0 +1,4 @@
1
+ import { IPackClassInterface } from '@vcloud-lux/hybrid-runtime';
2
+ import * as $p_a from '../codegen/android';
3
+ import * as $p_i from '../codegen/ios';
4
+ export declare function runImpl<T = any>(context: IPackClassInterface, androidImpl: (engine: $p_a.VeLivePusher) => T, iosImpl: (engine: $p_i.VeLivePusher) => T): T;
@@ -17,20 +17,12 @@ export interface NativeMixViewProps extends ViewProps, Partial<MixViewConfig> {
17
17
  * - 'manual': User controls capture timing via ref methods
18
18
  * Best for: Custom scenarios where you want full control
19
19
  * Performance: Depends on user implementation
20
- *
21
- * - 'auto': Automatically detect based on content behavior (experimental)
22
- * Monitors view changes and switches between onchange/realtime
23
20
  */
24
- captureMode?: 'onchange' | 'realtime' | 'manual' | 'auto';
21
+ captureMode?: 'onchange' | 'realtime' | 'manual';
25
22
  /**
26
23
  * For realtime mode: custom framerate (default uses stream framerate)
27
24
  */
28
25
  captureFramerate?: number;
29
- /**
30
- * For auto mode: sensitivity threshold for switching to realtime
31
- * Higher values = less sensitive to changes
32
- */
33
- autoSensitivity?: number;
34
26
  }
35
27
  export interface MixViewEventProps {
36
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/react-native-live-push",
3
- "version": "1.2.0-rc.0",
3
+ "version": "1.3.0-rc.1",
4
4
  "peerDependencies": {
5
5
  "react": "*",
6
6
  "react-native": "*"
@@ -49,7 +49,7 @@ Pod::Spec.new do |s|
49
49
  end
50
50
  end
51
51
 
52
- s.dependency 'VolcApiEngine', '1.6.2'
53
- s.dependency 'TTSDKFramework/Core', '1.46.300.1-premium'
54
- s.dependency 'TTSDKFramework/LivePush-RTS', '1.46.300.1-premium'
52
+ s.dependency 'VolcApiEngine', '1.6.4'
53
+ s.dependency 'TTSDKFramework/Core', '1.46.300.5-premium'
54
+ s.dependency 'TTSDKFramework/LivePush-RTS', '1.46.300.5-premium'
55
55
  end