Skip to content

Commit

Permalink
Release 3.0.5 (#307)
Browse files Browse the repository at this point in the history
* Handle file path better

* Update issue template
  • Loading branch information
hyochan authored May 18, 2021
1 parent 5078edc commit 08f90ef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Changelogs
- **[3.0.5]**
- [iOS] Handle file path better [#307](https://github.com/hyochan/react-native-audio-recorder-player/pull/307)

- **[3.0.4]**
- [Android] Add optional wrappers to support android sdk 30 [#305](https://github.com/hyochan/react-native-audio-recorder-player/pull/305)

Expand Down
4 changes: 1 addition & 3 deletions ios/RNAudioRecorderPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ class RNAudioRecorderPlayer: RCTEventEmitter, AVAudioRecorderDelegate {
if (path == "DEFAULT") {
let cachesDirectory = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!
audioFileURL = cachesDirectory.appendingPathComponent("sound.m4a")
} else if (path.contains("http")){
} else if (path.hasPrefix("http://") || path.hasPrefix("https://") || path.hasPrefix("file://")) {
audioFileURL = URL(string: path)
} else if (path.contains("file")) {
audioFileURL = path
} else {
let cachesDirectory = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!
audioFileURL = cachesDirectory.appendingPathComponent(path)
Expand Down
5 changes: 4 additions & 1 deletion issue_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
> Please use the
> Please fill the template to help you out. Also, please try the `Example` project compare before submiting the issue when you have certain issue with your project setup.
### Version of react-native-audio-recorder-player


### Version of React Native

### Platforms you faced the error (IOS or Android or both?)

### Expected behavior
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.4",
"version": "3.0.5",
"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 08f90ef

Please sign in to comment.