From 9060a0a029de1b3dc7df25aea7e2f844079f5685 Mon Sep 17 00:00:00 2001 From: Jammer Date: Mon, 12 Jul 2021 17:21:37 +0100 Subject: [PATCH 1/2] Fix for #814 NSInternalInconsistencyException --- MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs b/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs index c7e56366..c8c9856c 100644 --- a/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs +++ b/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs @@ -227,7 +227,9 @@ protected virtual async void OnPlayerBoundaryReached() public virtual async Task Play(AVPlayerItem playerItem) { Player.ActionAtItemEnd = AVPlayerActionAtItemEnd.None; - Player.ReplaceCurrentItemWithPlayerItem(playerItem); + //Player.ReplaceCurrentItemWithPlayerItem(playerItem); + Player.RemoveAllItems(); + Player.InsertItem(playerItem, null); await Play(); } From a9010f8d93c1a935729d33b425705cca173bcacf Mon Sep 17 00:00:00 2001 From: Jammer Date: Tue, 13 Jul 2021 12:08:31 +0100 Subject: [PATCH 2/2] Removed commented code --- MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs b/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs index c8c9856c..4adfba55 100644 --- a/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs +++ b/MediaManager/Platforms/Apple/Player/AppleMediaPlayer.cs @@ -227,7 +227,6 @@ protected virtual async void OnPlayerBoundaryReached() public virtual async Task Play(AVPlayerItem playerItem) { Player.ActionAtItemEnd = AVPlayerActionAtItemEnd.None; - //Player.ReplaceCurrentItemWithPlayerItem(playerItem); Player.RemoveAllItems(); Player.InsertItem(playerItem, null); await Play();