@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
@@ -1,91 +1,91 @@
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
- #include "RNAudioRecorderPlayerTurboModule.h"
26
- #include "RNOH/ArkTSTurboModule.h"
27
-
28
- using namespace rnoh;
29
- using namespace facebook;
30
- static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addRecordBackListener(
31
- jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
32
- return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "addRecordBackListener", args, count);
33
- }
34
- static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeRecordBackListener(
35
- jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
36
- return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "removeRecordBackListener", args, count);
37
- }
38
-
39
- static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addPlayBackListener(
40
- jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
41
- return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "addPlayBackListener", args, count);
42
- }
43
-
44
- static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removePlayBackListener(
45
- jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
46
- return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "removePlayBackListener", args, count);
47
- }
48
-
49
- static jsi::Value _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addListener(jsi::Runtime &rt,
50
- react::TurboModule &turboModule,
51
- const jsi::Value *args,
52
- size_t count) {
53
- return jsi::Value(static_cast<ArkTSTurboModule &>(turboModule).call(rt, "addListener", args, count));
54
- }
55
-
56
- static jsi::Value _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeListeners(jsi::Runtime &rt,
57
- react::TurboModule &turboModule,
58
- const jsi::Value *args,
59
- size_t count) {
60
- return jsi::Value(static_cast<ArkTSTurboModule &>(turboModule).call(rt, "removeListeners", args, count));
61
- }
62
-
63
- RNAudioRecorderPlayerTurboModuleSpecJSI::RNAudioRecorderPlayerTurboModuleSpecJSI(const ArkTSTurboModule::Context ctx,
64
- const std::string name)
65
- : ArkTSTurboModule(ctx, name) {
66
- methodMap_ = {
67
- ARK_ASYNC_METHOD_METADATA(startRecorder, 3),
68
- ARK_ASYNC_METHOD_METADATA(pauseRecorder, 0),
69
- ARK_ASYNC_METHOD_METADATA(resumeRecorder, 0),
70
- ARK_ASYNC_METHOD_METADATA(stopRecorder, 0),
71
- ARK_ASYNC_METHOD_METADATA(resumePlayer, 0),
72
- ARK_ASYNC_METHOD_METADATA(startPlayer, 2),
73
- ARK_ASYNC_METHOD_METADATA(stopPlayer, 0),
74
- ARK_ASYNC_METHOD_METADATA(pausePlayer, 0),
75
- ARK_ASYNC_METHOD_METADATA(seekToPlayer, 1),
76
- ARK_ASYNC_METHOD_METADATA(setVolume, 1),
77
- ARK_ASYNC_METHOD_METADATA(setPlaybackSpeed, 1),
78
- ARK_ASYNC_METHOD_METADATA(setSubscriptionDuration, 1),
79
- };
80
- methodMap_["addRecordBackListener"] =
81
- MethodMetadata{1, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addRecordBackListener};
82
- methodMap_["removeRecordBackListener"] =
83
- MethodMetadata{0, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeRecordBackListener};
84
- methodMap_["addPlayBackListener"] =
85
- MethodMetadata{1, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addPlayBackListener};
86
- methodMap_["removePlayBackListener"] =
87
- MethodMetadata{0, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removePlayBackListener};
88
- methodMap_["addListener"] = MethodMetadata{1, _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addListener};
89
- methodMap_["removeListeners"] =
90
- MethodMetadata{1, _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeListeners};
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
+ #include "RNAudioRecorderPlayerTurboModule.h"
26
+ #include "RNOH/ArkTSTurboModule.h"
27
+
28
+ using namespace rnoh;
29
+ using namespace facebook;
30
+ static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addRecordBackListener(
31
+ jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
32
+ return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "addRecordBackListener", args, count);
33
+ }
34
+ static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeRecordBackListener(
35
+ jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
36
+ return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "removeRecordBackListener", args, count);
37
+ }
38
+
39
+ static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addPlayBackListener(
40
+ jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
41
+ return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "addPlayBackListener", args, count);
42
+ }
43
+
44
+ static jsi::Value __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removePlayBackListener(
45
+ jsi::Runtime &rt, react::TurboModule &turboModule, const jsi::Value *args, size_t count) {
46
+ return static_cast<ArkTSTurboModule &>(turboModule).call(rt, "removePlayBackListener", args, count);
47
+ }
48
+
49
+ static jsi::Value _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addListener(jsi::Runtime &rt,
50
+ react::TurboModule &turboModule,
51
+ const jsi::Value *args,
52
+ size_t count) {
53
+ return jsi::Value(static_cast<ArkTSTurboModule &>(turboModule).call(rt, "addListener", args, count));
54
+ }
55
+
56
+ static jsi::Value _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeListeners(jsi::Runtime &rt,
57
+ react::TurboModule &turboModule,
58
+ const jsi::Value *args,
59
+ size_t count) {
60
+ return jsi::Value(static_cast<ArkTSTurboModule &>(turboModule).call(rt, "removeListeners", args, count));
61
+ }
62
+
63
+ RNAudioRecorderPlayerTurboModuleSpecJSI::RNAudioRecorderPlayerTurboModuleSpecJSI(const ArkTSTurboModule::Context ctx,
64
+ const std::string name)
65
+ : ArkTSTurboModule(ctx, name) {
66
+ methodMap_ = {
67
+ ARK_ASYNC_METHOD_METADATA(startRecorder, 3),
68
+ ARK_ASYNC_METHOD_METADATA(pauseRecorder, 0),
69
+ ARK_ASYNC_METHOD_METADATA(resumeRecorder, 0),
70
+ ARK_ASYNC_METHOD_METADATA(stopRecorder, 0),
71
+ ARK_ASYNC_METHOD_METADATA(resumePlayer, 0),
72
+ ARK_ASYNC_METHOD_METADATA(startPlayer, 2),
73
+ ARK_ASYNC_METHOD_METADATA(stopPlayer, 0),
74
+ ARK_ASYNC_METHOD_METADATA(pausePlayer, 0),
75
+ ARK_ASYNC_METHOD_METADATA(seekToPlayer, 1),
76
+ ARK_ASYNC_METHOD_METADATA(setVolume, 1),
77
+ ARK_ASYNC_METHOD_METADATA(setPlaybackSpeed, 1),
78
+ ARK_ASYNC_METHOD_METADATA(setSubscriptionDuration, 1),
79
+ };
80
+ methodMap_["addRecordBackListener"] =
81
+ MethodMetadata{1, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addRecordBackListener};
82
+ methodMap_["removeRecordBackListener"] =
83
+ MethodMetadata{0, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeRecordBackListener};
84
+ methodMap_["addPlayBackListener"] =
85
+ MethodMetadata{1, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addPlayBackListener};
86
+ methodMap_["removePlayBackListener"] =
87
+ MethodMetadata{0, __hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removePlayBackListener};
88
+ methodMap_["addListener"] = MethodMetadata{1, _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_addListener};
89
+ methodMap_["removeListeners"] =
90
+ MethodMetadata{1, _hostFunction_RNAudioRecorderPlayerTurboModuleSpecJSI_removeListeners};
91
91
  }
