FLUTTER ECOSYSTEM

evrone/flutter_audio

一个用于播放和录制声音的 Flutter 音频插件

flutter_audio 项目封面
Stars
111
Forks
34
最近推送(UTC)
2021年3月25日
项目状态
未归档
Evrone GitHub avatar
GITHUB Organization

Evrone ↗

We are here to design, develop, and grow your web and mobile products 😉

United States of America官方网站 ↗
语言JavaDartRubyObjective-C

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

medcorder_audio

Flutter record/play audio plugin.

pub package Language

Sponsored by Evrone
Developed for Evrone.com
Funded by Medcorder Medcorder.com

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

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<String, String>

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