https://github.com/evrone/flutter_audio
A Flutter audio-plugin to playing and recording sounds
https://github.com/evrone/flutter_audio
Last synced: 11 months ago
JSON representation
A Flutter audio-plugin to playing and recording sounds
- Host: GitHub
- URL: https://github.com/evrone/flutter_audio
- Owner: evrone
- License: mit
- Created: 2017-10-03T08:26:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-25T09:21:30.000Z (over 5 years ago)
- Last Synced: 2025-07-18T09:59:51.245Z (12 months ago)
- Language: Java
- Homepage: https://evrone.com
- Size: 212 KB
- Stars: 110
- Watchers: 15
- Forks: 35
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# medcorder_audio
## Flutter record/play audio plugin.
[](https://pub.dev/packages/medcorder_audio)
[](https://dart.dev)
### Developed for [Evrone.com](https://evrone.com/flutter?utm_source=github&utm_campaign=flutter_audio)
### Funded by Medcorder [Medcorder.com](https://medcorder.com/)
## Getting Started
For help getting started with Flutter, view our online
[documentation](https://flutter.io/).
For help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).
With the medcorder_audio plugin you can integrate record/play audio support into your flutter app for iOS or Android.
## Plugin functions
### setAudioSettings
**Future setAudioSettings()**\
iOS only. open PlayAndRecord audio session\
**returns: 'OK', 'FAIL'**
### backAudioSettings
**Future backAudioSettings()**\
iOS only. close PlayAndRecord audio session\
**returns: 'OK', 'FAIL'**
### startRecord
**Future startRecord(String fileId)**\
start record audio file to app documents path\
**returns: 'OK', 'FAIL'**
### stopRecord
**Future stopRecord()**\
stop audio recording process\
**returns: 'OK', 'FAIL'**
### checkMicrophonePermissions
**Future checkMicrophonePermissions()**\
check if you have recording audio permissions\
**returns: 'OK', 'NO'**
### startPlay
**Future startPlay(dynamic params) async**\
start audio playing for file with position\
**returns: 'OK', 'FAIL'**\
**params: Map**
| Key | Type | Description |
| ------------- |:-------------:| ---------:|
| file | String | String file Id |
| position | double | play start position in seconds |
### stopPlay
**Future stopPlay()**\
stop audio playing\
**returns: 'OK', 'FAIL'**\
## Plugin events
for receiving plugin events you need assign callback function\
**void _onEvent(dynamic event) {...}**
### recording events
| Key | Type | Description |
| ------------- |:-------------:| ---------:|
|'code' |String |'recording', |
|'url' |String |recording file url|
|'peakPowerForChannel' |double |peak power for channel|
|'currentTime' |double |recording time in seconds|
### playing events
| Key | Type | Description |
| ------------- |:-------------:| ---------:|
|'code' |String |'playing', 'audioPlayerDidFinishPlaying' |
|'url' |String |playing file url|
|'currentTime' |double |playing time in seconds|
|'duration' |double |playing file duration|