示例#1
0
 public void SetMediaController(MediaController controller)
 {
     if (MediaController != null)
     {
         MediaController.Hide();
     }
     MediaController = controller;
     AttachMediaController();
 }
示例#2
0
 private void InitMediaPlayer()
 {
     try
     {
         //配置播放器
         MediaController mMediaController = new MediaController(this);
         mMediaController.SetTitle(title);
         mPlayerView.SetVideoLayout(mPlayerView.Id);
         mPlayerView.SetMediaController(mMediaController);
         mPlayerView.SetMediaBufferingIndicator(mBufferingIndicator);
         mPlayerView.RequestFocus();
         mPlayerView.SetOnInfoListener(this);
         mPlayerView.SetOnSeekCompleteListener(this);
         mPlayerView.SetOnCompletionListener(this);
         mPlayerView.SetOnControllerEventsListener(this);
         //设置返回键监听
         mMediaController.SetVideoBackEvent(this);
         LoadData();
     }
     catch (Java.Lang.Exception e)
     {
         Log.Error(TAG, "InitMediaPlayer--" + e.ToString());
     }
 }