@react-native-ohos/audio-toolkit 2.0.4-rc.2 → 2.0.4-rc.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/CHANGELOG.md +2 -136
- package/LICENSE +22 -22
- package/{harmony/audio_toolkit/OAT.xml → OAT.xml} +47 -37
- package/README.md +11 -17
- package/ReactNativeAudioToolkit.podspec +18 -18
- package/harmony/audio_toolkit/build-profile.json5 +7 -7
- package/harmony/audio_toolkit/hvigorfile.ts +1 -1
- package/harmony/audio_toolkit/index.ets +26 -25
- package/harmony/audio_toolkit/oh-package.json5 +12 -12
- package/harmony/audio_toolkit/src/main/cpp/AudioToolkitPackage.h +9 -13
- package/harmony/audio_toolkit/src/main/cpp/CMakeLists.txt +3 -2
- package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/{BaseAudioToolkitPackage.h → BaseReactNativeAudioToolkitPackage.h} +69 -76
- package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioPlayer.cpp +23 -23
- package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioPlayer.h +16 -16
- package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioRecorder.cpp +20 -20
- package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioRecorder.h +16 -16
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/ComponentDescriptors.h +22 -24
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/EventEmitters.cpp +18 -16
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/EventEmitters.h +19 -17
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/Props.cpp +21 -19
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/Props.h +20 -18
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/ShadowNodes.cpp +19 -17
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/ShadowNodes.h +25 -23
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/States.cpp +18 -16
- package/harmony/audio_toolkit/src/main/cpp/generated/react/renderer/components/{audio_toolkit → react_native_audio_toolkit}/States.h +23 -19
- package/harmony/audio_toolkit/src/main/ets/{AudioToolkitPackage.ts → AudioToolkitPackage.ets} +51 -50
- package/harmony/audio_toolkit/src/main/ets/Logger.ts +63 -63
- package/harmony/audio_toolkit/src/main/ets/RNCAudioPlayerTurboModule.ts +432 -432
- package/harmony/audio_toolkit/src/main/ets/RNCAudioRecorderTurboModule.ts +260 -260
- package/harmony/audio_toolkit/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/audio_toolkit/src/main/ets/generated/index.ets +5 -5
- package/harmony/audio_toolkit/src/main/ets/generated/ts.ts +6 -6
- package/harmony/audio_toolkit/src/main/ets/generated/turboModules/RCTAudioPlayer.ts +40 -40
- package/harmony/audio_toolkit/src/main/ets/generated/turboModules/RCTAudioRecorder.ts +24 -24
- package/harmony/audio_toolkit/src/main/ets/generated/turboModules/ts.ts +6 -6
- package/harmony/audio_toolkit/src/main/module.json5 +6 -6
- package/harmony/audio_toolkit/src/main/resources/base/element/string.json +7 -7
- package/harmony/audio_toolkit/src/main/resources/en_US/element/string.json +7 -7
- package/harmony/audio_toolkit/src/main/resources/zh_CN/element/string.json +7 -7
- package/harmony/audio_toolkit/{ts.ts → ts.ets} +25 -25
- package/harmony/audio_toolkit.har +0 -0
- package/package.json +48 -47
- package/src/Player.js +329 -329
- package/src/PlayerModule.ts +51 -51
- package/src/Recorder.js +183 -183
- package/src/RecorderModule.ts +83 -83
- package/src/index.ts +5 -5
- package/COMMITTERS.md +0 -7
- package/harmony/audio_toolkit/BuildProfile.ets +0 -17
- package/harmony/audio_toolkit/LICENSE +0 -21
- package/harmony/audio_toolkit/NOTICE +0 -33
- package/harmony/audio_toolkit/README.OpenSource +0 -11
- package/harmony/audio_toolkit/README.md +0 -17
package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioPlayer.cpp
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#include "RCTAudioPlayer.h"
|
|
6
|
-
|
|
7
|
-
namespace rnoh {
|
|
8
|
-
using namespace facebook;
|
|
9
|
-
|
|
10
|
-
RCTAudioPlayer::RCTAudioPlayer(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
-
methodMap_ = {
|
|
12
|
-
ARK_METHOD_METADATA(set, 3),
|
|
13
|
-
ARK_METHOD_METADATA(prepare, 4),
|
|
14
|
-
ARK_METHOD_METADATA(play, 2),
|
|
15
|
-
ARK_METHOD_METADATA(pause, 0),
|
|
16
|
-
ARK_METHOD_METADATA(stop, 0),
|
|
17
|
-
ARK_METHOD_METADATA(destroy, 1),
|
|
18
|
-
ARK_METHOD_METADATA(seek, 0),
|
|
19
|
-
ARK_METHOD_METADATA(getCurrentTime, 2),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#include "RCTAudioPlayer.h"
|
|
6
|
+
|
|
7
|
+
namespace rnoh {
|
|
8
|
+
using namespace facebook;
|
|
9
|
+
|
|
10
|
+
RCTAudioPlayer::RCTAudioPlayer(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
+
methodMap_ = {
|
|
12
|
+
ARK_METHOD_METADATA(set, 3),
|
|
13
|
+
ARK_METHOD_METADATA(prepare, 4),
|
|
14
|
+
ARK_METHOD_METADATA(play, 2),
|
|
15
|
+
ARK_METHOD_METADATA(pause, 0),
|
|
16
|
+
ARK_METHOD_METADATA(stop, 0),
|
|
17
|
+
ARK_METHOD_METADATA(destroy, 1),
|
|
18
|
+
ARK_METHOD_METADATA(seek, 0),
|
|
19
|
+
ARK_METHOD_METADATA(getCurrentTime, 2),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
} // namespace rnoh
|
package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioPlayer.h
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#pragma once
|
|
6
|
-
|
|
7
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
-
|
|
9
|
-
namespace rnoh {
|
|
10
|
-
|
|
11
|
-
class JSI_EXPORT RCTAudioPlayer : public ArkTSTurboModule {
|
|
12
|
-
public:
|
|
13
|
-
RCTAudioPlayer(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
+
|
|
9
|
+
namespace rnoh {
|
|
10
|
+
|
|
11
|
+
class JSI_EXPORT RCTAudioPlayer : public ArkTSTurboModule {
|
|
12
|
+
public:
|
|
13
|
+
RCTAudioPlayer(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
} // namespace rnoh
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#include "RCTAudioRecorder.h"
|
|
6
|
-
|
|
7
|
-
namespace rnoh {
|
|
8
|
-
using namespace facebook;
|
|
9
|
-
|
|
10
|
-
RCTAudioRecorder::RCTAudioRecorder(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
-
methodMap_ = {
|
|
12
|
-
ARK_METHOD_METADATA(prepare, 4),
|
|
13
|
-
ARK_METHOD_METADATA(record, 2),
|
|
14
|
-
ARK_METHOD_METADATA(stop, 2),
|
|
15
|
-
ARK_METHOD_METADATA(pause, 2),
|
|
16
|
-
ARK_METHOD_METADATA(destroy, 2),
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#include "RCTAudioRecorder.h"
|
|
6
|
+
|
|
7
|
+
namespace rnoh {
|
|
8
|
+
using namespace facebook;
|
|
9
|
+
|
|
10
|
+
RCTAudioRecorder::RCTAudioRecorder(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
+
methodMap_ = {
|
|
12
|
+
ARK_METHOD_METADATA(prepare, 4),
|
|
13
|
+
ARK_METHOD_METADATA(record, 2),
|
|
14
|
+
ARK_METHOD_METADATA(stop, 2),
|
|
15
|
+
ARK_METHOD_METADATA(pause, 2),
|
|
16
|
+
ARK_METHOD_METADATA(destroy, 2),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
} // namespace rnoh
|
package/harmony/audio_toolkit/src/main/cpp/generated/RNOH/generated/turbo_modules/RCTAudioRecorder.h
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#pragma once
|
|
6
|
-
|
|
7
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
-
|
|
9
|
-
namespace rnoh {
|
|
10
|
-
|
|
11
|
-
class JSI_EXPORT RCTAudioRecorder : public ArkTSTurboModule {
|
|
12
|
-
public:
|
|
13
|
-
RCTAudioRecorder(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
+
|
|
9
|
+
namespace rnoh {
|
|
10
|
+
|
|
11
|
+
class JSI_EXPORT RCTAudioRecorder : public ArkTSTurboModule {
|
|
12
|
+
public:
|
|
13
|
+
RCTAudioRecorder(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
} // namespace rnoh
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include
|
|
14
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
namespace
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/react_native_audio_toolkit/ShadowNodes.h>
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook {
|
|
17
|
+
namespace react {
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
} // namespace react
|
|
22
|
+
} // namespace facebook
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/react_native_audio_toolkit/EventEmitters.h>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
namespace facebook
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include
|
|
12
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
-
#include <react/renderer/core/propsConversions.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/react_native_audio_toolkit/Props.h>
|
|
12
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
} // namespace react
|
|
21
|
+
} // namespace facebook
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
} // namespace react
|
|
20
|
+
} // namespace facebook
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include
|
|
12
|
-
|
|
13
|
-
namespace facebook
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateShadowNodeCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/react_native_audio_toolkit/ShadowNodes.h>
|
|
12
|
+
|
|
13
|
+
namespace facebook {
|
|
14
|
+
namespace react {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include
|
|
14
|
-
#include
|
|
15
|
-
#include
|
|
16
|
-
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
-
#include <jsi/jsi.h>
|
|
18
|
-
|
|
19
|
-
namespace facebook
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/react_native_audio_toolkit/EventEmitters.h>
|
|
14
|
+
#include <react/renderer/components/react_native_audio_toolkit/Props.h>
|
|
15
|
+
#include <react/renderer/components/react_native_audio_toolkit/States.h>
|
|
16
|
+
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
+
#include <jsi/jsi.h>
|
|
18
|
+
|
|
19
|
+
namespace facebook {
|
|
20
|
+
namespace react {
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
} // namespace react
|
|
25
|
+
} // namespace facebook
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
-
*/
|
|
10
|
-
#include
|
|
11
|
-
|
|
12
|
-
namespace facebook
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
+
*/
|
|
10
|
+
#include <react/renderer/components/react_native_audio_toolkit/States.h>
|
|
11
|
+
|
|
12
|
+
namespace facebook {
|
|
13
|
+
namespace react {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateStateH.js
|
|
8
|
-
*/
|
|
9
|
-
#pragma once
|
|
10
|
-
|
|
11
|
-
#ifdef ANDROID
|
|
12
|
-
#include <folly/dynamic.h>
|
|
13
|
-
#
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateStateH.js
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#ifdef ANDROID
|
|
12
|
+
#include <folly/dynamic.h>
|
|
13
|
+
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
14
|
+
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
namespace facebook {
|
|
18
|
+
namespace react {
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
} // namespace react
|
|
23
|
+
} // namespace facebook
|
package/harmony/audio_toolkit/src/main/ets/{AudioToolkitPackage.ts → AudioToolkitPackage.ets}
RENAMED
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (C) 2023 Huawei Device Co., Ltd.
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts';
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
/**
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Huawei Device Co., Ltd.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts';
|
|
26
|
+
import { RNOHPackage } from '@rnoh/react-native-openharmony'
|
|
27
|
+
import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
|
|
28
|
+
import { RCTAudioPlayerTurboModule } from './RNCAudioPlayerTurboModule';
|
|
29
|
+
import { RCTAudioRecorderTurboModule } from './RNCAudioRecorderTurboModule';
|
|
30
|
+
export const AUDIO_TYPE: string = 'RCTAudioPlayer1';
|
|
31
|
+
|
|
32
|
+
class AudioPlayer1TurboModulesFactory extends TurboModulesFactory {
|
|
33
|
+
createTurboModule(name: string): TurboModule | null {
|
|
34
|
+
if (name === 'RCTAudioPlayer') {
|
|
35
|
+
return new RCTAudioPlayerTurboModule(this.ctx);
|
|
36
|
+
}
|
|
37
|
+
if (name === 'RCTAudioRecorder') {
|
|
38
|
+
return new RCTAudioRecorderTurboModule(this.ctx);
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
hasTurboModule(name: string): boolean {
|
|
44
|
+
return name === 'RCTAudioPlayer' || name === 'RCTAudioRecorder';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class AudioModulesPackage extends RNOHPackage {
|
|
49
|
+
createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
|
|
50
|
+
return new AudioPlayer1TurboModulesFactory(ctx);
|
|
51
|
+
}
|
|
51
52
|
}
|