@byteplus/react-native-live-push 1.1.3-rc.0 → 1.1.3-rc.2

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 (123) hide show
  1. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +13 -2
  2. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +16 -13
  3. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +16 -0
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +7 -2
  5. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +392 -0
  6. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +415 -0
  7. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +79 -0
  8. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +168 -0
  9. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +154 -0
  10. package/ios/VeLiveMixerHelper.h +44 -0
  11. package/ios/VeLiveMixerHelper.m +562 -0
  12. package/ios/VeLiveMixerView.h +69 -0
  13. package/ios/VeLiveMixerView.m +592 -0
  14. package/ios/VeLiveMixerViewManager.m +92 -0
  15. package/lib/commonjs/index.js +1779 -980
  16. package/lib/commonjs/typescript/android/index.d.ts +47 -0
  17. package/lib/commonjs/typescript/codegen/android/api.d.ts +1527 -0
  18. package/lib/commonjs/typescript/codegen/android/callback.d.ts +91 -0
  19. package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +26 -0
  20. package/lib/commonjs/typescript/codegen/android/index.d.ts +5 -0
  21. package/lib/commonjs/typescript/codegen/android/keytype.d.ts +846 -0
  22. package/lib/commonjs/typescript/codegen/android/types.d.ts +33 -0
  23. package/lib/commonjs/typescript/codegen/ios/api.d.ts +222 -0
  24. package/lib/commonjs/typescript/codegen/ios/callback.d.ts +80 -0
  25. package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +54 -0
  26. package/lib/commonjs/typescript/codegen/ios/external.d.ts +1 -0
  27. package/lib/commonjs/typescript/codegen/ios/index.d.ts +6 -0
  28. package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +460 -0
  29. package/lib/commonjs/typescript/codegen/ios/types.d.ts +46 -0
  30. package/lib/commonjs/typescript/codegen/pack/api.d.ts +1835 -0
  31. package/lib/commonjs/typescript/codegen/pack/callback.d.ts +400 -0
  32. package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +35 -0
  33. package/lib/commonjs/typescript/codegen/pack/index.d.ts +5 -0
  34. package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +1392 -0
  35. package/lib/commonjs/typescript/codegen/pack/types.d.ts +68 -0
  36. package/lib/commonjs/typescript/codegen/type-shim.d.ts +6 -0
  37. package/lib/commonjs/typescript/component.d.ts +15 -0
  38. package/lib/commonjs/typescript/core/api.d.ts +17 -0
  39. package/lib/commonjs/typescript/core/callback.d.ts +2 -0
  40. package/lib/commonjs/typescript/core/env.d.ts +29 -0
  41. package/lib/commonjs/typescript/core/errorcode.d.ts +2 -0
  42. package/lib/commonjs/typescript/core/index.d.ts +6 -0
  43. package/lib/commonjs/typescript/core/keytype.d.ts +17 -0
  44. package/lib/commonjs/typescript/core/mixer.d.ts +26 -0
  45. package/lib/commonjs/typescript/core/pusher.d.ts +16 -0
  46. package/lib/commonjs/typescript/index.d.ts +3 -0
  47. package/lib/commonjs/typescript/ios/extends.d.ts +41 -0
  48. package/lib/commonjs/typescript/platforms/android/extends.d.ts +8 -0
  49. package/lib/commonjs/typescript/platforms/android/helper.d.ts +8 -0
  50. package/lib/commonjs/typescript/platforms/android/mixer.d.ts +8 -0
  51. package/lib/commonjs/typescript/platforms/ios/extends.d.ts +17 -0
  52. package/lib/commonjs/typescript/platforms/ios/helper.d.ts +8 -0
  53. package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +9 -0
  54. package/lib/commonjs/typescript/runtime.d.ts +1 -0
  55. package/lib/commonjs/typescript/view/MixView.d.ts +52 -0
  56. package/lib/commonjs/typescript/view/VeImageView.d.ts +19 -0
  57. package/lib/commonjs/typescript/view/VeTextView.d.ts +7 -0
  58. package/lib/commonjs/typescript/view/VeView.d.ts +7 -0
  59. package/lib/commonjs/typescript/view/VeWebView.d.ts +7 -0
  60. package/lib/commonjs/typescript/view/index.d.ts +5 -0
  61. package/lib/module/index.js +1776 -982
  62. package/lib/module/typescript/android/index.d.ts +47 -0
  63. package/lib/module/typescript/codegen/android/api.d.ts +1527 -0
  64. package/lib/module/typescript/codegen/android/callback.d.ts +91 -0
  65. package/lib/module/typescript/codegen/android/errorcode.d.ts +26 -0
  66. package/lib/module/typescript/codegen/android/index.d.ts +5 -0
  67. package/lib/module/typescript/codegen/android/keytype.d.ts +846 -0
  68. package/lib/module/typescript/codegen/android/types.d.ts +33 -0
  69. package/lib/module/typescript/codegen/ios/api.d.ts +222 -0
  70. package/lib/module/typescript/codegen/ios/callback.d.ts +80 -0
  71. package/lib/module/typescript/codegen/ios/errorcode.d.ts +54 -0
  72. package/lib/module/typescript/codegen/ios/external.d.ts +1 -0
  73. package/lib/module/typescript/codegen/ios/index.d.ts +6 -0
  74. package/lib/module/typescript/codegen/ios/keytype.d.ts +460 -0
  75. package/lib/module/typescript/codegen/ios/types.d.ts +46 -0
  76. package/lib/module/typescript/codegen/pack/api.d.ts +1835 -0
  77. package/lib/module/typescript/codegen/pack/callback.d.ts +400 -0
  78. package/lib/module/typescript/codegen/pack/errorcode.d.ts +35 -0
  79. package/lib/module/typescript/codegen/pack/index.d.ts +5 -0
  80. package/lib/module/typescript/codegen/pack/keytype.d.ts +1392 -0
  81. package/lib/module/typescript/codegen/pack/types.d.ts +68 -0
  82. package/lib/module/typescript/codegen/type-shim.d.ts +6 -0
  83. package/lib/module/typescript/component.d.ts +15 -0
  84. package/lib/module/typescript/core/api.d.ts +17 -0
  85. package/lib/module/typescript/core/callback.d.ts +2 -0
  86. package/lib/module/typescript/core/env.d.ts +29 -0
  87. package/lib/module/typescript/core/errorcode.d.ts +2 -0
  88. package/lib/module/typescript/core/index.d.ts +6 -0
  89. package/lib/module/typescript/core/keytype.d.ts +17 -0
  90. package/lib/module/typescript/core/mixer.d.ts +26 -0
  91. package/lib/module/typescript/core/pusher.d.ts +16 -0
  92. package/lib/module/typescript/index.d.ts +3 -0
  93. package/lib/module/typescript/ios/extends.d.ts +41 -0
  94. package/lib/module/typescript/platforms/android/extends.d.ts +8 -0
  95. package/lib/module/typescript/platforms/android/helper.d.ts +8 -0
  96. package/lib/module/typescript/platforms/android/mixer.d.ts +8 -0
  97. package/lib/module/typescript/platforms/ios/extends.d.ts +17 -0
  98. package/lib/module/typescript/platforms/ios/helper.d.ts +8 -0
  99. package/lib/module/typescript/platforms/ios/mixer.d.ts +9 -0
  100. package/lib/module/typescript/runtime.d.ts +1 -0
  101. package/lib/module/typescript/view/MixView.d.ts +52 -0
  102. package/lib/module/typescript/view/VeImageView.d.ts +19 -0
  103. package/lib/module/typescript/view/VeTextView.d.ts +7 -0
  104. package/lib/module/typescript/view/VeView.d.ts +7 -0
  105. package/lib/module/typescript/view/VeWebView.d.ts +7 -0
  106. package/lib/module/typescript/view/index.d.ts +5 -0
  107. package/lib/typescript/codegen/android/api.d.ts +1 -121
  108. package/lib/typescript/codegen/ios/api.d.ts +1 -28
  109. package/lib/typescript/codegen/pack/api.d.ts +1 -133
  110. package/lib/typescript/core/api.d.ts +17 -2
  111. package/lib/typescript/core/keytype.d.ts +15 -0
  112. package/lib/typescript/core/mixer.d.ts +26 -0
  113. package/lib/typescript/index.d.ts +1 -0
  114. package/lib/typescript/platforms/android/extends.d.ts +8 -0
  115. package/lib/typescript/platforms/android/mixer.d.ts +8 -0
  116. package/lib/typescript/platforms/ios/mixer.d.ts +9 -0
  117. package/lib/typescript/view/MixView.d.ts +52 -0
  118. package/lib/typescript/view/VeImageView.d.ts +19 -0
  119. package/lib/typescript/view/VeTextView.d.ts +7 -0
  120. package/lib/typescript/view/VeView.d.ts +7 -0
  121. package/lib/typescript/view/VeWebView.d.ts +7 -0
  122. package/lib/typescript/view/index.d.ts +5 -0
  123. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as $p_a from '../android/index';
