LibMPlayerCommon.MPlayer.Play C# (CSharp) Method

Play() public method

Load and start playing a video.
public Play ( string filePath ) : void
filePath string
return void
        public void Play(string filePath)
        {
            this.currentFilePath = filePath;

            if (this.MplayerRunning == false)
            {
                InitializeMplayer();
            }

            LoadFile(filePath);
            this.CurrentStatus = MediaStatus.Playing;
        }

Usage Example

        protected void OnButtonPlayClicked(object sender, System.EventArgs e)
        {
            if (_play != null)
            {
                _play.Stop();
            }

            int handle = (int)this.drawingareaVideo.Handle;

            if (System.IO.File.Exists(VideoPath) == false)
            {
                throw new System.IO.FileNotFoundException("File not found", VideoPath);
            }

            _play = new MPlayer(handle, MplayerBackends.GL, MPlayerPath);
            _play.Play(VideoPath);
        }
All Usage Examples Of LibMPlayerCommon.MPlayer::Play