@react-native-ohos/react-native-audio 4.2.3-rc.2 → 4.2.3-rc.4
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
|
@@ -11,5 +11,5 @@ This project is based on [react-native-audio](https://github.com/jsierles/react-
|
|
|
11
11
|
|
|
12
12
|
## License
|
|
13
13
|
|
|
14
|
-
This library is licensed under [The MIT License (MIT)](https://
|
|
14
|
+
This library is licensed under [The MIT License (MIT)](https://gitcode.com/openharmony-sig/rntpc_react-native-audio/blob/master/LICENSE).
|
|
15
15
|
|
|
@@ -202,8 +202,12 @@ export class AudioRecordManager {
|
|
|
202
202
|
//格式化封装格式,当前仅支持m4a
|
|
203
203
|
getFileFormatFormatString(fileFormat: string) {
|
|
204
204
|
switch (fileFormat) {
|
|
205
|
-
case '
|
|
206
|
-
|
|
205
|
+
case 'aac':
|
|
206
|
+
if (media.ContainerFormatType["CFT_AAC"]) {
|
|
207
|
+
return media.ContainerFormatType["CFT_AAC"];
|
|
208
|
+
} else {
|
|
209
|
+
return media.ContainerFormatType.CFT_MPEG_4A;
|
|
210
|
+
}
|
|
207
211
|
default:
|
|
208
212
|
this.logger.debug(`Using media.ContainerFormatType.CFT_MPEG_4A : ${media.ContainerFormatType.CFT_MPEG_4A}.`);
|
|
209
213
|
return media.ContainerFormatType.CFT_MPEG_4A;
|
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.
|
|
13
|
+
const isTurboModuleEnabled = global.nativeModuleProxy != null;
|
|
14
14
|
|
|
15
15
|
const nativeRecorderManager = isTurboModuleEnabled ?
|
|
16
16
|
require("./NativeAudio").default :
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-ohos/react-native-audio",
|
|
3
|
-
"version": "4.2.3-rc.
|
|
3
|
+
"version": "4.2.3-rc.4",
|
|
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)",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "https://
|
|
24
|
+
"url": "https://gitcode.com/openharmony-sig/rntpc_react-native-audio"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-audio --cpp-output-path ./harmony/audio/src/main/cpp/generated --ets-output-path ./harmony/audio/src/main/ets/generated --turbo-modules-spec-paths ./NativeAudio.ts "
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@rnoh/react-native-harmony-cli": "npm:@react-native-oh/react-native-harmony-cli@^0.0.27"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
|
+
"registry": "https://registry.npmjs.org/",
|
|
33
34
|
"access": "public"
|
|
34
35
|
},
|
|
35
36
|
"nativePackage": true
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use these variables when you tailor your ArkTS code. They must be of the const type.
|
|
3
|
-
*/
|
|
4
|
-
export const HAR_VERSION = '4.2.3-rc.2';
|
|
5
|
-
export const BUILD_MODE_NAME = 'debug';
|
|
6
|
-
export const DEBUG = true;
|
|
7
|
-
export const TARGET_NAME = 'default';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* BuildProfile Class is used only for compatibility purposes.
|
|
11
|
-
*/
|
|
12
|
-
export default class BuildProfile {
|
|
13
|
-
static readonly HAR_VERSION = HAR_VERSION;
|
|
14
|
-
static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
|
|
15
|
-
static readonly DEBUG = DEBUG;
|
|
16
|
-
static readonly TARGET_NAME = TARGET_NAME;
|
|
17
|
-
}
|