Created
April 26, 2019 13:12
-
-
Save juucustodio/f04a527286f305cef0ec58fe0a63ec53 to your computer and use it in GitHub Desktop.
Example of how to implement audio recorder in your Xamarin.Forms applications. - http://julianocustodio.com/gravar-audio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using Plugin.AudioRecorder; | |
using Xamarin.Forms; | |
namespace AudioDemo | |
{ | |
[DesignTimeVisible(true)] | |
public partial class MainPage : ContentPage | |
{ | |
AudioRecorderService gravador; | |
AudioPlayer reprodutor; | |
public MainPage() | |
{ | |
InitializeComponent(); | |
gravador = new AudioRecorderService | |
{ | |
StopRecordingAfterTimeout = true, | |
TotalAudioTimeout = TimeSpan.FromSeconds(15), | |
AudioSilenceTimeout = TimeSpan.FromSeconds(2) | |
}; | |
reprodutor = new AudioPlayer(); | |
reprodutor.FinishedPlaying += Finaliza_Reproducao; | |
} | |
public async void Gravar_Clicked(object sender, EventArgs e) | |
{ | |
} | |
public async void Reproduzir_Clicked(object sender, EventArgs e) | |
{ | |
} | |
public void Finaliza_Reproducao(object sender, EventArgs e) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment