@byteplus/react-native-live-push 1.0.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.
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/android/build.gradle +92 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +16 -0
- package/android/src/main/AndroidManifestNew.xml +16 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/ExternalSourceHelper.java +58 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +19 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +73 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +182 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModuleSpec.java +16 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +27 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +45 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +87 -0
- package/ios/VeLivePushSDK.h +24 -0
- package/ios/VeLivePushSDK.m +109 -0
- package/ios/VeLivePushView.h +24 -0
- package/ios/VeLivePushView.m +74 -0
- package/ios/VeLivePushViewManager.m +59 -0
- package/lib/commonjs/index.js +24238 -0
- package/lib/module/index.js +24186 -0
- package/lib/typescript/android/index.d.ts +44 -0
- package/lib/typescript/codegen/android/api.d.ts +372 -0
- package/lib/typescript/codegen/android/callback.d.ts +91 -0
- package/lib/typescript/codegen/android/errorcode.d.ts +26 -0
- package/lib/typescript/codegen/android/index.d.ts +5 -0
- package/lib/typescript/codegen/android/keytype.d.ts +469 -0
- package/lib/typescript/codegen/android/types.d.ts +32 -0
- package/lib/typescript/codegen/ios/api.d.ts +257 -0
- package/lib/typescript/codegen/ios/callback.d.ts +88 -0
- package/lib/typescript/codegen/ios/errorcode.d.ts +54 -0
- package/lib/typescript/codegen/ios/index.d.ts +5 -0
- package/lib/typescript/codegen/ios/keytype.d.ts +488 -0
- package/lib/typescript/codegen/ios/types.d.ts +35 -0
- package/lib/typescript/codegen/pack/api.d.ts +1933 -0
- package/lib/typescript/codegen/pack/callback.d.ts +542 -0
- package/lib/typescript/codegen/pack/errorcode.d.ts +174 -0
- package/lib/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/typescript/codegen/pack/keytype.d.ts +1952 -0
- package/lib/typescript/codegen/pack/types.d.ts +1 -0
- package/lib/typescript/codegen/type-shim.d.ts +6 -0
- package/lib/typescript/component.d.ts +8 -0
- package/lib/typescript/core/api.d.ts +2 -0
- package/lib/typescript/core/callback.d.ts +2 -0
- package/lib/typescript/core/env.d.ts +29 -0
- package/lib/typescript/core/errorcode.d.ts +2 -0
- package/lib/typescript/core/index.d.ts +6 -0
- package/lib/typescript/core/keytype.d.ts +7 -0
- package/lib/typescript/core/pusher.d.ts +16 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/ios/extends.d.ts +41 -0
- package/lib/typescript/runtime.d.ts +1 -0
- package/package.json +31 -0
- package/react-native-velive-push.podspec +45 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type View = any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type NativeSurfaceViewComponentProps = {
|
|
2
|
+
viewId: string;
|
|
3
|
+
kind: 'SurfaceView' | 'UIView' | 'View';
|
|
4
|
+
children?: any;
|
|
5
|
+
style?: any;
|
|
6
|
+
onLoad?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const NativeViewComponent: import("react-native").HostComponent<NativeSurfaceViewComponentProps>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveFileRecorderManager, VeLiveMediaPlayer, VeLiveMixerManager, VeLivePusher as _VeLivePusher, VeLivePusherConfiguration, VeLivePusherScreenCapture, VeLiveVideoEffectManager, VeLiveVideoFrame } from '../codegen/pack/api';
|
|
2
|
+
export { VeLiveAudioDevice, VeLiveAudioFrame, VeLiveCameraDevice, VeLiveFileRecorderManager, VeLiveMediaPlayer, VeLiveMixerManager, VeLivePusherConfiguration, VeLivePusherScreenCapture, VeLiveVideoEffectManager, VeLiveVideoFrame, _VeLivePusher as VeLivePusher, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { VeLiveAudioFrameFilter, VeLiveAudioFrameListener, VeLiveFileRecordingListener, VeLiveMediaPlayerFrameListener, VeLiveMediaPlayerListener, VeLivePusherDef, VeLivePusherObserver, VeLivePusherStatisticsObserver, VeLiveScreenCaptureStatusObserver, VeLiveSnapshotListener, VeLiveVideoEffectCallback, VeLiveVideoEffectHandleCallback, VeLiveVideoFrameFilter, VeLiveVideoFrameListener, ios_VeLiveAudioFrameFilter, ios_VeLiveAudioFrameListener, ios_VeLiveFileRecordingListener, ios_VeLiveMediaPlayerFrameListener, ios_VeLiveMediaPlayerListener, ios_VeLivePusherObserver, ios_VeLivePusherStatisticsObserver, ios_VeLiveScreenCaptureStatusObserver, ios_VeLiveSnapshotListener, ios_VeLiveVideoFrameFilter, ios_VeLiveVideoFrameListener, android_VeLiveAudioFrameFilter, android_VeLiveAudioFrameListener, android_VeLiveFileRecordingListener, android_VeLiveMediaPlayerFrameListener, android_VeLiveMediaPlayerListener, android_VeLivePusherObserver, android_VeLivePusherStatisticsObserver, android_VeLiveSnapshotListener, android_VeLiveVideoEffectCallback, android_VeLiveVideoEffectHandleCallback, android_VeLiveVideoFrameFilter, android_VeLiveVideoFrameListener } from '../codegen/pack/callback';
|
|
2
|
+
export { type VeLiveAudioFrameFilter, type VeLiveAudioFrameListener, type VeLiveFileRecordingListener, type VeLiveMediaPlayerFrameListener, type VeLiveMediaPlayerListener, type VeLivePusherDef, type VeLivePusherObserver, type VeLivePusherStatisticsObserver, type VeLiveScreenCaptureStatusObserver, type VeLiveSnapshotListener, type VeLiveVideoEffectCallback, type VeLiveVideoEffectHandleCallback, type VeLiveVideoFrameFilter, type VeLiveVideoFrameListener, ios_VeLiveAudioFrameFilter, ios_VeLiveAudioFrameListener, ios_VeLiveFileRecordingListener, ios_VeLiveMediaPlayerFrameListener, ios_VeLiveMediaPlayerListener, ios_VeLivePusherObserver, ios_VeLivePusherStatisticsObserver, ios_VeLiveScreenCaptureStatusObserver, ios_VeLiveSnapshotListener, ios_VeLiveVideoFrameFilter, ios_VeLiveVideoFrameListener, android_VeLiveAudioFrameFilter, android_VeLiveAudioFrameListener, android_VeLiveFileRecordingListener, android_VeLiveMediaPlayerFrameListener, android_VeLiveMediaPlayerListener, android_VeLivePusherObserver, android_VeLivePusherStatisticsObserver, android_VeLiveSnapshotListener, android_VeLiveVideoEffectCallback, android_VeLiveVideoEffectHandleCallback, android_VeLiveVideoFrameFilter, android_VeLiveVideoFrameListener, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface BaseLicenseConfig {
|
|
2
|
+
/** App ID,必填,从控制台应用管理获取。 */
|
|
3
|
+
AppID: string;
|
|
4
|
+
/** 必填, App 英文名,从控制台应用管理获取。 */
|
|
5
|
+
AppName: string;
|
|
6
|
+
/** App 版本号 */
|
|
7
|
+
AppVersion: string;
|
|
8
|
+
/** 必填,渠道号;业务自定义,如:小米应用商店 (xiaomi)、华为应用市场 (huawei) 等。 */
|
|
9
|
+
AppChannel: string;
|
|
10
|
+
/** 必填,License 路径。 */
|
|
11
|
+
LicenseUri: {
|
|
12
|
+
android: string;
|
|
13
|
+
ios: string;
|
|
14
|
+
};
|
|
15
|
+
LicenseCallback?: (status: any) => void;
|
|
16
|
+
openLog?: boolean;
|
|
17
|
+
UserUniqueID?: string;
|
|
18
|
+
}
|
|
19
|
+
interface AndroidLicenseConfig {
|
|
20
|
+
/** Android 应用唯一标识 */
|
|
21
|
+
PackageName?: string;
|
|
22
|
+
}
|
|
23
|
+
interface IOSLicenseConfig {
|
|
24
|
+
/** iOS 应用唯一标识 */
|
|
25
|
+
BundleID?: string;
|
|
26
|
+
}
|
|
27
|
+
export type LicenseConfig = BaseLicenseConfig & AndroidLicenseConfig & IOSLicenseConfig;
|
|
28
|
+
export declare function initEnv(config: LicenseConfig): Promise<void>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VeLiveAudioBitDepth, VeLiveAudioBufferType, VeLiveAudioCaptureConfiguration, VeLiveAudioCaptureType, VeLiveAudioChannel, VeLiveAudioCodec, VeLiveAudioEncoderConfiguration, VeLiveAudioFrameSource, VeLiveAudioMixType, VeLiveAudioPowerLevel, VeLiveAudioProfile, VeLiveAudioSampleRate, VeLiveFileRecorderConfiguration, VeLiveFirstFrameType, VeLiveMixAudioLayout, VeLiveMixVideoLayout, VeLiveNetworkQuality, VeLivePixelFormat, VeLivePusherLogConfig, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLivePusherStatistics, VeLivePusherStatus, VeLiveStreamMixDescription, VeLiveVideoBufferType, VeLiveVideoCaptureConfiguration, VeLiveVideoCaptureType, VeLiveVideoCodec, VeLiveVideoEffectLicenseConfiguration, VeLiveVideoEffectLicenseType, VeLiveVideoEncodeFrame, VeLiveVideoEncodeFrameType, VeLiveVideoEncoderConfiguration, VeLiveVideoFluencyLevel, VeLiveVideoFrameSource, VeLiveVideoMirrorType, VeLiveVideoProfile, VeLiveVideoResolution, VeLiveVideoRotation, VeLiveOrientation } from '../codegen/pack/keytype';
|
|
2
|
+
declare module '../codegen/pack/keytype' {
|
|
3
|
+
interface VeLiveVideoEncoderConfiguration {
|
|
4
|
+
initWithResolution(resolution: VeLiveVideoResolution): VeLiveVideoEncoderConfiguration;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export { VeLiveOrientation, VeLiveAudioBitDepth, VeLiveAudioBufferType, VeLiveAudioCaptureConfiguration, VeLiveAudioCaptureType, VeLiveAudioChannel, VeLiveAudioCodec, VeLiveAudioEncoderConfiguration, VeLiveAudioFrameSource, VeLiveAudioMixType, VeLiveAudioPowerLevel, VeLiveAudioProfile, VeLiveAudioSampleRate, VeLiveFileRecorderConfiguration, VeLiveFirstFrameType, VeLiveMixAudioLayout, VeLiveMixVideoLayout, VeLiveNetworkQuality, VeLivePixelFormat, VeLivePusherLogConfig, VeLivePusherLogLevel, VeLivePusherRenderMode, VeLivePusherStatistics, VeLivePusherStatus, VeLiveStreamMixDescription, VeLiveVideoBufferType, VeLiveVideoCaptureConfiguration, VeLiveVideoCaptureType, VeLiveVideoCodec, VeLiveVideoEffectLicenseConfiguration, VeLiveVideoEffectLicenseType, VeLiveVideoEncodeFrame, VeLiveVideoEncodeFrameType, VeLiveVideoEncoderConfiguration, VeLiveVideoFluencyLevel, VeLiveVideoFrameSource, VeLiveVideoMirrorType, VeLiveVideoProfile, VeLiveVideoResolution, VeLiveVideoRotation, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { findNodeHandle } from 'react-native';
|
|
2
|
+
import { VeLivePusher, VeLivePusherConfiguration } from './api';
|
|
3
|
+
export interface InitOptions extends Partial<VeLivePusherConfiguration> {
|
|
4
|
+
viewId: string;
|
|
5
|
+
element: Parameters<typeof findNodeHandle>[0];
|
|
6
|
+
videoConfig?: {
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
fps?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function initPusher(options: InitOptions): Promise<VeLivePusher>;
|
|
13
|
+
export declare function relaunchPusher(options: InitOptions): Promise<VeLivePusher>;
|
|
14
|
+
export declare function startScreenCapture(pusher: VeLivePusher, options: {
|
|
15
|
+
enableAppAudio: boolean;
|
|
16
|
+
}): Promise<boolean>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { NativeView } from '@vcloud-lux/hybrid-runtime';
|
|
2
|
+
export declare class IosUIView extends NativeView {
|
|
3
|
+
frame?: any;
|
|
4
|
+
bounds: any;
|
|
5
|
+
insertSubview(view: IosUIView, atIndex: number): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare class VeLivePlayerLogConfig {
|
|
8
|
+
}
|
|
9
|
+
export declare class TTSDKLogConfiguration {
|
|
10
|
+
enableConsole: boolean;
|
|
11
|
+
enableLogFile: boolean;
|
|
12
|
+
enable: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare class TTSDKConfiguration {
|
|
15
|
+
static defaultConfigurationWithAppID(appId: string, licenseName: string): TTSDKConfiguration;
|
|
16
|
+
licenseFilePath: string;
|
|
17
|
+
channel: string;
|
|
18
|
+
appName: string;
|
|
19
|
+
bundleID: string;
|
|
20
|
+
appVersion: string;
|
|
21
|
+
shouldInitAppLog: boolean;
|
|
22
|
+
serviceVendor: TTSDKServiceVendor;
|
|
23
|
+
logConfiguration: TTSDKLogConfiguration;
|
|
24
|
+
}
|
|
25
|
+
export declare class TTSDKManager {
|
|
26
|
+
static setCurrentUserUniqueID(id: string): void;
|
|
27
|
+
static setShouldReportToAppLog(val: boolean): void;
|
|
28
|
+
static setAppLogCustomData(val: Record<string, string>): void;
|
|
29
|
+
static startWithConfiguration(cfg: TTSDKConfiguration): void;
|
|
30
|
+
}
|
|
31
|
+
export declare class VeLivePlayerConfiguration {
|
|
32
|
+
enableStatisticsCallback: boolean;
|
|
33
|
+
statisticsCallbackInterval: number;
|
|
34
|
+
enableLiveDNS: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface VeLivePlayerObserverEvents {
|
|
37
|
+
onError(err: Error): void;
|
|
38
|
+
}
|
|
39
|
+
export declare enum TTSDKServiceVendor {
|
|
40
|
+
TTSDKServiceVendorCN = 1
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@vcloud-lux/hybrid-runtime';
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@byteplus/react-native-live-push",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"react-native": "*"
|
|
6
|
+
},
|
|
7
|
+
"main": "lib/commonjs/index.js",
|
|
8
|
+
"module": "lib/module/index.js",
|
|
9
|
+
"types": "lib/typescript/index.d.ts",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"files": [
|
|
12
|
+
"android",
|
|
13
|
+
"ios",
|
|
14
|
+
"*.podspec",
|
|
15
|
+
"lib",
|
|
16
|
+
"!**/__tests__",
|
|
17
|
+
"!**/__fixtures__",
|
|
18
|
+
"!**/__mocks__",
|
|
19
|
+
"!ios/build",
|
|
20
|
+
"!android/build",
|
|
21
|
+
"!android/gradle",
|
|
22
|
+
"!android/gradlew",
|
|
23
|
+
"!android/gradlew.bat",
|
|
24
|
+
"!android/local.properties",
|
|
25
|
+
"!**/.*",
|
|
26
|
+
"!**/*.xcframework"
|
|
27
|
+
],
|
|
28
|
+
"author": "vcloud-fe",
|
|
29
|
+
"description": "volcengine velive player sdk for react native",
|
|
30
|
+
"homepage": "https://www.volcengine.com"
|
|
31
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "react-native-velive-push"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = package["author"]
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
15
|
+
s.source = { :git => "https://github.com/volcengine/volcengine-specs.git", :tag => "#{s.version}" }
|
|
16
|
+
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm}"
|
|
18
|
+
|
|
19
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
else
|
|
24
|
+
s.dependency "React-Core"
|
|
25
|
+
|
|
26
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
+
s.pod_target_xcconfig = {
|
|
30
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
33
|
+
}
|
|
34
|
+
s.dependency "React-Codegen"
|
|
35
|
+
s.dependency "RCT-Folly"
|
|
36
|
+
s.dependency "RCTRequired"
|
|
37
|
+
s.dependency "RCTTypeSafety"
|
|
38
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
s.dependency 'VolcApiEngine', '1.0.1'
|
|
43
|
+
s.dependency 'TTSDKFramework/Core', '1.41.3.7-premium'
|
|
44
|
+
s.dependency 'TTSDKFramework/LivePush-RTS', '1.41.3.7-premium'
|
|
45
|
+
end
|