Skip to content

Commit

Permalink
[housekeeping] Automated PR to fix formatting errors (#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 18, 2024
1 parent c6edd2d commit bed1093
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 bed1093

Please sign in to comment.