@byteplus/react-native-live-push 1.1.3-rc.4 → 1.2.0-rc.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 (59) hide show
  1. package/android/build.gradle +2 -2
  2. package/android/src/main/java/com/volcengine/velive/rn/push/ClassHelper.java +9 -0
  3. package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +5 -8
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +1 -0
  5. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +1 -3
  6. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +33 -22
  7. package/ios/VeLiveMixerHelper.h +7 -5
  8. package/ios/VeLiveMixerHelper.m +1 -1
  9. package/ios/VeLiveMixerViewManager.m +2 -2
  10. package/lib/commonjs/index.js +23202 -20302
  11. package/lib/commonjs/typescript/android/index.d.ts +0 -3
  12. package/lib/commonjs/typescript/codegen/android/api.d.ts +190 -644
  13. package/lib/commonjs/typescript/codegen/android/callback.d.ts +234 -2
  14. package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +66 -0
  15. package/lib/commonjs/typescript/codegen/android/keytype.d.ts +1014 -181
  16. package/lib/commonjs/typescript/codegen/ios/api.d.ts +890 -0
  17. package/lib/commonjs/typescript/codegen/ios/callback.d.ts +162 -0
  18. package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +101 -1
  19. package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +694 -0
  20. package/lib/commonjs/typescript/codegen/pack/api.d.ts +303 -686
  21. package/lib/commonjs/typescript/codegen/pack/callback.d.ts +37 -38
  22. package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +75 -5
  23. package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +1002 -298
  24. package/lib/commonjs/typescript/core/api.d.ts +2 -1
  25. package/lib/commonjs/typescript/core/pusher.d.ts +0 -3
  26. package/lib/module/index.js +23203 -20302
  27. package/lib/module/typescript/android/index.d.ts +0 -3
  28. package/lib/module/typescript/codegen/android/api.d.ts +190 -644
  29. package/lib/module/typescript/codegen/android/callback.d.ts +234 -2
  30. package/lib/module/typescript/codegen/android/errorcode.d.ts +66 -0
  31. package/lib/module/typescript/codegen/android/keytype.d.ts +1014 -181
  32. package/lib/module/typescript/codegen/ios/api.d.ts +890 -0
  33. package/lib/module/typescript/codegen/ios/callback.d.ts +162 -0
  34. package/lib/module/typescript/codegen/ios/errorcode.d.ts +101 -1
  35. package/lib/module/typescript/codegen/ios/keytype.d.ts +694 -0
  36. package/lib/module/typescript/codegen/pack/api.d.ts +303 -686
  37. package/lib/module/typescript/codegen/pack/callback.d.ts +37 -38
  38. package/lib/module/typescript/codegen/pack/errorcode.d.ts +75 -5
  39. package/lib/module/typescript/codegen/pack/keytype.d.ts +1002 -298
  40. package/lib/module/typescript/core/api.d.ts +2 -1
  41. package/lib/module/typescript/core/pusher.d.ts +0 -3
  42. package/lib/typescript/android/index.d.ts +0 -3
  43. package/lib/typescript/codegen/android/api.d.ts +190 -644
  44. package/lib/typescript/codegen/android/callback.d.ts +234 -2
  45. package/lib/typescript/codegen/android/errorcode.d.ts +66 -0
  46. package/lib/typescript/codegen/android/keytype.d.ts +1014 -181
  47. package/lib/typescript/codegen/ios/api.d.ts +890 -0
  48. package/lib/typescript/codegen/ios/callback.d.ts +162 -0
  49. package/lib/typescript/codegen/ios/errorcode.d.ts +101 -1
  50. package/lib/typescript/codegen/ios/keytype.d.ts +694 -0
  51. package/lib/typescript/codegen/pack/api.d.ts +303 -686
  52. package/lib/typescript/codegen/pack/callback.d.ts +37 -38
  53. package/lib/typescript/codegen/pack/errorcode.d.ts +75 -5
  54. package/lib/typescript/codegen/pack/keytype.d.ts +1002 -298
  55. package/lib/typescript/core/api.d.ts +2 -1
  56. package/lib/typescript/core/pusher.d.ts +0 -3
  57. package/package.json +1 -1
  58. package/react-native-velive-push.podspec +3 -3
  59. package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +0 -73
