如何用库Plugin.MediaManager(Xamarin.Forms)播放声音

时间:2018-05-21 20:13:43

标签: xamarin xamarin.forms xamarin.ios

XAML

<Button Text="Play" Clicked="Button_Clicked"></Button>

C#

private async void Button_Clicked(object sender, EventArgs e)
{
    await CrossMediaManager.Current.Play("https://www.sample-videos.com/audio/mp3/crowd-cheering.mp3");
}

按下按钮(Xamarin LivePlayer,iOS)

时没有任何反应

lib:https://github.com/martijn00/XamarinMediaManager

0 个答案:

没有答案