コード例 #1
0
        public async Task Stop()
        {
            if (CurrentItem == null)
            {
                return;
            }

            if (Player.Rate != 0.0)
            {
                Player.Pause();
            }

            CurrentItem.Seek(CMTime.FromSeconds(0d, 1));

            Status = MediaPlayerStatus.Stopped;
            await Task.FromResult(true);
        }
コード例 #2
0
        public async Task Stop()
        {
            await Task.Run(() =>
            {
                if (CurrentItem == null)
                {
                    return;
                }

                if (this.PeriodicTimeObserverObject != null)
                {
                    if (Player.Rate != 1.0)
                    {
                        Player.Pause();
                    }
                }

                CurrentItem.Seek(CMTime.FromSeconds(0d, 1));

                Status = MediaPlayerStatus.Stopped;
            });
        }
コード例 #3
0
 public async Task Seek(TimeSpan position)
 {
     await Task.Run(() => { CurrentItem?.Seek(CMTime.FromSeconds(position.TotalSeconds, 1)); });
 }