2
2
  import * as $p_i from '../ios/index';
3
3
  import { VeLivePusherObserver, VeLivePusherStatisticsObserver, VeLiveFileRecordingListener, VeLiveVideoFrameFilter, VeLiveAudioFrameFilter, VeLiveVideoFrameListener, VeLiveAudioFrameListener, VeLiveSnapshotListener, VeLiveMediaPlayerListener, VeLiveMediaPlayerFrameListener } from './callback';
4
- import { VeLivePusherRenderMode, VeLiveVideoMirrorType, VeLiveVideoCaptureType, VeLiveAudioCaptureType, VeLiveOrientation, VeLivePusherLogLevel, VeLiveVideoEncoderConfiguration, VeLiveAudioEncoderConfiguration, VeLiveFileRecorderConfiguration, VeLiveVideoCaptureConfiguration, VeLiveVideoEffectLicenseConfiguration, VeLiveStreamMixDescription, VeLiveAudioBufferType, VeLiveAudioSampleRate, VeLiveAudioChannel } from './keytype';
4
+ import { VeLivePusherRenderMode, VeLiveVideoMirrorType, VeLiveVideoCaptureType, VeLiveAudioCaptureType, VeLiveOrientation, VeLivePusherLogLevel, VeLiveVideoEncoderConfiguration, VeLiveAudioEncoderConfiguration, VeLiveFileRecorderConfiguration, VeLiveVideoCaptureConfiguration, VeLiveVideoEffectLicenseConfiguration, VeLiveAudioBufferType, VeLiveAudioSampleRate, VeLiveAudioChannel } from './keytype';
5
5
  import { View, Bitmap, Matrix, ByteBuffer } from './types';
