@byteplus/react-native-live-push 1.1.3-rc.3 → 1.1.4-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 (123) hide show
  1. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +2 -13
  2. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +13 -16
  3. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +0 -16
  4. package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +2 -7
  5. package/lib/commonjs/index.js +2126 -2925
  6. package/lib/module/index.js +2128 -2922
  7. package/lib/typescript/codegen/android/api.d.ts +121 -1
  8. package/lib/typescript/codegen/ios/api.d.ts +28 -1
  9. package/lib/typescript/codegen/pack/api.d.ts +133 -1
  10. package/lib/typescript/core/api.d.ts +2 -17
  11. package/lib/typescript/core/keytype.d.ts +0 -15
  12. package/lib/typescript/index.d.ts +0 -1
  13. package/package.json +1 -1
  14. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +0 -397
  15. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +0 -423
  16. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +0 -79
  17. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +0 -168
  18. package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +0 -165
  19. package/ios/VeLiveMixerHelper.h +0 -44
  20. package/ios/VeLiveMixerHelper.m +0 -591
  21. package/ios/VeLiveMixerView.h +0 -69
  22. package/ios/VeLiveMixerView.m +0 -592
  23. package/ios/VeLiveMixerViewManager.m +0 -92
  24. package/lib/commonjs/typescript/android/index.d.ts +0 -47
  25. package/lib/commonjs/typescript/codegen/android/api.d.ts +0 -1527
  26. package/lib/commonjs/typescript/codegen/android/callback.d.ts +0 -91
  27. package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +0 -26
  28. package/lib/commonjs/typescript/codegen/android/index.d.ts +0 -5
  29. package/lib/commonjs/typescript/codegen/android/keytype.d.ts +0 -846
  30. package/lib/commonjs/typescript/codegen/android/types.d.ts +0 -33
  31. package/lib/commonjs/typescript/codegen/ios/api.d.ts +0 -222
  32. package/lib/commonjs/typescript/codegen/ios/callback.d.ts +0 -80
  33. package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +0 -54
  34. package/lib/commonjs/typescript/codegen/ios/external.d.ts +0 -1
  35. package/lib/commonjs/typescript/codegen/ios/index.d.ts +0 -6
  36. package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +0 -460
  37. package/lib/commonjs/typescript/codegen/ios/types.d.ts +0 -46
  38. package/lib/commonjs/typescript/codegen/pack/api.d.ts +0 -1835
  39. package/lib/commonjs/typescript/codegen/pack/callback.d.ts +0 -400
  40. package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +0 -35
  41. package/lib/commonjs/typescript/codegen/pack/index.d.ts +0 -5
  42. package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +0 -1392
  43. package/lib/commonjs/typescript/codegen/pack/types.d.ts +0 -68
  44. package/lib/commonjs/typescript/codegen/type-shim.d.ts +0 -6
  45. package/lib/commonjs/typescript/component.d.ts +0 -15
  46. package/lib/commonjs/typescript/core/api.d.ts +0 -17
  47. package/lib/commonjs/typescript/core/callback.d.ts +0 -2
  48. package/lib/commonjs/typescript/core/env.d.ts +0 -29
  49. package/lib/commonjs/typescript/core/errorcode.d.ts +0 -2
  50. package/lib/commonjs/typescript/core/index.d.ts +0 -6
  51. package/lib/commonjs/typescript/core/keytype.d.ts +0 -17
  52. package/lib/commonjs/typescript/core/mixer.d.ts +0 -26
  53. package/lib/commonjs/typescript/core/pusher.d.ts +0 -16
  54. package/lib/commonjs/typescript/index.d.ts +0 -3
  55. package/lib/commonjs/typescript/ios/extends.d.ts +0 -41
  56. package/lib/commonjs/typescript/platforms/android/extends.d.ts +0 -8
  57. package/lib/commonjs/typescript/platforms/android/helper.d.ts +0 -8
  58. package/lib/commonjs/typescript/platforms/android/mixer.d.ts +0 -8
  59. package/lib/commonjs/typescript/platforms/ios/extends.d.ts +0 -17
  60. package/lib/commonjs/typescript/platforms/ios/helper.d.ts +0 -8
  61. package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +0 -9
  62. package/lib/commonjs/typescript/runtime.d.ts +0 -1
  63. package/lib/commonjs/typescript/view/MixView.d.ts +0 -52
  64. package/lib/commonjs/typescript/view/VeImageView.d.ts +0 -19
  65. package/lib/commonjs/typescript/view/VeTextView.d.ts +0 -7
  66. package/lib/commonjs/typescript/view/VeView.d.ts +0 -7
  67. package/lib/commonjs/typescript/view/VeWebView.d.ts +0 -7
  68. package/lib/commonjs/typescript/view/index.d.ts +0 -5
  69. package/lib/module/typescript/android/index.d.ts +0 -47
  70. package/lib/module/typescript/codegen/android/api.d.ts +0 -1527
  71. package/lib/module/typescript/codegen/android/callback.d.ts +0 -91
  72. package/lib/module/typescript/codegen/android/errorcode.d.ts +0 -26
  73. package/lib/module/typescript/codegen/android/index.d.ts +0 -5
  74. package/lib/module/typescript/codegen/android/keytype.d.ts +0 -846
  75. package/lib/module/typescript/codegen/android/types.d.ts +0 -33
  76. package/lib/module/typescript/codegen/ios/api.d.ts +0 -222
  77. package/lib/module/typescript/codegen/ios/callback.d.ts +0 -80
  78. package/lib/module/typescript/codegen/ios/errorcode.d.ts +0 -54
  79. package/lib/module/typescript/codegen/ios/external.d.ts +0 -1
  80. package/lib/module/typescript/codegen/ios/index.d.ts +0 -6
  81. package/lib/module/typescript/codegen/ios/keytype.d.ts +0 -460
  82. package/lib/module/typescript/codegen/ios/types.d.ts +0 -46
  83. package/lib/module/typescript/codegen/pack/api.d.ts +0 -1835
  84. package/lib/module/typescript/codegen/pack/callback.d.ts +0 -400
  85. package/lib/module/typescript/codegen/pack/errorcode.d.ts +0 -35
  86. package/lib/module/typescript/codegen/pack/index.d.ts +0 -5
  87. package/lib/module/typescript/codegen/pack/keytype.d.ts +0 -1392
  88. package/lib/module/typescript/codegen/pack/types.d.ts +0 -68
  89. package/lib/module/typescript/codegen/type-shim.d.ts +0 -6
  90. package/lib/module/typescript/component.d.ts +0 -15
  91. package/lib/module/typescript/core/api.d.ts +0 -17
  92. package/lib/module/typescript/core/callback.d.ts +0 -2
  93. package/lib/module/typescript/core/env.d.ts +0 -29
  94. package/lib/module/typescript/core/errorcode.d.ts +0 -2
  95. package/lib/module/typescript/core/index.d.ts +0 -6
  96. package/lib/module/typescript/core/keytype.d.ts +0 -17
  97. package/lib/module/typescript/core/mixer.d.ts +0 -26
  98. package/lib/module/typescript/core/pusher.d.ts +0 -16
  99. package/lib/module/typescript/index.d.ts +0 -3
  100. package/lib/module/typescript/ios/extends.d.ts +0 -41
  101. package/lib/module/typescript/platforms/android/extends.d.ts +0 -8
  102. package/lib/module/typescript/platforms/android/helper.d.ts +0 -8
  103. package/lib/module/typescript/platforms/android/mixer.d.ts +0 -8
  104. package/lib/module/typescript/platforms/ios/extends.d.ts +0 -17
  105. package/lib/module/typescript/platforms/ios/helper.d.ts +0 -8
  106. package/lib/module/typescript/platforms/ios/mixer.d.ts +0 -9
  107. package/lib/module/typescript/runtime.d.ts +0 -1
  108. package/lib/module/typescript/view/MixView.d.ts +0 -52
  109. package/lib/module/typescript/view/VeImageView.d.ts +0 -19
  110. package/lib/module/typescript/view/VeTextView.d.ts +0 -7
  111. package/lib/module/typescript/view/VeView.d.ts +0 -7
  112. package/lib/module/typescript/view/VeWebView.d.ts +0 -7
  113. package/lib/module/typescript/view/index.d.ts +0 -5
  114. package/lib/typescript/core/mixer.d.ts +0 -26
  115. package/lib/typescript/platforms/android/extends.d.ts +0 -8
  116. package/lib/typescript/platforms/android/mixer.d.ts +0 -8
  117. package/lib/typescript/platforms/ios/mixer.d.ts +0 -9
  118. package/lib/typescript/view/MixView.d.ts +0 -52
  119. package/lib/typescript/view/VeImageView.d.ts +0 -19
  120. package/lib/typescript/view/VeTextView.d.ts +0 -7
  121. package/lib/typescript/view/VeView.d.ts +0 -7
  122. package/lib/typescript/view/VeWebView.d.ts +0 -7
  123. package/lib/typescript/view/index.d.ts +0 -5
