private void Current_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { LblStartTime.Text = e.Position.ToString(@"mm\:ss"); LblEndTime.Text = e.Duration.ToString(@"mm\:ss"); PbAudioPlayer.Progress = e.Progress / 100; }
void Current_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { var _duration = e.Duration; var _position = e.Position; lblDuration.Text = _duration.Hours + ":" + _duration.Minutes + ":" + _duration.Seconds; lblPosition.Text = _position.Hours + ":" + _position.Minutes + ":" + _position.Seconds; sliderPosition.Value = e.Progress; if (lblDuration.Text == lblPosition.Text) { btnPlay.IsVisible = true; btnPause.IsVisible = false; } }
private void Current_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { int min = CrossMediaManager.Current.Duration.Minutes; int sec = CrossMediaManager.Current.Duration.Seconds; // lblEnd.Text = min + ":" + sec; var timespan = TimeSpan.FromSeconds(Position); lblStart.Text = timespan.ToString(@"mm\:ss"); // MySlider.Maximum = e.Duration.TotalSeconds; MySlider.Value = e.Position.TotalSeconds; Position = (int)Math.Round(e.Position.TotalSeconds); }
private void Current_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { var moveTime = DateTime.Now - LastMoved; if (IsCurrentPlaying()) { Device.BeginInvokeOnMainThread(() => { var progress = e.Progress; if (Device.RuntimePlatform == Device.iOS) { progress = progress * 100; } if (moveTime.TotalSeconds > 2) { sTime.Value = progress; } Duration = e.Duration; lDuration.Text = Duration.ToString(@"mm\:ss"); lCurrent.Text = e.Position.ToString(@"mm\:ss"); }); } }
private void AudioPlayer_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { Console.WriteLine(e.Position); }
private void Current_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { seekBar.Progress = Convert.ToInt32(e.Position.TotalSeconds); actualTime.Text = $"{e.Position.Minutes:00}:{e.Position.Seconds:00}"; }
void AudioPlayer_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { Progress = Device.RuntimePlatform == Device.iOS ? e.Progress : e.Progress / 100; TimerText = e.Duration.Subtract(e.Position).ToString("hh':'mm':'ss"); }
private void Current_PlayingChanged(object sender, Plugin.MediaManager.Abstractions.EventArguments.PlayingChangedEventArgs e) { PbAudio.Progress = e.Progress / 100; }