Skip to content

Commit

Permalink
Fix Media Element Position Bug for Android and IOS (#1555)
Browse files Browse the repository at this point in the history
Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Brandon Minnick <[email protected]>
  • Loading branch information
3 people authored Dec 7, 2023
1 parent 45ca10c commit 02896d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ void OnSourcePropertyChanged(MediaSource? newValue)
}

InvalidateMeasure();
InitializeTimer();
}

void OnSourcePropertyChanging(MediaSource? oldValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ or PlaybackStateCompat.StateSkippingToQueueItem
if (playbackState is IPlayer.StateReady)
{
MediaElement.Duration = TimeSpan.FromMilliseconds(Player.Duration < 0 ? 0 : Player.Duration);
MediaElement.Position = TimeSpan.FromMilliseconds(Player.CurrentPosition < 0 ? 0: Player.CurrentPosition);
}
}

Expand Down

0 comments on commit 02896d3

Please sign in to comment.