diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a448dd..7726b8f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Changelogs - **[3.0.0]** + Released with `3.0.0` with below beta updates applied. + - beta.3 [Android] 1. Fix `Android` default path to `cacheDir`. diff --git a/Example/App.tsx b/Example/App.tsx index fa90fbd0..158a36e2 100644 --- a/Example/App.tsx +++ b/Example/App.tsx @@ -134,7 +134,7 @@ class Page extends Component { }; this.audioRecorderPlayer = new AudioRecorderPlayer(); - this.audioRecorderPlayer.setSubscriptionDuration(0.09); // optional. Default is 0.1 + this.audioRecorderPlayer.setSubscriptionDuration(0.1); // optional. Default is 0.5 } public render() { @@ -319,6 +319,7 @@ class Page extends Component { ); this.audioRecorderPlayer.addRecordBackListener((e: RecordBackType) => { + console.log('record-back', e); this.setState({ recordSecs: e.currentPosition, recordTime: this.audioRecorderPlayer.mmssss( diff --git a/Example/ios/Podfile.lock b/Example/ios/Podfile.lock index 9d8fa99f..e7658470 100644 --- a/Example/ios/Podfile.lock +++ b/Example/ios/Podfile.lock @@ -329,8 +329,8 @@ PODS: - React-perflogger (= 0.64.0) - rn-fetch-blob (0.12.0): - React-Core - - RNAudioRecorderPlayer (2.7.0): - - React + - RNAudioRecorderPlayer (3.0.0-beta.3): + - React-Core - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -505,7 +505,7 @@ SPEC CHECKSUMS: React-runtimeexecutor: cad74a1eaa53ee6e7a3620231939d8fe2c6afcf0 ReactCommon: cfe2b7fd20e0dbd2d1185cd7d8f99633fbc5ff05 rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba - RNAudioRecorderPlayer: 415f616f2db152d9e6e11011fd8b192d3ef6606d + RNAudioRecorderPlayer: 9dc245c3e5465784328f6f6edf98b5db290b7641 Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/ios/RNAudioRecorderPlayer.swift b/ios/RNAudioRecorderPlayer.swift index 9d66e001..1eb87746 100644 --- a/ios/RNAudioRecorderPlayer.swift +++ b/ios/RNAudioRecorderPlayer.swift @@ -59,9 +59,9 @@ class RNAudioRecorderPlayer: RCTEventEmitter, AVAudioRecorderDelegate { } let status = [ - "is_recording": audioRecorder.isRecording, - "current_position": audioRecorder.currentTime * 1000, - "current_metering": currentMetering, + "isRecording": audioRecorder.isRecording, + "currentPosition": audioRecorder.currentTime * 1000, + "currentMetering": currentMetering, ] as [String : Any]; sendEvent(withName: "rn-recordback", body: status) @@ -132,7 +132,7 @@ class RNAudioRecorderPlayer: RCTEventEmitter, AVAudioRecorderDelegate { /********** Player **********/ - @objc(startRecorder:meteringEnabled:audioSets:resolve:reject:) + @objc(startRecorder:audioSets:meteringEnabled:resolve:reject:) func startRecorder(path: String, audioSets: [String: Any], meteringEnabled: Bool, resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) -> Void { @@ -283,7 +283,7 @@ class RNAudioRecorderPlayer: RCTEventEmitter, AVAudioRecorderDelegate { queue: .main) {_ in self.sendEvent(withName: "rn-playback", body: [ "isMuted": self.audioPlayer.isMuted, - "current_position": self.audioPlayerItem.currentTime().seconds * 1000, + "currentPosition": self.audioPlayerItem.currentTime().seconds * 1000, "duration": self.audioPlayerItem.duration.seconds * 1000, ]) } diff --git a/package.json b/package.json index b04911c3..bf5145ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-audio-recorder-player", - "version": "3.0.0-beta.3", + "version": "3.0.0", "description": "React Native Audio Recorder and Player.", "homepage": "https://github.com/dooboolab/react-native-audio-recorder-player", "main": "index.ts",