Skip to content

Commit

Permalink
Revert "[housekeeping] Automated PR to fix formatting errors (Communi…
Browse files Browse the repository at this point in the history
…tyToolkit#2214)"

This reverts commit bed1093.
  • Loading branch information
ne0rrmatrix committed Sep 18, 2024
1 parent d2b055a commit 5bcb930
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ protected virtual void Dispose(bool disposing)
}

static TimeSpan ConvertTime(CMTime cmTime) => TimeSpan.FromSeconds(double.IsNaN(cmTime.Seconds) ? 0 : cmTime.Seconds);

static (int Width, int Height) GetVideoDimensions(AVPlayerItem avPlayerItem)
{
// Create an AVAsset instance with the video file URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public MediaManager(IMauiContext context, IMediaElement mediaElement, IDispatche
/// </summary>
protected PlatformMediaElement? Player { get; set; }
#endif

/// <summary>
/// A helper method to determine if two floating-point numbers are equal.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected virtual partial void PlatformUpdateSpeed()
Player.MediaPlayer.PlaybackRate = MediaElement.Speed;

// Only trigger once when going to the paused state
if (AreFloatingPointNumbersEqual(MediaElement.Speed, 0) && previousSpeed > 0)
if(AreFloatingPointNumbersEqual(MediaElement.Speed, 0) && previousSpeed > 0)
{
Player.MediaPlayer.Pause();
}
Expand Down Expand Up @@ -458,7 +458,7 @@ void OnNaturalVideoSizeChanged(MediaPlaybackSession sender, object args)

void OnPlaybackSessionPlaybackRateChanged(MediaPlaybackSession sender, object args)
{
if (AreFloatingPointNumbersEqual(MediaElement.Speed, sender.PlaybackRate))
if(AreFloatingPointNumbersEqual(MediaElement.Speed, sender.PlaybackRate))
{
if (Dispatcher.IsDispatchRequired)
{
Expand All @@ -485,7 +485,7 @@ void OnPlaybackSessionPlaybackStateChanged(MediaPlaybackSession sender, object a
};

MediaElement?.CurrentStateChanged(newState);
if (sender.PlaybackState == MediaPlaybackState.Playing && AreFloatingPointNumbersEqual(sender.PlaybackRate, 0))
if(sender.PlaybackState == MediaPlaybackState.Playing && AreFloatingPointNumbersEqual(sender.PlaybackRate, 0))
{
Dispatcher.Dispatch(() =>
{
Expand Down

0 comments on commit 5bcb930

Please sign in to comment.