<commit_before>﻿using AVKit;

namespace MediaManager.Platforms.Ios.Video
{
    public class PlayerViewController : AVPlayerViewController
    {
        public override void ViewWillDisappear(bool animated)
        {
            base.ViewWillDisappear(animated);

            Player = null;
        }
    }
}
<commit_msg>Detach VideoView on disappearing (iOS)<commit_after>﻿using AVKit;

namespace MediaManager.Platforms.Ios.Video
{
    public class PlayerViewController : AVPlayerViewController
    {
        protected MediaManagerImplementation MediaManager => CrossMediaManager.Apple;

        public override void ViewWillDisappear(bool animated)
        {
            base.ViewWillDisappear(animated);

            if (MediaManager.MediaPlayer.VideoView == View.Superview)
                MediaManager.MediaPlayer.VideoView = null;

            Player = null;
        }
    }
}

{'fraction_non_alphanumeric': 0.07142857142857142, 'fraction_numerical': 0.0, 'mean_word_length': 2.663900414937759, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4666424', 'n_tokens_mistral': 240, 'n_tokens_neox': 226, 'n_words': 45}