@byteplus/react-native-live-pull 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 +93 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/AndroidManifestNew.xml +8 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/NativeVariableManager.java +15 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModule.java +108 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLiveModuleSpec.java +17 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcLivePackage.java +27 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcView.java +32 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/VolcViewManager.java +87 -0
- package/android/src/main/java/com/volcengine/velive/rn/pull/autogen/MethodSignature.java +129 -0
- package/ios/VeLivePullSDK.h +24 -0
- package/ios/VeLivePullSDK.m +91 -0
- package/ios/VeLivePullView.h +25 -0
- package/ios/VeLivePullView.m +74 -0
- package/ios/VeLivePullViewManager.m +59 -0
- package/lib/commonjs/index.js +10697 -0
- package/lib/module/index.js +10684 -0
- package/lib/typescript/codegen/android/api.d.ts +61 -0
- package/lib/typescript/codegen/android/callback.d.ts +40 -0
- package/lib/typescript/codegen/android/errorcode.d.ts +53 -0
- package/lib/typescript/codegen/android/index.d.ts +5 -0
- package/lib/typescript/codegen/android/keytype.d.ts +263 -0
- package/lib/typescript/codegen/android/types.d.ts +30 -0
- package/lib/typescript/codegen/ios/api.d.ts +81 -0
- package/lib/typescript/codegen/ios/callback.d.ts +44 -0
- package/lib/typescript/codegen/ios/errorcode.d.ts +56 -0
- package/lib/typescript/codegen/ios/index.d.ts +5 -0
- package/lib/typescript/codegen/ios/keytype.d.ts +271 -0
- package/lib/typescript/codegen/ios/types.d.ts +35 -0
- package/lib/typescript/codegen/pack/api.d.ts +381 -0
- package/lib/typescript/codegen/pack/callback.d.ts +217 -0
- package/lib/typescript/codegen/pack/errorcode.d.ts +150 -0
- package/lib/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/typescript/codegen/pack/keytype.d.ts +931 -0
- package/lib/typescript/codegen/pack/types.d.ts +1 -0
- package/lib/typescript/component.d.ts +8 -0
- package/lib/typescript/core/api.d.ts +1 -0
- package/lib/typescript/core/callback.d.ts +1 -0
- package/lib/typescript/core/env.d.ts +38 -0
- package/lib/typescript/core/errorcode.d.ts +1 -0
- package/lib/typescript/core/index.d.ts +6 -0
- package/lib/typescript/core/keytype.d.ts +1 -0
- package/lib/typescript/core/player.d.ts +16 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/platforms/android/extends.d.ts +39 -0
- package/lib/typescript/platforms/ios/extends.d.ts +41 -0
- package/lib/typescript/runtime/index.d.ts +1 -0
- package/package.json +32 -0
- package/react-native-velive-pull.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';
|
|
4
|
+
children?: any;
|
|
5
|
+
style?: any;
|
|
6
|
+
onLoad?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const NativeViewComponent: import("react-native").HostComponent<NativeSurfaceViewComponentProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VeLivePlayer } from '../codegen/pack/api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { VeLivePlayerObserver } from '../codegen/pack/callback';
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
openLog?: boolean;
|
|
16
|
+
UserUniqueID?: string;
|
|
17
|
+
}
|
|
18
|
+
interface AndroidLicenseConfig {
|
|
19
|
+
/** Android 应用唯一标识 */
|
|
20
|
+
PackageName?: string;
|
|
21
|
+
}
|
|
22
|
+
interface IOSLicenseConfig {
|
|
23
|
+
/** iOS 应用唯一标识 */
|
|
24
|
+
BundleID?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @detail keytype
|
|
28
|
+
*/
|
|
29
|
+
export type LicenseConfig = BaseLicenseConfig & AndroidLicenseConfig & IOSLicenseConfig;
|
|
30
|
+
/**
|
|
31
|
+
* @detail api
|
|
32
|
+
* @param config Env 初始化配置。
|
|
33
|
+
*/
|
|
34
|
+
/** {en}
|
|
35
|
+
* @param config Env initialization configuration.
|
|
36
|
+
*/
|
|
37
|
+
export declare function initEnv(config: LicenseConfig): Promise<void>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { VeLivePlayerError, VeLivePlayerErrorCode, } from '../codegen/pack/errorcode';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VeLivePlayerAudioBufferType, VeLivePlayerAudioFrame, VeLivePlayerBMFFlexSRErrorCode, VeLivePlayerBMFFlexSRType, VeLivePlayerConfiguration, VeLivePlayerFillMode, VeLivePlayerFormat, VeLivePlayerLogConfig, VeLivePlayerLogLevel, VeLivePlayerMirror, VeLivePlayerPixelFormat, VeLivePlayerProtocol, VeLivePlayerResolution, VeLivePlayerResolutionSwitchReason, VeLivePlayerRotation, VeLivePlayerStatistics, VeLivePlayerStatus, VeLivePlayerStream, VeLivePlayerStreamData, VeLivePlayerStreamType, VeLivePlayerVideoBufferType, VeLivePlayerVideoFrame, VeLivePlayerVideoTexture, } from '../codegen/pack/keytype';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VeLivePlayer } from './api';
|
|
2
|
+
import { VeLivePlayerConfiguration } from './keytype';
|
|
3
|
+
/**
|
|
4
|
+
* @detail keytype
|
|
5
|
+
*/
|
|
6
|
+
export interface InitOptions extends Partial<VeLivePlayerConfiguration> {
|
|
7
|
+
viewId: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @detail api
|
|
11
|
+
* @param options 播放器初始化配置。
|
|
12
|
+
*/
|
|
13
|
+
/** {en}
|
|
14
|
+
* @param options Player initialization configuration.
|
|
15
|
+
*/
|
|
16
|
+
export declare function initPlayer(options: InitOptions): Promise<VeLivePlayer>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NativeProxyService, NativeView } from '../../runtime';
|
|
2
|
+
export declare class SurfaceHolder {
|
|
3
|
+
}
|
|
4
|
+
export declare class NativeSurfaceView extends NativeView {
|
|
5
|
+
getHolder(): Promise<SurfaceHolder>;
|
|
6
|
+
}
|
|
7
|
+
export declare class ApplicationContext {
|
|
8
|
+
}
|
|
9
|
+
export declare class NativeVariables {
|
|
10
|
+
static getApplicationContext(): Promise<ApplicationContext>;
|
|
11
|
+
}
|
|
12
|
+
export declare class VeLivePlayerConfiguration extends NativeProxyService {
|
|
13
|
+
enableStatisticsCallback?: boolean;
|
|
14
|
+
enableLiveDNS?: boolean;
|
|
15
|
+
enableSei?: boolean;
|
|
16
|
+
enableHardwareDecode?: boolean;
|
|
17
|
+
networkTimeoutMs?: number;
|
|
18
|
+
retryIntervalTimeMs?: number;
|
|
19
|
+
retryMaxCount?: number;
|
|
20
|
+
statisticsCallbackInterval?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class Env {
|
|
23
|
+
static init(cfg: any): void;
|
|
24
|
+
static openAppLog(cfg: any): void;
|
|
25
|
+
static getApplicationContext(): ApplicationContext;
|
|
26
|
+
}
|
|
27
|
+
declare class ConfigBuilder {
|
|
28
|
+
setApplicationContext(appContext: ApplicationContext): ConfigBuilder;
|
|
29
|
+
setAppID(appId: string): ConfigBuilder;
|
|
30
|
+
setAppName(appId: string): ConfigBuilder;
|
|
31
|
+
setAppVersion(appVer: string): ConfigBuilder;
|
|
32
|
+
setAppChannel(appVer: string): ConfigBuilder;
|
|
33
|
+
setLicenseUri(appVer: string): ConfigBuilder;
|
|
34
|
+
build(): any;
|
|
35
|
+
}
|
|
36
|
+
export declare class Config {
|
|
37
|
+
static Builder: typeof ConfigBuilder;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { NativeView } from '../../runtime';
|
|
2
|
+
export declare class NativeUIView extends NativeView {
|
|
3
|
+
frame?: any;
|
|
4
|
+
bounds: any;
|
|
5
|
+
insertSubview(view: NativeUIView, 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,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@byteplus/react-native-live-pull",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"react": "*",
|
|
6
|
+
"react-native": "*"
|
|
7
|
+
},
|
|
8
|
+
"main": "lib/commonjs/index.js",
|
|
9
|
+
"module": "lib/module/index.js",
|
|
10
|
+
"types": "lib/typescript/index.d.ts",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"files": [
|
|
13
|
+
"android",
|
|
14
|
+
"ios",
|
|
15
|
+
"*.podspec",
|
|
16
|
+
"lib",
|
|
17
|
+
"!**/__tests__",
|
|
18
|
+
"!**/__fixtures__",
|
|
19
|
+
"!**/__mocks__",
|
|
20
|
+
"!ios/build",
|
|
21
|
+
"!android/build",
|
|
22
|
+
"!android/gradle",
|
|
23
|
+
"!android/gradlew",
|
|
24
|
+
"!android/gradlew.bat",
|
|
25
|
+
"!android/local.properties",
|
|
26
|
+
"!**/.*",
|
|
27
|
+
"!**/*.xcframework"
|
|
28
|
+
],
|
|
29
|
+
"author": "vcloud-fe",
|
|
30
|
+
"description": "volcengine velive player sdk for react native",
|
|
31
|
+
"homepage": "https://www.volcengine.com"
|
|
32
|
+
}
|
|
@@ -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-pull"
|
|
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/LivePull-RTS', '1.41.3.7-premium'
|
|
45
|
+
end
|