@react-native-ohos/react-native-audio 4.2.3-rc.4 → 4.2.4-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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @react-native-ohos/react-native-audio
2
2
 
3
- This project is based on [react-native-audio](https://github.com/jsierles/react-native-audio)
3
+ This project is based on [react-native-audio](https://github.com/jsierles/react-native-audio)@4.3.1
4
4
 
5
5
  ## Documentation
6
6
 
@@ -3,4 +3,6 @@
3
3
  * Use of this source code is governed by a MIT license that can be
4
4
  * found in the LICENSE file.
5
5
  */
6
- export * from './ts';
6
+ import { AudioPackage } from "./src/main/ets/AudioPackage.ets";
7
+ export * from "./ts";
8
+ export default AudioPackage;
@@ -5,7 +5,7 @@
5
5
  description: '',
6
6
  main: 'index.ets',
7
7
  type: 'module',
8
- version: '4.2.3-rc.4',
8
+ version: '4.2.4-rc.1',
9
9
  dependencies: {
10
10
  "@rnoh/react-native-openharmony": "^0.72.38"
11
11
  },
@@ -8,6 +8,7 @@ import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/t
8
8
  import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
9
9
  import { AudioModule } from './AudioModule';
10
10
  import { TM } from "./generated/ts";
11
+ import { RNOHPackage } from '@rnoh/react-native-openharmony'
11
12
 
12
13
  class AudioModulesFactory extends TurboModulesFactory {
13
14
  createTurboModule(name: string): TurboModule | null {
@@ -22,7 +23,7 @@ class AudioModulesFactory extends TurboModulesFactory {
22
23
  }
23
24
  }
24
25
 
25
- export class AudioPackage extends RNPackage {
26
+ export class AudioPackage extends RNOHPackage {
26
27
  createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
27
28
  return new AudioModulesFactory(ctx);
28
29
  }
@@ -3,5 +3,5 @@
3
3
  * Use of this source code is governed by a MIT license that can be
4
4
  * found in the LICENSE file.
5
5
  */
6
- export * from "./src/main/ets/AudioPackage";
6
+ export * from "./src/main/ets/AudioPackage.ets";
7
7
  export * from "./src/main/ets/AudioModule";
package/harmony/audio.har CHANGED
Binary file
package/index.js CHANGED
@@ -10,7 +10,7 @@ import ReactNative, {
10
10
  } from "react-native";
11
11
 
12
12
  // @ts-ignore We want to check whether __turboModuleProxy exitst, it may not
13
- const isTurboModuleEnabled = global.nativeModuleProxy != null;
13
+ const isTurboModuleEnabled = global.__turboModuleProxy != null;
14
14
 
15
15
  const nativeRecorderManager = isTurboModuleEnabled ?
16
16
  require("./NativeAudio").default :
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-audio",
3
- "version": "4.2.3-rc.4",
3
+ "version": "4.2.4-rc.1",
4
4
  "description": "React Native extension for recording audio",
5
5
  "main": "index.js",
6
6
  "author": "Joshua Sierles <joshua@diluvia.net> (https://github.com/jsierles)",
7
- "harmony": {
8
- "alias": "react-native-audio"
7
+ "harmony": {
8
+ "alias": "react-native-audio",
9
+ "autolinking": {
10
+ "etsPackageClassName":"AudioPackage",
11
+ "cppPackageClassName":"AudioPackage",
12
+ "cmakeLibraryTargetName": "rnoh_audio",
13
+ "ohPackageName": "@react-native-ohos/react-native-audio"
14
+ }
9
15
  },
10
16
  "files": [
11
17
  "/harmony",