                 return .success
             })
 
-            commandCenter.nextTrackCommand.addTarget (handler: { [weak self] _ -> MPRemoteCommandHandlerStatus in
+            commandCenter.seekForwardCommand.addTarget (handler: { [weak self] _ -> MPRemoteCommandHandlerStatus in
                 guard let sself = self else { return .commandFailed }
-                sself.next()
+                sself.forward15Seconds()
                 return .success
             })
 
-            commandCenter.previousTrackCommand.addTarget (handler: { [weak self] _ -> MPRemoteCommandHandlerStatus in
+            commandCenter.seekBackwardCommand.addTarget (handler: { [weak self] _ -> MPRemoteCommandHandlerStatus in
                 guard let sself = self else { return .commandFailed }
-                sself.previous()
+                sself.backwards15Seconds()
                 return .success
             })
             getFiles()

import SwiftyTimer

class YSPlayerViewModel: NSObject, YSPlayerViewModelProtocol, AVAudioPlayerDelegate {
    
    let commandCenter = MPRemoteCommandCenter.shared()

    weak var playerDelegate: YSPlayerDelegate?

                                               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()
