Skip to content

Commit

Permalink
Release 3.0.0 (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyochan authored May 9, 2021
1 parent ac51cae commit 28faf40
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
3 changes: 2 additions & 1 deletion Example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class Page extends Component<any, State> {
};

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() {
Expand Down Expand Up @@ -319,6 +319,7 @@ class Page extends Component<any, State> {
);

this.audioRecorderPlayer.addRecordBackListener((e: RecordBackType) => {
console.log('record-back', e);
this.setState({
recordSecs: e.currentPosition,
recordTime: this.audioRecorderPlayer.mmssss(
Expand Down
6 changes: 3 additions & 3 deletions Example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -505,7 +505,7 @@ SPEC CHECKSUMS:
React-runtimeexecutor: cad74a1eaa53ee6e7a3620231939d8fe2c6afcf0
ReactCommon: cfe2b7fd20e0dbd2d1185cd7d8f99633fbc5ff05
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNAudioRecorderPlayer: 415f616f2db152d9e6e11011fd8b192d3ef6606d
RNAudioRecorderPlayer: 9dc245c3e5465784328f6f6edf98b5db290b7641
Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
10 changes: 5 additions & 5 deletions ios/RNAudioRecorderPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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,
])
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 28faf40

Please sign in to comment.