Skip to content

Commit

Permalink
Make sure stepsize can be set after init on android
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Jul 2, 2019
1 parent 01f0b0d commit 95b20b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MediaManager/MediaManagerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public MediaManagerBase()
public Timer Timer { get; } = new Timer(1000);

private TimeSpan _stepSize = TimeSpan.FromSeconds(10);
public TimeSpan StepSize
public virtual TimeSpan StepSize
{
get => _stepSize;
set => SetProperty(ref _stepSize, value);
Expand Down
12 changes: 12 additions & 0 deletions MediaManager/Platforms/Android/MediaManagerImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ public virtual MediaBrowserManager MediaBrowserManager
set => SetProperty(ref _mediaBrowserManager, value);
}

public override TimeSpan StepSize
{
get => base.StepSize;
set
{
base.StepSize = value;
var playerNotificationManager = (NotificationManager as MediaManager.Platforms.Android.Notifications.NotificationManager)?.PlayerNotificationManager;
playerNotificationManager?.SetFastForwardIncrementMs((long)value.TotalMilliseconds);
playerNotificationManager?.SetRewindIncrementMs((long)value.TotalMilliseconds);
}
}

private IMediaPlayer _mediaPlayer;
public override IMediaPlayer MediaPlayer
{
Expand Down

0 comments on commit 95b20b0

Please sign in to comment.