         audioPlayer.volume = audioSession.outputVolume
         player = audioPlayer
     }
-    
+
     func getFiles() {
         model?.allFiles { (files, currentPlaying, error) in
                 var playerFiles = [YSDriveFileProtocol]()

                                               selector: #selector(applicationWillResignActive(_:)),
                                               name: NSNotification.Name.UIApplicationWillResignActive,
                                               object: nil)
        
        NotificationCenter.default.addObserver(self,
                                               selector: #selector(handleMediaServicesReset),
                                               name: NSNotification.Name.AVAudioSessionMediaServicesWereReset,
                                               object: nil)
        
        NotificationCenter.default.addObserver(self,
                                               selector: #selector(handleMediaServicesLost),
                                               name: NSNotification.Name.AVAudioSessionMediaServicesWereLost,
                                               object: nil)
        
        NotificationCenter.default.addObserver(self,
                                               selector: #selector(handleRouteChange),
                                               name: .AVAudioSessionRouteChange,
                                               object: AVAudioSession.sharedInstance())
        
        
    }
    
    @objc func applicationWillResignActive(_ notification: NSNotification) {
        deactivateAudioSession()
    }
    
    deinit {
        player?.pause()
        elapsedTimeTimer?.invalidate()

                    self.coordinatorDelegate?.hidePlayer()
                }
                self.updateCurrentPlaying()

            if self.files.count > 0 || self.currentFile != nil {
                    self.coordinatorDelegate?.showPlayer()
                }
                self.viewDelegate?.playerDidChange(viewModel: self)
