本文整理汇总了C#中MediaPlayer.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# MediaPlayer.Stop方法的具体用法?C# MediaPlayer.Stop怎么用?C# MediaPlayer.Stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPlayer
的用法示例。
在下文中一共展示了MediaPlayer.Stop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunTests
public static void RunTests() {
var player = new MediaPlayer();
player.Play();
player.Pause();
player.Stop();
player.AllSongs.TrackNames.PrintCollection();
}
示例2: OnCreate
public override void OnCreate()
{
base.OnCreate();
Rock.Mobile.Util.Debug.WriteLine( "AudioService::OnCreate" );
Binder = new AudioServiceBinder( this );
// prepare our media player
MediaPlayer = new MediaPlayer();
MediaPlayer.SetAudioStreamType( Stream.Music );
MediaPlayer.Stop( );
}
示例3: OnError
public bool OnError( MediaPlayer mp, MediaError error, int extra )
{
ProgressBar.Visibility = ViewStates.Gone;
ResultView.Show( MessagesStrings.Error_Title,
PrivateControlStylingConfig.Result_Symbol_Failed,
MessagesStrings.Error_Watch_Playback,
GeneralStrings.Retry );
ResultView.SetBounds( new System.Drawing.RectangleF( 0, 0, NavbarFragment.GetFullDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels ) );
mp.Stop( );
mp.Reset( );
//Activity.UnbindService( AudioServiceConnection );
PlayerState = MediaPlayerState.Stopped;
SyncUI( );
return true;
}