@@ -1,4 +1,5 @@
1
- import { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLiveVideoEffectManager, VeLiveVideoFrame } from '../codegen/pack/api';
1
+ import { VeLiveAudioDevice, VeLiveCameraDevice, VeLiveMediaPlayer, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLiveVideoEffectManager } from '../codegen/pack/api';
2
+ import { VeLiveAudioFrame, VeLiveVideoFrame } from '../codegen/pack/keytype';
2
3
  import { VeLiveMixerManager } from './mixer';
3
4
  declare module '../codegen/pack/api' {
4
5
  interface VeLivePusher {
@@ -11,6 +11,3 @@ export interface InitOptions extends Partial<VeLivePusherConfiguration> {
11
11
  }
12
12
  export declare function initPusher(options: InitOptions): Promise<VeLivePusher>;
13
13
  export declare function relaunchPusher(options: InitOptions): Promise<VeLivePusher>;
14
- export declare function startScreenCapture(pusher: VeLivePusher, options: {
15
- enableAppAudio: boolean;
16
- }): Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/react-native-live-push",
3
- "version": "1.1.3-rc.4",
3
+ "version": "1.2.0-rc.0",
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.2.3'
53
- s.dependency 'TTSDKFramework/Core', '1.41.300.7-premium'
54
- s.dependency 'TTSDKFramework/LivePush-RTS', '1.41.300.7-premium'
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'
55
55
  end
@@ -1,73 +0,0 @@
1
- package com.volcengine.velive.rn.push;
2
-
3
- import static android.content.Context.MEDIA_PROJECTION_SERVICE;
4
-
5
- import static com.volcengine.VolcApiEngine.runtime.NativeVariableManager.*;
6
-
7
- import android.app.Activity;
8
- import android.content.Intent;
9
- import android.media.projection.MediaProjectionManager;
10
-
11
- import androidx.annotation.NonNull;
12
- import androidx.annotation.Nullable;
13
- import androidx.appcompat.app.AppCompatActivity;
14
-
15
- import com.facebook.react.bridge.ActivityEventListener;
16
- import com.facebook.react.bridge.ReactApplicationContext;
17
-
18
- public class ScreenCaptureHelper {
19
- static final int SCREEN_RECORD_REQUEST_CODE = 1010;
20
-
21
- private final ReactApplicationContext reactApplicationContext;
22
-
23
- private AsyncVariableGetterCallback<Intent> mCallback;
24
-
25
- ScreenCaptureHelper(ReactApplicationContext reactApplicationContext) {
26
- this.reactApplicationContext = reactApplicationContext;
27
- }
28
-
29
- ReactApplicationContext getReactApplicationContext() {
30
- return this.reactApplicationContext;
31
- }
32
-
33
- public void setup() {
34
- getReactApplicationContext().addActivityEventListener(new ActivityEventListener() {
35
- @Override
36
- public void onActivityResult(Activity activity, int requestCode, int resultCode, @Nullable Intent intent) {
37
- if (requestCode != SCREEN_RECORD_REQUEST_CODE) {
38
- return;
39
- }
40
-
41
- // success
42
- if (resultCode == AppCompatActivity.RESULT_OK) {
43
- if (mCallback != null) {
44
- mCallback.resolve(null, intent);
45
- mCallback = null;
46
- }
47
- return;
48
- }
49
-
50
- // error
51
- if (mCallback != null) {
52
- mCallback.resolve(new Exception("permission error"), null);
53
- mCallback = null;
54
- }
55
- }
56
-
57
- @Override
58
- public void onNewIntent(Intent intent) {
59
- }
60
- });
61
- }
62
-
63
- public void getScreenIntent(Object[] args, @NonNull AsyncVariableGetterCallback cb) {
64
- this.mCallback = cb;
65
- this.requestPermission();
66
- }
67
-
68
- private void requestPermission() {
69
- MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getReactApplicationContext().getSystemService(MEDIA_PROJECTION_SERVICE);
70
- Intent permissionIntent = mediaProjectionManager.createScreenCaptureIntent();
71
- getReactApplicationContext().getCurrentActivity().startActivityForResult(permissionIntent, SCREEN_RECORD_REQUEST_CODE);
72
- }
73
- }