问题描述
我有一个xamarin.forms项目,该项目必须记录音频并将其本地保存在应用程序中.
I have a xamarin.forms project which has to record the audio and save it localy on the app.
有没有可用于实现此目的的插件/api?
Is there any plugin / api which can be used to achieve this?
我也想知道recorind的来源.无论是从麦克风录制还是从免提(扬声器)录制而无需使用麦克风.
Also I would like to know the source of the recorind ie. whether it is being recorded from microphone or is it from handsfree (speaker) without using microphone.
推荐答案
据我所知,没有插件可以做到这一点.您可以创建一个名为IRecorder
的通用服务接口,该接口具有所需的功能,然后使用依赖服务
There is no plugin that I know of that does this. you could create a generic service interface called IRecorder
which has the functionality you need and then implement the IRecorder
interface in the platform specific projects using called AndroidRecorder etc using the dependency service
在实现平台特定的代码时,您可以使用这些示例
when implementing your platform specific code you can use these samples
- Android
- iOS
- Windows 10
这篇关于Xamarin.forms中的音频录制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!