expo-nodemediaclient 0.2.1 → 0.2.3

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/README.md CHANGED
@@ -170,10 +170,13 @@ export default function PublisherScreen() {
170
170
  | `url` | `string` | 推流地址 (RTMP) |
171
171
  | `audioParam` | `AudioParam` | 音频编码参数 |
172
172
  | `videoParam` | `VideoParam` | 视频编码参数 |
173
- | `videoOrientation` | `number` | 视频方向,`NodePublisher.VIDEO_ORIENTATION_PORTRAIT` `NodePublisher.VIDEO_ORIENTATION_LANDSCAPE` |
173
+ | `videoOrientation` | `number` | 视频方向,如 `NodePublisher.VIDEO_ORIENTATION_PORTRAIT` |
174
174
  | `keyFrameInterval` | `number` | 关键帧间隔 (秒),默认 2 |
175
175
  | `frontCamera` | `boolean` | 是否使用前置摄像头,默认 false |
176
176
  | `cameraFrontMirror` | `boolean` | 前置摄像头是否镜像,默认 true |
177
+ | `volume` | `number` | 音量 (0.0 - 1.0) |
178
+ | `zoomRatio` | `number` | 摄像头缩放比例 (0.0 - 1.0)|
179
+ | `torchEnable` | `boolean` | 是否开启补光灯 |
177
180
  | `HWAccelEnable` | `boolean` | 是否启用硬件加速,默认 true |
178
181
  | `denoiseEnable` | `boolean` | 是否启用降噪,默认 true |
179
182
  | `colorStyleId` | `number` | 色彩风格ID,如 `NodePublisher.EFFECTOR_STYLE_ID_FAIRSKIN` |
@@ -33,13 +33,13 @@ if (useManagedAndroidSdkVersions) {
33
33
  android {
34
34
  namespace "expo.modules.nodemediaclient"
35
35
  defaultConfig {
36
- versionCode 201
37
- versionName "0.2.1"
36
+ versionCode 202
37
+ versionName "0.2.2"
38
38
  }
39
39
  lintOptions {
40
40
  abortOnError false
41
41
  }
42
42
  dependencies {
43
- implementation 'com.github.NodeMedia:NodeMediaClient-Android:4.1.0'
43
+ implementation 'com.github.NodeMedia:NodeMediaClient-Android:4.1.1'
44
44
  }
45
45
  }
@@ -8,7 +8,7 @@ export type NodePlayerEventCallback = {
8
8
  msg: string;
9
9
  };
10
10
  export type NodePlayerProps = {
11
- ref?: NodePlayerRef;
11
+ ref?: React.RefObject<NodePlayerRef | null>;
12
12
  url?: string;
13
13
  volume?: number;
14
14
  cryptoKey?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoNodePlayerView.d.ts","sourceRoot":"","sources":["../src/ExpoNodePlayerView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,uBAAuB,CAAA;KAAE,KAAK,IAAI,CAAC;CAC7E,GAAG,SAAS,CAAC;AAGd,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,eAAe,+BAEhE"}
1
+ {"version":3,"file":"ExpoNodePlayerView.d.ts","sourceRoot":"","sources":["../src/ExpoNodePlayerView.tsx"],"names":[],"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AAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["\nimport { ViewProps } from 'react-native';\nimport { requireNativeViewManager } from 'expo-modules-core';\n\nexport type NodePlayerRef = {\n start: (url?: string) => void;\n stop: () => void;\n}\n\nexport type NodePlayerEventCallback = {\n event: number;\n msg: string;\n}\n\nexport type NodePlayerProps = {\n ref?: NodePlayerRef;\n url?: string;\n volume?: number;\n cryptoKey?: string;\n scaleMode?: number;\n bufferTime?: number;\n HTTPReferer?: string;\n HTTPUserAgent?: string;\n RTSPTransport?: string;\n HWAccelEnable?: boolean;\n onEventCallback?: (event: { nativeEvent: NodePlayerEventCallback }) => void;\n} & ViewProps;\n\nconst NativeView: React.ComponentType<NodePlayerProps> = requireNativeViewManager('ExpoNodePlayerView');\nexport default function ExpoNodePlayerView(props: NodePlayerProps) {\n return <NativeView {...props} />;\n}"]}
1
+ {"version":3,"file":"ExpoNodePlayerView.js","sourceRoot":"","sources":["../src/ExpoNodePlayerView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AA0B7D,MAAM,UAAU,GAAyC,wBAAwB,CAAC,oBAAoB,CAAC,CAAC;AACxG,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAsB;IAC/D,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["\nimport { ViewProps } from 'react-native';\nimport { requireNativeViewManager } from 'expo-modules-core';\n\nexport type NodePlayerRef = {\n start: (url?: string) => void;\n stop: () => void;\n}\n\nexport type NodePlayerEventCallback = {\n event: number;\n msg: string;\n}\n\nexport type NodePlayerProps = {\n ref?: React.RefObject<NodePlayerRef | null>;\n url?: string;\n volume?: number;\n cryptoKey?: string;\n scaleMode?: number;\n bufferTime?: number;\n HTTPReferer?: string;\n HTTPUserAgent?: string;\n RTSPTransport?: string;\n HWAccelEnable?: boolean;\n onEventCallback?: (event: { nativeEvent: NodePlayerEventCallback }) => void;\n} & ViewProps;\n\nconst NativeView: React.ComponentType<NodePlayerProps> = requireNativeViewManager('ExpoNodePlayerView');\nexport default function ExpoNodePlayerView(props: NodePlayerProps) {\n return <NativeView {...props} />;\n}"]}
@@ -26,7 +26,7 @@ export type VideoParam = {
26
26
  bitrate?: number;
27
27
  };
28
28
  export type NodePublisherProps = {
29
- ref?: NodePublisherRef;
29
+ ref?: React.RefObject<NodePublisherRef | null>;
30
30
  url?: string;
31
31
  cryptoKey?: string;
32
32
  audioParam?: AudioParam;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoNodePublisherView.d.ts","sourceRoot":"","sources":["../src/ExpoNodePublisherView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,2BAA2B,EAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,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AqB,CAAC,mBAAmB,GAAG,YAAY,CAAC;AACzD,qBAAqB,CAAC,gBAAgB,GAAG,SAAS,CAAC;AACnD,qBAAqB,CAAC,mBAAmB,GAAG,YAAY,CAAC;AACzD,qBAAqB,CAAC,cAAc,GAAG,OAAO,CAAC;AAC/C,qBAAqB,CAAC,0BAA0B,GAAG,CAAC,CAAC;AACrD,qBAAqB,CAAC,0BAA0B,GAAG,CAAC,CAAC;AACrD,qBAAqB,CAAC,0BAA0B,GAAG,CAAC,CAAC;AACrD,qBAAqB,CAAC,sBAAsB,GAAG,CAAC,CAAC;AACjD,qBAAqB,CAAC,sBAAsB,GAAG,CAAC,CAAC;AACjD,qBAAqB,CAAC,uBAAuB,GAAG,CAAC,CAAC;AAElD,eAAe,qBAAqB,CAAC","sourcesContent":["\nimport { ViewProps } from 'react-native';\nimport { requireNativeViewManager } from 'expo-modules-core';\n\nexport type NodePublisherRef = {\n start: (url?: string) => Promise<void>;\n stop: () => Promise<void>;\n setEffectParameter: (key: string, value: number) => Promise<void>;\n setEffectStyle: (style: number) => Promise<void>;\n startFocusAndMeteringCenter:() => Promise<void>;\n}\n\nexport type NodePublisherEventCallback = {\n event: number;\n msg: string;\n}\n\nexport type AudioParam = {\n codecid?: number;\n profile?: number;\n samplingRate?: number;\n channels?: number;\n bitrate?: number;\n}\n\nexport type VideoParam = {\n codecid?: number;\n profile?: number;\n width?: number;\n height?: number;\n fps?: number;\n bitrate?: number;\n}\n\nexport type NodePublisherProps = {\n ref?: NodePublisherRef;\n url?: string;\n cryptoKey?: string;\n audioParam?: AudioParam\n videoParam?: VideoParam;\n keyFrameInterval?: number;\n videoOrientation?: number;\n frontCamera?: boolean;\n cameraFrontMirror?: boolean;\n zoomRatio?: number;\n volume?: number;\n torchEnable?: boolean;\n HWAccelEnable?: boolean;\n denoiseEnable?: boolean;\n colorStyleId?: number;\n colorStyleIntensity?: number;\n smoothskinIntensity?: number;\n onEventCallback?: (event: { nativeEvent: NodePublisherEventCallback }) => void;\n} & ViewProps;\n\nconst NativeView: React.ComponentType<NodePublisherProps> = requireNativeViewManager('ExpoNodePublisherView');\nfunction ExpoNodePublisherView(props: NodePublisherProps) {\n return <NativeView {...props} />;\n}\n\nExpoNodePublisherView.NMC_CODEC_ID_H264 = 27;\nExpoNodePublisherView.NMC_CODEC_ID_H265 = 173;\nExpoNodePublisherView.NMC_CODEC_ID_AAC = 86018;\nExpoNodePublisherView.NMC_CODEC_ID_OPUS = 86076;\nExpoNodePublisherView.NMC_CODEC_ID_PCMA = 65543;\nExpoNodePublisherView.NMC_CODEC_ID_PCMU = 65542;\nExpoNodePublisherView.NMC_PROFILE_AUTO = 0;\nExpoNodePublisherView.NMC_PROFILE_H264_BASELINE = 66;\nExpoNodePublisherView.NMC_PROFILE_H264_MAIN = 77;\nExpoNodePublisherView.NMC_PROFILE_H264_HIGH = 100;\nExpoNodePublisherView.NMC_PROFILE_H265_MAIN = 1;\nExpoNodePublisherView.NMC_PROFILE_AAC_LC = 1;\nExpoNodePublisherView.NMC_PROFILE_AAC_HE = 4;\nExpoNodePublisherView.NMC_PROFILE_AAC_HE_V2 = 28;\nExpoNodePublisherView.VIDEO_ORIENTATION_PORTRAIT = 1;\nExpoNodePublisherView.VIDEO_ORIENTATION_LANDSCAPE_RIGHT = 3;\nExpoNodePublisherView.VIDEO_ORIENTATION_LANDSCAPE_LEFT = 4;\nExpoNodePublisherView.FLAG_AF = 1;\nExpoNodePublisherView.FLAG_AE = 2;\nExpoNodePublisherView.FLAG_AWB = 4;\nExpoNodePublisherView.NMC_DEVICE_TYPE_WideAngleCamera = 0;\nExpoNodePublisherView.NMC_DEVICE_TYPE_TelephotoCamera = 1;\nExpoNodePublisherView.NMC_DEVICE_TYPE_UltraWideCamera = 2;\nExpoNodePublisherView.NMC_DEVICE_TYPE_DualCamera = 3;\nExpoNodePublisherView.NMC_DEVICE_TYPE_TripleCamera = 4;\nExpoNodePublisherView.EFFECTOR_BRIGHTNESS = \"brightness\";\nExpoNodePublisherView.EFFECTOR_CONTRAST = \"contrast\";\nExpoNodePublisherView.EFFECTOR_SATURATION = \"saturation\";\nExpoNodePublisherView.EFFECTOR_SHARPEN = \"sharpen\";\nExpoNodePublisherView.EFFECTOR_SMOOTHSKIN = \"smoothskin\";\nExpoNodePublisherView.EFFECTOR_STYLE = \"style\";\nExpoNodePublisherView.EFFECTOR_STYLE_ID_ORIGINAL = 0;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_ENHANCED = 1;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_FAIRSKIN = 2;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_COOL = 3;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_FILM = 4;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_BOOST = 5;\n\nexport default ExpoNodePublisherView;"]}
1
+ {"version":3,"file":"ExpoNodePublisherView.js","sourceRoot":"","sources":["../src/ExpoNodePublisherView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAqD7D,MAAM,UAAU,GAA4C,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;AAC9G,SAAS,qBAAqB,CAAC,KAAyB;IACtD,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC;AAED,qBAAqB,CAAC,iBAAiB,GAAG,EAAE,CAAC;AAC7C,qBAAqB,CAAC,iBAAiB,GAAG,GAAG,CAAC;AAC9C,qBAAqB,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAC/C,qBAAqB,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAChD,qBAAqB,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAChD,qBAAqB,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAChD,qBAAqB,CAAC,gBAAgB,GAAG,CAAC,CAAC;AAC3C,qBAAqB,CAAC,yBAAyB,GAAG,EAAE,CAAC;AACrD,qBAAqB,CAAC,qBAAqB,GAAG,EAAE,C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qBAAqB,CAAC,sBAAsB,GAAG,CAAC,CAAC;AACjD,qBAAqB,CAAC,uBAAuB,GAAG,CAAC,CAAC;AAElD,eAAe,qBAAqB,CAAC","sourcesContent":["\nimport { ViewProps } from 'react-native';\nimport { requireNativeViewManager } from 'expo-modules-core';\n\nexport type NodePublisherRef = {\n start: (url?: string) => Promise<void>;\n stop: () => Promise<void>;\n setEffectParameter: (key: string, value: number) => Promise<void>;\n setEffectStyle: (style: number) => Promise<void>;\n startFocusAndMeteringCenter:() => Promise<void>;\n}\n\nexport type NodePublisherEventCallback = {\n event: number;\n msg: string;\n}\n\nexport type AudioParam = {\n codecid?: number;\n profile?: number;\n samplingRate?: number;\n channels?: number;\n bitrate?: number;\n}\n\nexport type VideoParam = {\n codecid?: number;\n profile?: number;\n width?: number;\n height?: number;\n fps?: number;\n bitrate?: number;\n}\n\nexport type NodePublisherProps = {\n ref?: React.RefObject<NodePublisherRef | null>;\n url?: string;\n cryptoKey?: string;\n audioParam?: AudioParam\n videoParam?: VideoParam;\n keyFrameInterval?: number;\n videoOrientation?: number;\n frontCamera?: boolean;\n cameraFrontMirror?: boolean;\n zoomRatio?: number;\n volume?: number;\n torchEnable?: boolean;\n HWAccelEnable?: boolean;\n denoiseEnable?: boolean;\n colorStyleId?: number;\n colorStyleIntensity?: number;\n smoothskinIntensity?: number;\n onEventCallback?: (event: { nativeEvent: NodePublisherEventCallback }) => void;\n} & ViewProps;\n\nconst NativeView: React.ComponentType<NodePublisherProps> = requireNativeViewManager('ExpoNodePublisherView');\nfunction ExpoNodePublisherView(props: NodePublisherProps) {\n return <NativeView {...props} />;\n}\n\nExpoNodePublisherView.NMC_CODEC_ID_H264 = 27;\nExpoNodePublisherView.NMC_CODEC_ID_H265 = 173;\nExpoNodePublisherView.NMC_CODEC_ID_AAC = 86018;\nExpoNodePublisherView.NMC_CODEC_ID_OPUS = 86076;\nExpoNodePublisherView.NMC_CODEC_ID_PCMA = 65543;\nExpoNodePublisherView.NMC_CODEC_ID_PCMU = 65542;\nExpoNodePublisherView.NMC_PROFILE_AUTO = 0;\nExpoNodePublisherView.NMC_PROFILE_H264_BASELINE = 66;\nExpoNodePublisherView.NMC_PROFILE_H264_MAIN = 77;\nExpoNodePublisherView.NMC_PROFILE_H264_HIGH = 100;\nExpoNodePublisherView.NMC_PROFILE_H265_MAIN = 1;\nExpoNodePublisherView.NMC_PROFILE_AAC_LC = 1;\nExpoNodePublisherView.NMC_PROFILE_AAC_HE = 4;\nExpoNodePublisherView.NMC_PROFILE_AAC_HE_V2 = 28;\nExpoNodePublisherView.VIDEO_ORIENTATION_PORTRAIT = 1;\nExpoNodePublisherView.VIDEO_ORIENTATION_LANDSCAPE_RIGHT = 3;\nExpoNodePublisherView.VIDEO_ORIENTATION_LANDSCAPE_LEFT = 4;\nExpoNodePublisherView.FLAG_AF = 1;\nExpoNodePublisherView.FLAG_AE = 2;\nExpoNodePublisherView.FLAG_AWB = 4;\nExpoNodePublisherView.NMC_DEVICE_TYPE_WideAngleCamera = 0;\nExpoNodePublisherView.NMC_DEVICE_TYPE_TelephotoCamera = 1;\nExpoNodePublisherView.NMC_DEVICE_TYPE_UltraWideCamera = 2;\nExpoNodePublisherView.NMC_DEVICE_TYPE_DualCamera = 3;\nExpoNodePublisherView.NMC_DEVICE_TYPE_TripleCamera = 4;\nExpoNodePublisherView.EFFECTOR_BRIGHTNESS = \"brightness\";\nExpoNodePublisherView.EFFECTOR_CONTRAST = \"contrast\";\nExpoNodePublisherView.EFFECTOR_SATURATION = \"saturation\";\nExpoNodePublisherView.EFFECTOR_SHARPEN = \"sharpen\";\nExpoNodePublisherView.EFFECTOR_SMOOTHSKIN = \"smoothskin\";\nExpoNodePublisherView.EFFECTOR_STYLE = \"style\";\nExpoNodePublisherView.EFFECTOR_STYLE_ID_ORIGINAL = 0;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_ENHANCED = 1;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_FAIRSKIN = 2;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_COOL = 3;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_FILM = 4;\nExpoNodePublisherView.EFFECTOR_STYLE_ID_BOOST = 5;\n\nexport default ExpoNodePublisherView;"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-nodemediaclient",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Expo NodeMediaClient module",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -13,7 +13,7 @@ export type NodePlayerEventCallback = {
13
13
  }
14
14
 
15
15
  export type NodePlayerProps = {
16
- ref?: NodePlayerRef;
16
+ ref?: React.RefObject<NodePlayerRef | null>;
17
17
  url?: string;
18
18
  volume?: number;
19
19
  cryptoKey?: string;
@@ -33,7 +33,7 @@ export type VideoParam = {
33
33
  }
34
34
 
35
35
  export type NodePublisherProps = {
36
- ref?: NodePublisherRef;
36
+ ref?: React.RefObject<NodePublisherRef | null>;
37
37
  url?: string;
38
38
  cryptoKey?: string;
39
39
  audioParam?: AudioParam