private void SynchronizePlayerWithEditor()
        {
            if (Player == null)
            {
                return;
            }

            AVPlayerItem playerItem = Editor.PlayerItem;

            if (PlayerItem != playerItem)
            {
                if (PlayerItem != null)
                {
                    PlayerItem.RemoveObserver(this, new NSString("status"));
                    playToEndObserver.Dispose();
                    playToEndObserver = null;
                }

                PlayerItem = playerItem;

                if (PlayerItem != null)
                {
                    PlayerItem.SeekingWaitsForVideoCompositionRendering = true;
                    PlayerItem.AddObserver(this, new NSString("status"), NSKeyValueObservingOptions.New | NSKeyValueObservingOptions.Initial,
                                           AVCustomEditPlayerViewControllerStatusObservationContext.Handle);

                    playToEndObserver = AVPlayerItem.Notifications.ObserveDidPlayToEndTime(PlayToEndNotificationHandler);
                }

                Player.ReplaceCurrentItemWithPlayerItem(playerItem);
            }
        }