LibMPlayerCommon.MPlayer.MovePosition C# (CSharp) 메소드

MovePosition() 공개 메소드

Move to a new position in the video.
public MovePosition ( int timePosition ) : void
timePosition int Seconds. The position to seek move to.
리턴 void
        public void MovePosition(int timePosition)
        {
            MediaPlayer.StandardInput.WriteLine(string.Format("set_property time_pos {0}", timePosition));
            MediaPlayer.StandardInput.Flush();
        }

Usage Example

예제 #1
0
        public void Play(string file)
        {
            if (!_canPlay)
            {
                return;
            }

            Console.WriteLine("=======================");
            Console.WriteLine($"播放{file}");
            _mPlayer.Play(file);
            Console.WriteLine("=======================");
            Console.WriteLine($"音量{_config.Volume}");
            _mPlayer.Volume(_config.Volume);
            Console.WriteLine("=======================");
            Console.WriteLine($"位置{_config.CurrentPosition}");
            _mPlayer.MovePosition(_config.CurrentPosition);
            Console.WriteLine("=======================");
            Console.WriteLine("全屏");
            _mPlayer.FullScreen = true;
        }