6
6
 
7
7
  export declare class VeLivePusher {
@@ -482,16 +482,6 @@ export declare class VeLivePusher {
482
482
  */
483
483
  createPlayer(): VeLiveMediaPlayer;
484
484
 
485
- /** {en}
486
- * @detail api
487
- * @brief Gets the audio and video mixer.
488
- * @return <br>
489
- * The audio and video mixer. See VeLiveMixerManager {@link #VeLiveMixerManager} for details.
490
- * @order 51
491
- *
492
- */
493
- getMixerManager(): VeLiveMixerManager;
494
-
495
485
  /** {en}
496
486
  * @platform android
497
487
  * @detail api
@@ -1675,128 +1665,6 @@ export declare class VeLiveVideoEffectManager {
1675
1665
  ios_setAlgoModelPath(path: string): number;
1676
1666
  }
1677
1667
 
1678
- export declare class VeLiveMixerManager {
1679
- protected _instance: any;
1680
- protected __init(...args: any[]): void;
1681
- protected __new_instance(...args: any[]): any;
1682
-
1683
- /** {en}
1684
- * @detail api
1685
- * @brief Adds a video stream to the mixer.
1686
- * @return <br>
1687
- * The video stream ID.
1688
- * @order 79
1689
- *
1690
- */
1691
- addVideoStream(): number;
1692
-
1693
- /** {en}
1694
- * @platform android
1695
- * @detail api
1696
- * @brief Adds an audio stream to the mixer.
1697
- * @return <br>
1698
- * The audio stream ID.
1699
- * @order 80
1700
- *
1701
- */
1702
- android_addAudioStream_type(type: $p_a.VeLiveAudioMixType): number;
1703
-
1704
- /** {en}
1705
- * @detail api
1706
- * @brief Gets the ID of the primary video stream.
1707
- * @order 83
1708
- *
1709
- */
1710
- getOriginVideoStream(): number;
1711
-
1712
- /** {en}
1713
- * @detail api
1714
- * @brief Gets the ID of the primary audio stream.
1715
- * @order 84
1716
- *
1717
- */
1718
- getOriginAudioStream(): number;
1719
-
1720
- /** {en}
1721
- * @platform android
1722
- * @detail api
1723
- * @brief Gets the ID of the primary screen stream.
1724
- * @order 85
1725
- *
1726
- */
1727
- android_getOriginScreenStream(): number;
1728
-
1729
- /** {en}
1730
- * @platform android
1731
- * @detail api
1732
- * @brief Gets the ID of the primary system audio stream.
1733
- * @order 86
1734
- *
1735
- */
1736
- android_getOriginSystemAudioStream(): number;
1737
-
1738
- /** {en}
1739
- * @detail api
1740
- * @brief Sends a custom video frame with a specified stream ID.
1741
- * @param frame The custom video frame. See VeLiveVideoFrame {@link #VeLiveVideoFrame} for details.
1742
- * @param streamId The ID of the video stream to mix.
1743
- * @order 87
1744
- *
1745
- */
1746
- sendCustomVideoFrame(frame: VeLiveVideoFrame, streamId: number): void;
1747
-
1748
- /** {en}
1749
- * @detail api
1750
- * @brief Sends a custom audio frame with a specified stream ID.
1751
- * @param frame The custom audio frame. See VeLiveAudioFrame {@link #VeLiveAudioFrame} for details.
1752
- * @param streamId The ID of the audio stream to mix.
1753
- * @order 88
1754
- *
1755
- */
1756
- sendCustomAudioFrame(frame: VeLiveAudioFrame, streamId: number): void;
1757
-
1758
- /** {en}
1759
- * @detail api
1760
- * @brief Updates the configurations for audio and video mixing.
1761
- * @param mixDescription The updated configurations for audio and video mixing. See VeLiveStreamMixDescription {@link #VeLiveStreamMixDescription} for details.
1762
- *
1763
- */
1764
- updateStreamMixDescription(mixDescription: VeLiveStreamMixDescription): void;
1765
-
1766
- /** {en}
1767
- * @detail api
1768
- * @brief Removes a non-primary video stream from the mixer.
1769
- * @param streamId The ID of the video stream to remove.
1770
- * @order 80
1771
- *
1772
- */
1773
- removeVideoStream(streamId: number): void;
1774
-
1775
- /** {en}
1776
- * @detail api
1777
- * @brief Removes a non-primary audio stream from the mixer.
1778
- * @param streamId The ID of the audio stream to remove.
1779
- * @order 82
1780
- *
1781
- */
1782
- removeAudioStream(streamId: number): void;
1783
-
1784
- /** {en}
1785
- * @platform ios
1786
- * @detail api
1787
- * @brief Sets the volume of a non-primary audio stream. If you set VeLiveAudioMixType{@link #VeLiveAudioMixType} to `VeLiveAudioMixPlayAndPush`, this method takes effect on both the host and the audience sides.
1788
- * @param streamId The audio stream ID.
1789
- * @param volume The audio volume. The value range is [0.0,4.0].
1790
- * @order 70
1791
- */
1792
- ios_setAudioStream(streamId: number, volume: number): void;
1793
-
1794
- /** {en}
1795
- * @platform ios
1796
- */
1797
- ios_getAppAudioStream(): number;
1798
- }
1799
-
1800
1668
  export declare class VeLiveAudioFrame {
1801
1669
  constructor();
1802
1670
  constructor(sampleRate: VeLiveAudioSampleRate, channel: VeLiveAudioChannel, pts: number, buffer: ByteBuffer);
@@ -1,2 +1,17 @@
1
- import { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLiveMixerManager, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame } from '../codegen/pack/api';
2
- export { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLiveMixerManager, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame, _VeLivePusher as VeLivePusher, };
1
+ import { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame } from '../codegen/pack/api';
2
+ import { VeLiveMixerManager } from './mixer';
3
+ declare module '../codegen/pack/api' {
4
+ interface VeLivePusher {
5
+
6
+ /** {en}
7
+ * @detail api
8
+ * @brief Gets the audio and video mixer.
9
+ * @return <br>
10
+ * The audio and video mixer. See VeLiveMixerManager {@link #VeLiveMixerManager} for details.
11
+ * @order 51
12
+ *
13
+ */
14
+ getMixerManager(): VeLiveMixerManager;
15
+ }
16
+ }
17
+ export { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame, _VeLivePusher as VeLivePusher, };
@@ -1,2 +1,17 @@
1
1
  import { 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, VeLiveOrientation } from '../codegen/pack/keytype';
2
+ export interface MixConfig {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ zOrder?: number;
8
+ renderMode?: number;
9
+ captureMode?: 'onchange' | 'realtime' | 'auto' | 'manual';
10
+ }
11
+ export interface MixViewConfig {
12
+ renderMode?: number;
13
+ captureMode?: 'onchange' | 'realtime' | 'auto' | 'manual';
14
+ captureFramerate?: number;
15
+ autoSensitivity?: number;
16
+ }
2
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, };
@@ -0,0 +1,26 @@
1
+ import type { VeLivePusher } from './api';
2
+ import { VeLiveMixerManager as AndroidVeLiveMixerManager } from '../platforms/android/mixer';
3
+ import { VeLiveMixerManager as iOSVeLiveMixerManager } from '../platforms/ios/mixer';
4
+ import type { MixConfig } from './keytype';
5
+ export declare class VeLiveMixerManager {
6
+ private _pusher;
7
+ private _views;
8
+ protected _instance: AndroidVeLiveMixerManager | iOSVeLiveMixerManager;
9
+ protected __init(): void;
10
+ protected __new_instance(): AndroidVeLiveMixerManager | iOSVeLiveMixerManager;
11
+ constructor(pusher: VeLivePusher);
12
+ /**
13
+ * Add view to mixer - support hybrid-runtime way
14
+ * @param viewId viewId string
15
+ * @param config mixer configuration
16
+ */
17
+ addView(viewId: string, config: MixConfig): Promise<boolean>;
18
+ /**
19
+ * Update view configuration
20
+ */
21
+ updateView(viewId: string, config: Partial<MixConfig>): Promise<boolean>;
22
+ /**
23
+ * Remove view
24
+ */
25
+ removeView(viewId: string): Promise<boolean>;
26
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './component';
2
2
  export * from './core';
3
+ export * from './view';
@@ -0,0 +1,8 @@
1
+ import { NativeView } from '@vcloud-lux/hybrid-runtime';
2
+ export declare class SurfaceHolder {
3
+ }
4
+ export declare class NativeSurfaceView extends NativeView {
5
+ getHolder(): Promise<SurfaceHolder>;
6
+ }
7
+ export declare class AndroidView extends NativeView {
8
+ }
@@ -0,0 +1,8 @@
1
+ import type { VeLivePusher } from '../../codegen/android';
2
+ import type { MixViewConfig } from '../../core/keytype';
3
+ export declare class VeLiveMixerManager {
4
+ setPusher(pusher: VeLivePusher): void;
5
+ addView(viewId: string, config: MixViewConfig): Promise<boolean>;
6
+ updateView(viewId: string, config: MixViewConfig): Promise<boolean>;
7
+ removeView(viewId: string): Promise<boolean>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import type { VeLivePusher } from '../../codegen/ios';
2
+ import type { MixViewConfig } from '../../core/keytype';
3
+ export declare class VeLiveMixerManager {
4
+ setPusher(pusher: VeLivePusher): void;
5
+ addView(viewId: string, config: MixViewConfig): Promise<number>;
6
+ updateView(viewId: string, config: MixViewConfig): Promise<boolean>;
7
+ removeView(viewId: string): Promise<boolean>;
8
+ captureView(viewId: string): Promise<void>;
9
+ }
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ import type { MixViewConfig } from '../core/keytype';
4
+ export interface NativeMixViewProps extends ViewProps, Partial<MixViewConfig> {
5
+ children?: React.ReactNode;
6
+ /**
7
+ * Capture mode determines when to capture bitmap for mixing:
8
+ *
9
+ * - 'onchange': Capture only when view layout/content changes (DEFAULT)
10
+ * Best for: static UI elements, text, static images
11
+ * Performance: Optimal - minimal CPU usage
12
+ *
13
+ * - 'realtime': Capture at streaming framerate (e.g., 30fps)
14
+ * Best for: WebView animations, GIF images, custom animations
15
+ * Performance: Higher CPU usage but smooth animation
16
+ *
17
+ * - 'manual': User controls capture timing via ref methods
18
+ * Best for: Custom scenarios where you want full control
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
+ */
24
+ captureMode?: 'onchange' | 'realtime' | 'manual' | 'auto';
25
+ /**
26
+ * For realtime mode: custom framerate (default uses stream framerate)
27
+ */
28
+ 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
+ }
35
+ export interface MixViewEventProps {
36
+ /**
37
+ * viewId, if not provided, will be generated automatically
38
+ */
39
+ viewId?: string;
40
+ /**
41
+ * onViewMount, called when the view is mounted
42
+ */
43
+ onViewMount?: (viewId: string) => void;
44
+ /**
45
+ * onViewUnmount, called when the view is unmounted
46
+ */
47
+ onViewUnmount?: (viewId: string) => void;
48
+ }
49
+ export interface MixViewProps extends MixViewEventProps, NativeMixViewProps {
50
+ }
51
+ export declare const NativeMixView: import("react-native").HostComponent<MixViewProps>;
52
+ export declare const MixView: React.ForwardRefExoticComponent<MixViewProps & React.RefAttributes<any>>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { Image, type ImageProps } from 'react-native';
3
+ import type { MixViewConfig } from '../core/keytype';
4
+ import { type MixViewEventProps, type MixViewProps } from './MixView';
5
+ export interface VeImageViewProps extends MixViewEventProps, ImageProps, Partial<MixViewConfig> {
6
+ children?: React.ReactNode;
7
+ /**
8
+ * Whether the image is animated (GIF, WebP, etc.)
9
+ * If true, will automatically use 'realtime' capture mode
10
+ */
11
+ animated?: boolean;
12
+ /**
13
+ * Override capture mode
14
+ * - If not specified and animated=true, uses 'realtime'
15
+ * - If not specified and animated=false/undefined, uses 'onchange'
16
+ */
17
+ captureMode?: MixViewProps['captureMode'];
18
+ }
19
+ export declare const VeImageView: React.ForwardRefExoticComponent<VeImageViewProps & React.RefAttributes<Image>>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { Text, type TextProps } from 'react-native';
3
+ import type { MixViewConfig } from '../core/keytype';
4
+ import { type MixViewEventProps } from './MixView';
5
+ export interface VeTextViewProps extends MixViewEventProps, TextProps, MixViewConfig {
6
+ }
7
+ export declare const VeTextView: React.ForwardRefExoticComponent<VeTextViewProps & React.RefAttributes<Text>>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import type { MixViewConfig } from '../core/keytype';
4
+ import { type MixViewEventProps } from './MixView';
5
+ export interface VeViewProps extends MixViewEventProps, ViewProps, MixViewConfig {
6
+ }
7
+ export declare const VeView: React.ForwardRefExoticComponent<VeViewProps & React.RefAttributes<View>>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import type { MixViewConfig } from '../core/keytype';
4
+ import { type MixViewEventProps } from './MixView';
5
+ export interface VeWebViewProps extends MixViewEventProps, ViewProps, MixViewConfig {
6
+ }
7
+ export declare const VeWebView: React.ForwardRefExoticComponent<VeWebViewProps & React.RefAttributes<View>>;
@@ -0,0 +1,5 @@
1
+ export { VeView, type VeViewProps } from './VeView';
2
+ export { VeTextView, type VeTextViewProps } from './VeTextView';
3
+ export { VeImageView, type VeImageViewProps } from './VeImageView';
4
+ export { VeWebView, type VeWebViewProps } from './VeWebView';
5
+ export { MixView, NativeMixView, type MixViewProps } from './MixView';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/react-native-live-push",
3
- "version": "1.1.3-rc.0",
3
+ "version": "1.1.3-rc.2",
4
4
  "peerDependencies": {
5
5
  "react": "*",
6
6
  "react-native": "*"