diff --git a/MediaManager/Platforms/Ios/Video/PlayerViewController.cs b/MediaManager/Platforms/Ios/Video/PlayerViewController.cs new file mode 100644 index 00000000..c372552b --- /dev/null +++ b/MediaManager/Platforms/Ios/Video/PlayerViewController.cs @@ -0,0 +1,14 @@ +using AVKit; + +namespace MediaManager.Platforms.Ios.Video +{ + public class PlayerViewController : AVPlayerViewController + { + public override void ViewWillDisappear(bool animated) + { + base.ViewWillDisappear(animated); + + Player = null; + } + } +} diff --git a/MediaManager/Platforms/Ios/Video/VideoView.cs b/MediaManager/Platforms/Ios/Video/VideoView.cs index 76207d8f..586883ef 100644 --- a/MediaManager/Platforms/Ios/Video/VideoView.cs +++ b/MediaManager/Platforms/Ios/Video/VideoView.cs @@ -21,7 +21,7 @@ public AVPlayerViewController PlayerViewController { if(_playerViewController == null) { - PlayerViewController = new AVPlayerViewController(); + PlayerViewController = new PlayerViewController(); } return _playerViewController; }