Skip to content

Commit

Permalink
Fix small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Jul 27, 2019
1 parent 4d82579 commit ea4b9a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MediaManager/Platforms/Uap/MediaManagerImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public override float Speed
{
if (WindowsMediaPlayer?.Player?.PlaybackSession?.PlaybackRate == null)
return 0.0f;
return ((float)WindowsMediaPlayer.Player.PlaybackSession.PlaybackRate);
return (float)WindowsMediaPlayer.Player.PlaybackSession.PlaybackRate;
}
set
{
Expand Down
7 changes: 4 additions & 3 deletions MediaManager/Platforms/Wpf/MediaManagerImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,19 @@ public override INotificationManager NotificationManager
set => SetProperty(ref _notificationManager, value);
}

public override TimeSpan Position => WpfMediaPlayer?.Player?.Position ?? TimeSpan.Zero;
public override TimeSpan Position => Player?.Position ?? TimeSpan.Zero;

public override TimeSpan Duration => WpfMediaPlayer?.Player?.NaturalDuration.TimeSpan ?? TimeSpan.Zero;
public override TimeSpan Duration => Player?.NaturalDuration.TimeSpan ?? TimeSpan.Zero;

public override float Speed
{
get
{
return 0.0f;
return (float)Player.SpeedRatio;
}
set
{
Player.SpeedRatio = value;
}
}

Expand Down

0 comments on commit ea4b9a8

Please sign in to comment.