Example #1
0
 private void OnPlayingChanged(object sender, PlayingChangedEventArgs e)
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         ProgressProgressBar.Progress = e.Progress;
     });
 }
 private void OnPlayingChanged(object sender, PlayingChangedEventArgs e)
 {
     if (sender == CurrentPlaybackManager)
     {
         PlayingChanged?.Invoke(sender, e);
     }
 }
Example #3
0
 private void QueueControllerOnIsPlayingChangedEvent(object sender, PlayingChangedEventArgs e)
 {
     if (_queueController.CurrentSong is SpotifySong)
     {
         IsPlaying = e.IsPlaying;
     }
 }
Example #4
0
 private async void OnPlayingChanged(object sender, PlayingChangedEventArgs e)
 {
     await
     CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                             () =>
     {
         Progress.Value = e.Progress;
     });
 }
Example #5
0
        void VideoViewProgressChanged(object sender, PlayingChangedEventArgs e)
        {
            //Need to cached video progress to prevent infinite loop when user drags Slider
            videoProgress = Math.Round(e.Progress, 2);

            Device.BeginInvokeOnMainThread(() => progressBar.Value = videoProgress);

            if (e.Progress == 0)
            {
                DisplayFadedContainer();
            }
        }
Example #6
0
        private void OnPlayingChanged(object sender, PlayingChangedEventArgs e)
        {
            if (sender == CurrentPlaybackManager)
            {
                if (!_startedPlaying && Duration != TimeSpan.Zero)
                {
                    MediaNotificationManager?.UpdateNotifications(MediaQueue.Current, Status);
                    _startedPlaying = true;
                }

                PlayingChanged?.Invoke(sender, e);
            }
        }
Example #7
0
        private void QueueControllerOnIsPlayingChangedEvent(object sender, PlayingChangedEventArgs e)
        {
            var song = _queueController.CurrentSong as YoutubeSong;

            if (song != null)
            {
                Playing = e.IsPlaying;
            }
            else
            {
                Playing = false;
            }
        }
Example #8
0
        private void OnPlayingChanged(object sender, PlayingChangedEventArgs e)
        {
            //Int32 segundosTotales = (Int32)e.Position.TotalSeconds;
            Int32 segundosTotales = (Int32)e.Position.TotalSeconds / 1000 % 60;
            Int32 minutosTotales  = (Int32)e.Position.TotalMinutes / 1000 % 60;
            Int32 horasTotales    = (Int32)e.Position.TotalHours / 1000;

            string segundosTotalesCadena = "";
            string minutosTotalesCadena  = "";
            string horasTotalesCadena    = "";

            if (segundosTotales.ToString().Length > 1)
            {
                segundosTotalesCadena = segundosTotales.ToString();
            }
            else
            {
                segundosTotalesCadena = "0" + segundosTotales.ToString();
            }

            if (minutosTotales.ToString().Length > 1)
            {
                minutosTotalesCadena = minutosTotales.ToString();
            }
            else
            {
                minutosTotalesCadena = "0" + minutosTotales.ToString();
            }

            if (horasTotales.ToString().Length > 1)
            {
                horasTotalesCadena = horasTotales.ToString();
            }
            else
            {
                horasTotalesCadena = "0" + horasTotales.ToString();
            }

            horasTotalesCadena = horasTotalesCadena + ":" + minutosTotalesCadena + ":" + segundosTotalesCadena;

            Device.BeginInvokeOnMainThread(() =>
            {
                Posicio.Text = "" + horasTotalesCadena;
                //Posicio.Text = string.Format("{0}:{1:00}:{2:00}", (int)e.Position.TotalHours, e.Position.Minutes, e.Position.Seconds);
                //Posicio.Text = "" + (int)e.Position.TotalHours + "/" + (int)e.Position.TotalMinutes + "/" + (int)e.Position.TotalSeconds + "\n"
                //               + (int)e.Position.Hours + "/" + (int)e.Position.Minutes + "/" + (int)e.Position.Seconds + "\n"
                //               + horasTotales + "/" + minutosTotales + "/" + segundosTotales + "\n"
                //               + (int)e.Position.Ticks;
            });
        }
Example #9
0
        private async void MediaManagerOnPlayingChanged(object sender, PlayingChangedEventArgs playingChangedEventArgs)
        {
            LabelTime.Text = $"Time: {playingChangedEventArgs.Position.TotalSeconds} Time: {playingChangedEventArgs.Position}";

            if (!_queue.Any())
            {
                return;
            }

            if (playingChangedEventArgs.Position.TotalSeconds >= _queue.Peek().StopLow&& playingChangedEventArgs.Position.TotalSeconds <= _queue.Peek().StopHigh)
            {
                _queue.Dequeue();
                await _playbackController.PlayPause();
            }
            else if (playingChangedEventArgs.Position.TotalSeconds >= _queue.Peek().StopHigh)
            {
                await _playbackController.SeekTo(_queue.Peek().StopLow / 1000);

                _queue.Dequeue();

                await _playbackController.PlayPause();
            }
        }
 protected virtual void OnPlayingChanged(PlayingChangedEventArgs e)
 {
     PlayingChanged?.Invoke(this, e);
 }
 private void MediaManager_PlayingChanged(object sender, PlayingChangedEventArgs e)
 {
     RaiseAllPropertiesChanged();
 }
 private void Current_PlayingChanged(object sender, PlayingChangedEventArgs e)
 {
     Log.Debug($"Total played is {e.Position} of {e.Duration};");
 }
Example #13
0
 private void _queueController_IsPlayingChangedEvent(object sender, PlayingChangedEventArgs e)
 {
     IsPlaying = e.IsPlaying;
 }