Skip to content

Commit 95b20b0

Browse files
committed
Make sure stepsize can be set after init on android
1 parent 01f0b0d commit 95b20b0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

MediaManager/MediaManagerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public MediaManagerBase()
2727
public Timer Timer { get; } = new Timer(1000);
2828

2929
private TimeSpan _stepSize = TimeSpan.FromSeconds(10);
30-
public TimeSpan StepSize
30+
public virtual TimeSpan StepSize
3131
{
3232
get => _stepSize;
3333
set => SetProperty(ref _stepSize, value);

MediaManager/Platforms/Android/MediaManagerImplementation.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ public virtual MediaBrowserManager MediaBrowserManager
9696
set => SetProperty(ref _mediaBrowserManager, value);
9797
}
9898

99+
public override TimeSpan StepSize
100+
{
101+
get => base.StepSize;
102+
set
103+
{
104+
base.StepSize = value;
105+
var playerNotificationManager = (NotificationManager as MediaManager.Platforms.Android.Notifications.NotificationManager)?.PlayerNotificationManager;
106+
playerNotificationManager?.SetFastForwardIncrementMs((long)value.TotalMilliseconds);
107+
playerNotificationManager?.SetRewindIncrementMs((long)value.TotalMilliseconds);
108+
}
109+
}
110+
99111
private IMediaPlayer _mediaPlayer;
100112
public override IMediaPlayer MediaPlayer
101113
{

0 commit comments

Comments
 (0)