@@ -82,19 +82,8 @@ public class VeLivePushModule extends VeLivePushModuleSpec implements IEventRece
82
82
  try {
83
83
  newApiEngine();
84
84
  String params = arg.getString("params");
85
-
86
- // 获取主线程处理器
87
- android.os.Handler mainHandler =
88
- new android.os.Handler(android.os.Looper.getMainLooper());
89
-
90
- // 在主线程上执行 API 调用
91
- mainHandler.post(() -> {
92
- try {
93
- this.apiEngine.callApi(
94
- params, (res) -> { callback.invoke(res.toJsonString()); });
95
- } catch (Exception e) {
96
- e.printStackTrace();
97
- }
85
+ this.apiEngine.callApi(params, (res) -> {
86
+ callback.invoke(res.toJsonString());
98
87
  });
99
88
  } catch (Exception e) {
100
89
  e.printStackTrace();
@@ -4,27 +4,24 @@ import com.facebook.react.ReactPackage;
4
4
  import com.facebook.react.bridge.NativeModule;
5
5
  import com.facebook.react.bridge.ReactApplicationContext;
6
6
  import com.facebook.react.uimanager.ViewManager;
7
- import com.volcengine.velive.rn.push.mixer.MixerViewManager;
7
+
8
8
  import java.util.ArrayList;
9
9
  import java.util.List;
10
10
 
11
11
  public class VeLivePushPackage implements ReactPackage {
12
- @Override
13
- public List<ViewManager>
14
- createViewManagers(ReactApplicationContext reactContext) {
15
- List<ViewManager> viewManagers = new ArrayList<>();
16
- viewManagers.add(new VeLivePushViewManager());
17
- viewManagers.add(new MixerViewManager());
18
- return viewManagers;
19
- }
12
+ @Override
13
+ public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
14
+ List<ViewManager> viewManagers = new ArrayList<>();
15
+ viewManagers.add(new VeLivePushViewManager());
16
+ return viewManagers;
17
+ }
20
18
 
21
- @Override
22
- public List<NativeModule>
23
- createNativeModules(ReactApplicationContext reactContext) {
24
- List<NativeModule> modules = new ArrayList<>();
19
+ @Override
20
+ public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
21
+ List<NativeModule> modules = new ArrayList<>();
25
22
 
26
- modules.add(new VeLivePushModule(reactContext));
23
+ modules.add(new VeLivePushModule(reactContext));
27
24
 
28
- return modules;
29
- }
25
+ return modules;
26
+ }
30
27
  }
@@ -123,20 +123,4 @@ public class VeLivePushView extends FrameLayout {
123
123
  reactContext.getJSModule(RCTEventEmitter.class)
124
124
  .receiveEvent(getId(), "load", event);
125
125
  }
126
-
127
- @Override
128
- protected void onAttachedToWindow() {
129
- super.onAttachedToWindow();
130
- if (viewId != null && hasRegister) {
131
- VolcViewManager.putViewById(viewId, this);
132
- }
133
- }
134
-
135
- @Override
136
- protected void onDetachedFromWindow() {
137
- super.onDetachedFromWindow();
138
- if (viewId != null) {
139
- // VolcViewManager.removeViewById(viewId);
140
- }
141
- }
142
126
  }