@@ -1,36 +1,36 @@
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
-
26
- #include <ReactCommon/TurboModule.h>
27
- #include "RNOH/ArkTSTurboModule.h"
28
-
29
- namespace rnoh {
30
-
31
- class JSI_EXPORT RNAudioRecorderPlayerTurboModuleSpecJSI : public ArkTSTurboModule {
32
- public:
33
- RNAudioRecorderPlayerTurboModuleSpecJSI(const ArkTSTurboModule::Context ctx, const std::string name);
34
- };
35
-
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
+
26
+ #include <ReactCommon/TurboModule.h>
27
+ #include "RNOH/ArkTSTurboModule.h"
28
+
29
+ namespace rnoh {
30
+
31
+ class JSI_EXPORT RNAudioRecorderPlayerTurboModuleSpecJSI : public ArkTSTurboModule {
32
+ public:
33
+ RNAudioRecorderPlayerTurboModuleSpecJSI(const ArkTSTurboModule::Context ctx, const std::string name);
34
+ };
35
+
36
36
  } // namespace rnoh
@@ -1,47 +1,47 @@
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 type { TurboModule, TurboModuleContext, } from '@rnoh/react-native-openharmony/ts';
26
- import { RNPackage, TurboModulesFactory, } from '@rnoh/react-native-openharmony/ts';
27
- import { RNAudioRecorderPlayerTurboModule } from './RNAudioRecorderPlayerTurboModule';
28
-
29
- class RNAudioRecorderPlayerTurboModulesFactory extends TurboModulesFactory {
30
- createTurboModule(name: string): TurboModule | null {
31
- if (name === 'RNAudioRecorderPlayerTurboModule') {
32
- globalThis.uiAbilityContext = this.ctx.uiAbilityContext;
33
- return new RNAudioRecorderPlayerTurboModule(this.ctx);
34
- }
35
- return null;
36
- }
37
-
38
- hasTurboModule(name: string): boolean {
39
- return name === 'RNAudioRecorderPlayerTurboModule';
40
- }
41
- }
42
-
43
- export class RNAudioRecorderPlayerPackage extends RNPackage {
44
- createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
45
- return new RNAudioRecorderPlayerTurboModulesFactory(ctx);
46
- }
47
- }
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 type { TurboModule, TurboModuleContext, } from '@rnoh/react-native-openharmony/ts';
26
+ import { RNPackage, TurboModulesFactory, } from '@rnoh/react-native-openharmony/ts';
27
+ import { RNAudioRecorderPlayerTurboModule } from './RNAudioRecorderPlayerTurboModule';
28
+
29
+ class RNAudioRecorderPlayerTurboModulesFactory extends TurboModulesFactory {
30
+ createTurboModule(name: string): TurboModule | null {
31
+ if (name === 'RNAudioRecorderPlayerTurboModule') {
32
+ globalThis.uiAbilityContext = this.ctx.uiAbilityContext;
33
+ return new RNAudioRecorderPlayerTurboModule(this.ctx);
34
+ }
35
+ return null;
36
+ }
37
+
38
+ hasTurboModule(name: string): boolean {
39
+ return name === 'RNAudioRecorderPlayerTurboModule';
40
+ }
41
+ }
42
+
43
+ export class RNAudioRecorderPlayerPackage extends RNPackage {
44
+ createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
45
+ return new RNAudioRecorderPlayerTurboModulesFactory(ctx);
46
+ }
47
+ }