@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.
- package/LICENSE +20 -20
- package/README.OpenSource +10 -10
- package/README.md +14 -14
- package/RNAudioRecorderPlayer.podspec +21 -21
- package/harmony/audio_recorder_player/BuildProfile.ets +16 -16
- package/harmony/audio_recorder_player/LICENSE +21 -21
- package/harmony/audio_recorder_player/build-profile.json5 +28 -28
- package/harmony/audio_recorder_player/index.ets +25 -25
- package/harmony/audio_recorder_player/oh-package.json5 +20 -20
- package/harmony/audio_recorder_player/src/main/cpp/CMakeLists.txt +7 -7
- package/harmony/audio_recorder_player/src/main/cpp/RNAudioRecorderPlayerPackage.h +48 -48
- package/harmony/audio_recorder_player/src/main/cpp/RNAudioRecorderPlayerTurboModule.cpp +90 -90
- package/harmony/audio_recorder_player/src/main/cpp/RNAudioRecorderPlayerTurboModule.h +35 -35
- package/harmony/audio_recorder_player/src/main/ets/RNAudioRecorderPlayerPackage.ts +47 -47
- package/harmony/audio_recorder_player/src/main/ets/RNAudioRecorderPlayerTurboModule.ts +323 -315
- package/harmony/audio_recorder_player/src/main/ets/audioPlayer/AudioPlayer.ts +464 -464
- package/harmony/audio_recorder_player/src/main/ets/audioPlayer/types.ts +45 -45
- package/harmony/audio_recorder_player/src/main/ets/recorder/Recorder.ts +299 -299
- package/harmony/audio_recorder_player/src/main/ets/recorder/types.ts +61 -61
- package/harmony/audio_recorder_player/src/main/ets/utils/DateTimeUtils.ts +88 -88
- package/harmony/audio_recorder_player/src/main/ets/utils/Logger.ts +45 -45
- package/harmony/audio_recorder_player/src/main/ets/utils/SaveAudioAsset.ts +105 -105
- package/harmony/audio_recorder_player/src/main/module.json5 +9 -9
- package/harmony/audio_recorder_player/src/main/resources/base/element/string.json +8 -8
- package/harmony/audio_recorder_player/src/main/resources/base/media/ic_public_error.svg +9 -9
- package/harmony/audio_recorder_player/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/audio_recorder_player/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/audio_recorder_player/ts.ts +26 -26
- package/harmony/audio_recorder_player.har +0 -0
- package/index.ts +538 -538
- package/package.json +59 -59
- package/src/NativeAudioRecorderPlayerModule.ts +42 -42
- package/harmony/audio_recorder_player/oh-package-lock.json5 +0 -18
- package/harmony/audio_recorder_player/src/main/ets/index.d.ts +0 -209
- package/index.d.ts +0 -226
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export const TAG: string = 'Audio_Player';
|
|
8
|
-
|
|
9
|
-
export const playBackName: string = 'rn-playback';
|
|
10
|
-
|
|
11
|
-
export enum EventTarget {
|
|
12
|
-
durationUpdate = 'durationUpdate',
|
|
13
|
-
timeUpdate = 'timeUpdate',
|
|
14
|
-
stateChange = 'stateChange',
|
|
15
|
-
error = 'error',
|
|
16
|
-
seekDone = 'seekDone',
|
|
17
|
-
volumeChange = 'volumeChange',
|
|
18
|
-
seekToPlayer = 'seekToPlayer',
|
|
19
|
-
setVolume = 'setVolume',
|
|
20
|
-
setPlaybackSpeed = 'setPlaybackSpeed',
|
|
21
|
-
speedDone = 'speedDone',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export enum AVPlayerState {
|
|
25
|
-
idle = 'idle',
|
|
26
|
-
initialized = 'initialized',
|
|
27
|
-
prepared = 'prepared',
|
|
28
|
-
playing = 'playing',
|
|
29
|
-
paused = 'paused',
|
|
30
|
-
completed = 'completed',
|
|
31
|
-
stopped = 'stopped',
|
|
32
|
-
released = 'released',
|
|
33
|
-
error = 'error',
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export enum processValue {
|
|
37
|
-
play = 'playing',
|
|
38
|
-
resume = 'Already playing',
|
|
39
|
-
stop = 'Already stopped playing',
|
|
40
|
-
pause = 'Already paused playing',
|
|
41
|
-
noPlaying = 'No audio playing',
|
|
42
|
-
stateError = 'current state is not allowed',
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const pathStartWith: Array<string> = ['fd://', 'http://', 'https://'];
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const TAG: string = 'Audio_Player';
|
|
8
|
+
|
|
9
|
+
export const playBackName: string = 'rn-playback';
|
|
10
|
+
|
|
11
|
+
export enum EventTarget {
|
|
12
|
+
durationUpdate = 'durationUpdate',
|
|
13
|
+
timeUpdate = 'timeUpdate',
|
|
14
|
+
stateChange = 'stateChange',
|
|
15
|
+
error = 'error',
|
|
16
|
+
seekDone = 'seekDone',
|
|
17
|
+
volumeChange = 'volumeChange',
|
|
18
|
+
seekToPlayer = 'seekToPlayer',
|
|
19
|
+
setVolume = 'setVolume',
|
|
20
|
+
setPlaybackSpeed = 'setPlaybackSpeed',
|
|
21
|
+
speedDone = 'speedDone',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum AVPlayerState {
|
|
25
|
+
idle = 'idle',
|
|
26
|
+
initialized = 'initialized',
|
|
27
|
+
prepared = 'prepared',
|
|
28
|
+
playing = 'playing',
|
|
29
|
+
paused = 'paused',
|
|
30
|
+
completed = 'completed',
|
|
31
|
+
stopped = 'stopped',
|
|
32
|
+
released = 'released',
|
|
33
|
+
error = 'error',
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export enum processValue {
|
|
37
|
+
play = 'playing',
|
|
38
|
+
resume = 'Already playing',
|
|
39
|
+
stop = 'Already stopped playing',
|
|
40
|
+
pause = 'Already paused playing',
|
|
41
|
+
noPlaying = 'No audio playing',
|
|
42
|
+
stateError = 'current state is not allowed',
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const pathStartWith: Array<string> = ['fd://', 'http://', 'https://'];
|