                     player?.removeTimeObserver(timeObserver)
                 }
                 
+                player?.currentItem?.asset.cancelLoading()
                 player?.replaceCurrentItem(with: nil)
                 player = nil
                 observer = nil

                }
                
                if let item = player?.currentItem {
                    for characteristic in item.asset.availableMediaCharacteristicsWithMediaSelectionOptions {
                        guard let group = item.asset.mediaSelectionGroup(
                            forMediaCharacteristic: characteristic)
                            else { return }
                        let selectedOption = item.selectedMediaOption(in: group)
                        switch characteristic {
                        case AVMediaCharacteristicAudible:
                            dispatch?(.audibleSelectionGroup(.init(
                                selectedOption: selectedOption,
                                group: group)))
                        case AVMediaCharacteristicLegible:
                            dispatch?(.legibleSelectionGroup(.init(
                                selectedOption: selectedOption,
                                group: group)))
                        default: break
                        }
                    }
                }

    fileprivate var player: AVPlayer? {
        get { return playerLayer?.player }
        set { playerLayer?.player = newValue }
    }
    
    deinit {
        player?.currentItem?.asset.cancelLoading()
    }
    
    private var naturalSize: CGSize? {
