@react-native-ohos/react-native-audio-recorder-player 3.6.14-rc.1 → 3.7.0-rc.2

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.
Files changed (35) hide show
  1. package/LICENSE +20 -20
  2. package/README.OpenSource +10 -10
  3. package/README.md +14 -14
  4. package/RNAudioRecorderPlayer.podspec +21 -21
  5. package/harmony/audio_recorder_player/BuildProfile.ets +16 -16
  6. package/harmony/audio_recorder_player/LICENSE +21 -21
  7. package/harmony/audio_recorder_player/build-profile.json5 +28 -28
  8. package/harmony/audio_recorder_player/index.ets +25 -25
  9. package/harmony/audio_recorder_player/oh-package.json5 +20 -20
  10. package/harmony/audio_recorder_player/src/main/cpp/CMakeLists.txt +7 -7
  11. package/harmony/audio_recorder_player/src/main/cpp/RNAudioRecorderPlayerPackage.h +48 -48
  12. package/harmony/audio_recorder_player/src/main/cpp/RNAudioRecorderPlayerTurboModule.cpp +90 -90
  13. package/harmony/audio_recorder_player/src/main/cpp/RNAudioRecorderPlayerTurboModule.h +35 -35
  14. package/harmony/audio_recorder_player/src/main/ets/RNAudioRecorderPlayerPackage.ts +47 -47
  15. package/harmony/audio_recorder_player/src/main/ets/RNAudioRecorderPlayerTurboModule.ts +323 -315
  16. package/harmony/audio_recorder_player/src/main/ets/audioPlayer/AudioPlayer.ts +464 -464
  17. package/harmony/audio_recorder_player/src/main/ets/audioPlayer/types.ts +45 -45
  18. package/harmony/audio_recorder_player/src/main/ets/recorder/Recorder.ts +299 -299
  19. package/harmony/audio_recorder_player/src/main/ets/recorder/types.ts +61 -61
  20. package/harmony/audio_recorder_player/src/main/ets/utils/DateTimeUtils.ts +88 -88
  21. package/harmony/audio_recorder_player/src/main/ets/utils/Logger.ts +45 -45
  22. package/harmony/audio_recorder_player/src/main/ets/utils/SaveAudioAsset.ts +105 -105
  23. package/harmony/audio_recorder_player/src/main/module.json5 +9 -9
  24. package/harmony/audio_recorder_player/src/main/resources/base/element/string.json +8 -8
  25. package/harmony/audio_recorder_player/src/main/resources/base/media/ic_public_error.svg +9 -9
  26. package/harmony/audio_recorder_player/src/main/resources/en_US/element/string.json +8 -8
  27. package/harmony/audio_recorder_player/src/main/resources/zh_CN/element/string.json +8 -8
  28. package/harmony/audio_recorder_player/ts.ts +26 -26
  29. package/harmony/audio_recorder_player.har +0 -0
  30. package/index.ts +538 -538
  31. package/package.json +59 -59
  32. package/src/NativeAudioRecorderPlayerModule.ts +42 -42
  33. package/harmony/audio_recorder_player/oh-package-lock.json5 +0 -18
  34. package/harmony/audio_recorder_player/src/main/ets/index.d.ts +0 -209
  35. package/index.d.ts +0 -226
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 hyochan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2024 hyochan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.OpenSource CHANGED
@@ -1,11 +1,11 @@
1
- [
2
- {
3
- "Name": "react-native-audio-recorder-player",
4
- "License": "MIT License",
5
- "License File": "https://github.com/hyochan/react-native-audio-recorder-player/blob/main/LICENSE",
6
- "Version Number": "3.6.13",
7
- "Owner" : "xiafeng@huawei.com",
8
- "Upstream URL": "https://github.com/hyochan/react-native-audio-recorder-player",
9
- "Description": "react-native native module for audio recorder and player with nitromodule!"
10
- }
1
+ [
2
+ {
3
+ "Name": "react-native-audio-recorder-player",
4
+ "License": "MIT License",
5
+ "License File": "https://github.com/hyochan/react-native-audio-recorder-player/blob/main/LICENSE",
6
+ "Version Number": "3.6.13",
7
+ "Owner" : "xiafeng@huawei.com",
8
+ "Upstream URL": "https://github.com/hyochan/react-native-audio-recorder-player",
9
+ "Description": "react-native native module for audio recorder and player with nitromodule!"
10
+ }
11
11
  ]
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
- # @react-native-ohos/react-native-audio-recorder-player
2
-
3
- This project is based on [react-native-audio-recorder-player](https://github.com/hyochan/react-native-audio-recorder-player)
4
-
5
- ## Documentation
6
-
7
- - [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-audio-recorder-player.md)
8
-
9
- - [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-audio-recorder-player.md)
10
-
11
- ## License
12
-
13
- This library is licensed under [The MIT License (MIT)](https://github.com/hyochan/react-native-audio-recorder-player/blob/main/LICENSE)
14
-
1
+ # @react-native-ohos/react-native-audio-recorder-player
2
+
3
+ This project is based on [react-native-audio-recorder-player@3.6.13](https://github.com/hyochan/react-native-audio-recorder-player/tree/3.6.13)
4
+
5
+ ## Documentation
6
+
7
+ - [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-audio-recorder-player.md)
8
+
9
+ - [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-audio-recorder-player.md)
10
+
11
+ ## License
12
+
13
+ This library is licensed under [The MIT License (MIT)](https://github.com/hyochan/react-native-audio-recorder-player/blob/main/LICENSE)
14
+
@@ -1,21 +1,21 @@
1
- require 'json'
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = "RNAudioRecorderPlayer"
7
- s.version = package['version']
8
- s.summary = package['description']
9
- s.license = package['license']
10
-
11
- s.authors = package['author']
12
- s.homepage = package['homepage']
13
- s.platform = :ios, "11.0"
14
- s.ios.deployment_target = "10.0"
15
-
16
- s.source = { :git => "https://github.com/hyochan/react-native-audio-recorder-player.git", :tag => "#{s.version}" }
17
- s.source_files = "ios/**/*.{h,c,cc,cpp,m,mm,swift}"
18
-
19
- s.dependency 'React-Core'
20
- end
21
-
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "RNAudioRecorderPlayer"
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.license = package['license']
10
+
11
+ s.authors = package['author']
12
+ s.homepage = package['homepage']
13
+ s.platform = :ios, "11.0"
14
+ s.ios.deployment_target = "10.0"
15
+
16
+ s.source = { :git => "https://github.com/hyochan/react-native-audio-recorder-player.git", :tag => "#{s.version}" }
17
+ s.source_files = "ios/**/*.{h,c,cc,cpp,m,mm,swift}"
18
+
19
+ s.dependency 'React-Core'
20
+ end
21
+
@@ -1,17 +1,17 @@
1
- /**
2
- * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
- */
4
- export const HAR_VERSION = '3.6.14-rc.1';
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;
1
+ /**
2
+ * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
+ */
4
+ export const HAR_VERSION = '3.6.14-rc.1';
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
17
  }
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 Atul
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Atul
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,28 +1,28 @@
1
- {
2
- "apiType": "stageMode",
3
- "buildOption": {
4
- },
5
- "buildOptionSet": [
6
- {
7
- "name": "release",
8
- "arkOptions": {
9
- "obfuscation": {
10
- "ruleOptions": {
11
- "enable": true,
12
- "files": [
13
- "./obfuscation-rules.txt"
14
- ]
15
- },
16
- "consumerFiles": [
17
- "./consumer-rules.txt"
18
- ]
19
- }
20
- },
21
- },
22
- ],
23
- "targets": [
24
- {
25
- "name": "default"
26
- }
27
- ]
28
- }
1
+ {
2
+ "apiType": "stageMode",
3
+ "buildOption": {
4
+ },
5
+ "buildOptionSet": [
6
+ {
7
+ "name": "release",
8
+ "arkOptions": {
9
+ "obfuscation": {
10
+ "ruleOptions": {
11
+ "enable": true,
12
+ "files": [
13
+ "./obfuscation-rules.txt"
14
+ ]
15
+ },
16
+ "consumerFiles": [
17
+ "./consumer-rules.txt"
18
+ ]
19
+ }
20
+ },
21
+ },
22
+ ],
23
+ "targets": [
24
+ {
25
+ "name": "default"
26
+ }
27
+ ]
28
+ }
@@ -1,25 +1,25 @@
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
- export * from './ts';
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
+ export * from './ts';
@@ -1,20 +1,20 @@
1
- {
2
- "license": "ISC",
3
- "types": "",
4
- "devDependencies": {},
5
- "name": "@react-native-ohos/react-native-audio-recorder-player",
6
- "description": "",
7
- "main": "index.ets",
8
- "version": "3.6.14-rc.1",
9
- "dependencies": {
10
- "@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/harmony/react_native_openharmony.har"
11
- },
12
- "metadata": {
13
- "sourceRoots": [
14
- "./src/main"
15
- ]
16
- },
17
- "compatibleSdkVersion": '12',
18
- "compatibleSdkType": "HarmonyOS",
19
- "obfuscated": false
20
- }
1
+ {
2
+ "license": "ISC",
3
+ "types": "",
4
+ "devDependencies": {},
5
+ "name": "@react-native-ohos/react-native-audio-recorder-player",
6
+ "description": "",
7
+ "main": "index.ets",
8
+ "version": "3.7.0-rc.2",
9
+ "dependencies": {
10
+ "@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/harmony/react_native_openharmony.har"
11
+ },
12
+ "metadata": {
13
+ "sourceRoots": [
14
+ "./src/main"
15
+ ]
16
+ },
17
+ "compatibleSdkVersion": '12',
18
+ "compatibleSdkType": "HarmonyOS",
19
+ "obfuscated": false
20
+ }
@@ -1,7 +1,7 @@
1
- cmake_minimum_required(VERSION 3.13)
2
- set(CMAKE_VERBOSE_MAKEFILE on)
3
-
4
- file(GLOB rnoh_audio_recorder_player_SRC CONFIGURE_DEPENDS *.cpp)
5
- add_library(rnoh_audio_recorder_player SHARED ${rnoh_audio_recorder_player_SRC})
6
- target_include_directories(rnoh_audio_recorder_player PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
7
- target_link_libraries(rnoh_audio_recorder_player PUBLIC rnoh)
1
+ cmake_minimum_required(VERSION 3.13)
2
+ set(CMAKE_VERBOSE_MAKEFILE on)
3
+
4
+ file(GLOB rnoh_audio_recorder_player_SRC CONFIGURE_DEPENDS *.cpp)
5
+ add_library(rnoh_audio_recorder_player SHARED ${rnoh_audio_recorder_player_SRC})
6
+ target_include_directories(rnoh_audio_recorder_player PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
7
+ target_link_libraries(rnoh_audio_recorder_player PUBLIC rnoh)
@@ -1,48 +1,48 @@
1
-
2
- /**
3
- * MIT License
4
- *
5
- * Copyright (C) 2023 Huawei Device Co., Ltd.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in all
15
- * copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- * SOFTWARE.
24
- */
25
- #include "RNOH/Package.h"
26
- #include "RNAudioRecorderPlayerTurboModule.h"
27
-
28
- using namespace rnoh;
29
- using namespace facebook;
30
- class RNAudioRecorderPlayerFactoryDelegate : public TurboModuleFactoryDelegate {
31
- public:
32
- SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
33
- if (name == "RNAudioRecorderPlayerTurboModule") {
34
- return std::make_shared<RNAudioRecorderPlayerTurboModuleSpecJSI>(ctx, name);
35
- }
36
- return nullptr;
37
- };
38
- };
39
-
40
- namespace rnoh {
41
- class RNAudioRecorderPlayerPackage : public Package {
42
- public:
43
- RNAudioRecorderPlayerPackage(Package::Context ctx) : Package(ctx) {}
44
- std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
45
- return std::make_unique<RNAudioRecorderPlayerFactoryDelegate>();
46
- }
47
- };
48
- } // namespace rnoh
1
+
2
+ /**
3
+ * MIT License
4
+ *
5
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * in the Software without restriction, including without limitation the rights
10
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ * copies of the Software, and to permit persons to whom the Software is
12
+ * furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice shall be included in all
15
+ * copies or substantial portions of the Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ * SOFTWARE.
24
+ */
25
+ #include "RNOH/Package.h"
26
+ #include "RNAudioRecorderPlayerTurboModule.h"
27
+
28
+ using namespace rnoh;
29
+ using namespace facebook;
30
+ class RNAudioRecorderPlayerFactoryDelegate : public TurboModuleFactoryDelegate {
31
+ public:
32
+ SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
33
+ if (name == "RNAudioRecorderPlayerTurboModule") {
34
+ return std::make_shared<RNAudioRecorderPlayerTurboModuleSpecJSI>(ctx, name);
35
+ }
36
+ return nullptr;
37
+ };
38
+ };
39
+
40
+ namespace rnoh {
41
+ class RNAudioRecorderPlayerPackage : public Package {
42
+ public:
43
+ RNAudioRecorderPlayerPackage(Package::Context ctx) : Package(ctx) {}
44
+ std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
45
+ return std::make_unique<RNAudioRecorderPlayerFactoryDelegate>();
46
+ }
47
+ };
48
+ } // namespace rnoh