@@ -3,8 +3,6 @@ package com.volcengine.velive.rn.push;
3
3
  import android.os.Looper;
4
4
  import androidx.annotation.NonNull;
5
5
  import androidx.annotation.Nullable;
6
-
7
- import com.facebook.react.bridge.ReactApplicationContext;
8
6
  import com.facebook.react.bridge.ReadableArray;
9
7
  import com.facebook.react.common.MapBuilder;
10
8
  import com.facebook.react.uimanager.SimpleViewManager;
@@ -14,10 +12,8 @@ import java.util.Map;
14
12
 
15
13
  public class VeLivePushViewManager extends SimpleViewManager<VeLivePushView> {
16
14
  public static final String NAME = "VeLivePushView";
17
-
18
- public static ReactApplicationContext ctx;
19
-
20
- public ThemedReactContext context;
15
+
16
+ private ThemedReactContext context;
21
17
 
22
18
  @NonNull
23
19
  @Override
@@ -35,7 +31,6 @@ public class VeLivePushViewManager extends SimpleViewManager<VeLivePushView> {
35
31
  "View must be created on the main thread");
36
32
  }
37
33
  context = reactContext;
38
- ctx = context.getReactApplicationContext();
39
34
  return new VeLivePushView(reactContext);
40
35
  }
41
36