Example #1
0
        private async void tmPosition_Tick(object sender, EventArgs e)
        {
            var position = await _player.Position_GetAsync();

            var duration = await _player.DurationAsync();

            tbTimeline.Maximum = (int)duration.TotalSeconds;

            lbTimeline.Text = position.ToString("hh\\:mm\\:ss") + " | " + duration.ToString("hh\\:mm\\:ss");

            if (tbTimeline.Maximum >= position.TotalSeconds)
            {
                tbTimeline.Value = (int)position.TotalSeconds;
            }
        }