@byteplus/react-native-live-push 1.0.2 → 1.0.3-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.
- package/LICENSE +1 -1
- package/README.md +2 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +1 -1
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +5 -3
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +10 -5
- package/ios/VeLivePushView.m +1 -1
- package/ios/VeLivePushViewManager.m +5 -1
- package/lib/commonjs/index.js +21799 -17839
- package/lib/module/index.js +21799 -17832
- package/lib/typescript/android/index.d.ts +3 -0
- package/lib/typescript/codegen/android/api.d.ts +1350 -75
- package/lib/typescript/codegen/android/keytype.d.ts +439 -62
- package/lib/typescript/codegen/android/types.d.ts +7 -6
- package/lib/typescript/codegen/ios/api.d.ts +11 -19
- package/lib/typescript/codegen/ios/callback.d.ts +17 -25
- package/lib/typescript/codegen/ios/external.d.ts +1 -0
- package/lib/typescript/codegen/ios/index.d.ts +1 -0
- package/lib/typescript/codegen/ios/keytype.d.ts +6 -34
- package/lib/typescript/codegen/ios/types.d.ts +16 -5
- package/lib/typescript/codegen/pack/api.d.ts +1250 -1216
- package/lib/typescript/codegen/pack/callback.d.ts +153 -295
- package/lib/typescript/codegen/pack/errorcode.d.ts +11 -150
- package/lib/typescript/codegen/pack/index.d.ts +1 -1
- package/lib/typescript/codegen/pack/keytype.d.ts +806 -1366
- package/lib/typescript/codegen/pack/types.d.ts +67 -0
- package/lib/typescript/component.d.ts +10 -3
- package/lib/typescript/core/api.d.ts +2 -2
- package/lib/typescript/core/callback.d.ts +2 -2
- package/lib/typescript/core/errorcode.d.ts +2 -2
- package/lib/typescript/core/keytype.d.ts +2 -7
- package/lib/typescript/platforms/ios/extends.d.ts +17 -0
- package/package.json +7 -4
- package/react-native-velive-push.podspec +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright 2024
|
|
3
|
+
Copyright 2024 BytePlus Pte Ltd.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -87,6 +87,6 @@ dependencies {
|
|
|
87
87
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
88
88
|
//noinspection GradleDynamicVersion
|
|
89
89
|
implementation "com.facebook.react:react-native:+"
|
|
90
|
-
implementation "com.volcengine:VolcApiEngine:1.
|
|
91
|
-
implementation 'com.bytedanceapi:ttsdk-ttlivepush_rtc:1.41.
|
|
90
|
+
implementation "com.volcengine:VolcApiEngine:1.2.3"
|
|
91
|
+
implementation 'com.bytedanceapi:ttsdk-ttlivepush_rtc:1.41.300.103'
|
|
92
92
|
}
|
|
@@ -3,7 +3,7 @@ package com.volcengine.velive.rn.push;
|
|
|
3
3
|
import androidx.annotation.NonNull;
|
|
4
4
|
|
|
5
5
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
6
|
-
import com.volcengine.VolcApiEngine
|
|
6
|
+
import com.volcengine.VolcApiEngine.*;
|
|
7
7
|
|
|
8
8
|
public class NativeVariableManager {
|
|
9
9
|
static void init(@NonNull VolcApiEngine apiEngine, ReactApplicationContext reactContext) {
|
|
@@ -3,6 +3,7 @@ package com.volcengine.velive.rn.push;
|
|
|
3
3
|
import static com.volcengine.VolcApiEngine.runtime.Util.JsonAbleClass;
|
|
4
4
|
|
|
5
5
|
import android.util.Log;
|
|
6
|
+
import android.view.View;
|
|
6
7
|
|
|
7
8
|
import androidx.annotation.Nullable;
|
|
8
9
|
|
|
@@ -18,12 +19,13 @@ import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
|
18
19
|
import com.ss.avframework.live.VeLivePusherConfiguration;
|
|
19
20
|
import com.ss.avframework.live.VeLivePusherDef;
|
|
20
21
|
import com.ss.avframework.live.VeLivePusherObserver;
|
|
21
|
-
import com.
|
|
22
|
+
import com.ss.avframework.live.statistics.VeLivePusherStatisticsExt;
|
|
23
|
+
import com.volcengine.VolcApiEngine.*;
|
|
22
24
|
import com.volcengine.VolcApiEngine.view.*;
|
|
23
25
|
|
|
24
26
|
public class VeLivePushModule extends VeLivePushModuleSpec implements IEventReceiver {
|
|
25
27
|
static {
|
|
26
|
-
JsonAbleClass.add(
|
|
28
|
+
JsonAbleClass.add(VeLivePusherStatisticsExt.class);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
VolcApiEngine apiEngine = null;
|
|
@@ -176,7 +178,7 @@ public class VeLivePushModule extends VeLivePushModuleSpec implements IEventRece
|
|
|
176
178
|
}
|
|
177
179
|
});
|
|
178
180
|
|
|
179
|
-
mLivePusher.setRenderView(VolcViewManager.getViewById("live-pusher"));
|
|
181
|
+
mLivePusher.setRenderView((View) VolcViewManager.getViewById("live-pusher"));
|
|
180
182
|
mLivePusher.startVideoCapture(VeLivePusherDef.VeLiveVideoCaptureType.VeLiveVideoCaptureFrontCamera);
|
|
181
183
|
}
|
|
182
184
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package com.volcengine.velive.rn.push;
|
|
2
2
|
|
|
3
|
+
import android.os.Looper;
|
|
3
4
|
import android.view.SurfaceView;
|
|
4
5
|
import android.view.View;
|
|
5
6
|
|
|
@@ -15,7 +16,7 @@ import com.volcengine.VolcApiEngine.view.*;
|
|
|
15
16
|
|
|
16
17
|
import java.util.Map;
|
|
17
18
|
|
|
18
|
-
public class VeLivePushViewManager extends SimpleViewManager<VeLivePushView>
|
|
19
|
+
public class VeLivePushViewManager extends SimpleViewManager<VeLivePushView> {
|
|
19
20
|
public static final String NAME = "VeLivePushView";
|
|
20
21
|
|
|
21
22
|
private ThemedReactContext context;
|
|
@@ -28,9 +29,13 @@ public class VeLivePushViewManager extends SimpleViewManager<VeLivePushView> imp
|
|
|
28
29
|
|
|
29
30
|
@NonNull
|
|
30
31
|
@Override
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
protected VeLivePushView createViewInstance(@NonNull ThemedReactContext reactContext) {
|
|
33
|
+
// 确保在主线程创建
|
|
34
|
+
if (Looper.myLooper() != Looper.getMainLooper()) {
|
|
35
|
+
throw new IllegalStateException("View must be created on the main thread");
|
|
36
|
+
}
|
|
37
|
+
context = reactContext;
|
|
38
|
+
return new VeLivePushView(reactContext);
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
@ReactProp(name = "viewId")
|
|
@@ -80,7 +85,7 @@ public class VeLivePushViewManager extends SimpleViewManager<VeLivePushView> imp
|
|
|
80
85
|
"load",
|
|
81
86
|
MapBuilder.of(
|
|
82
87
|
"phasedRegistrationNames",
|
|
83
|
-
MapBuilder.of("bubbled", "
|
|
88
|
+
MapBuilder.of("bubbled", "onViewLoad")
|
|
84
89
|
)
|
|
85
90
|
).build();
|
|
86
91
|
}
|
package/ios/VeLivePushView.m
CHANGED
|
@@ -16,10 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
@implementation VeLivePushViewManager
|
|
18
18
|
|
|
19
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
20
|
+
return YES;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
RCT_EXPORT_MODULE(VeLivePushView)
|
|
20
24
|
|
|
21
25
|
// 导出 events
|
|
22
|
-
RCT_EXPORT_VIEW_PROPERTY(
|
|
26
|
+
RCT_EXPORT_VIEW_PROPERTY(onViewLoad, RCTBubblingEventBlock)
|
|
23
27
|
|
|
24
28
|
// 导出 events
|
|
25
29
|
RCT_CUSTOM_VIEW_PROPERTY(viewId, NSString, VeLivePushUIView)
|