 import Foundation
+import AVFoundation
 
 internal protocol EventHandling {
   

    NotificationCenter.default().addObserver(forName: .NSFileHandleDataAvailable, object: nil, queue: OperationQueue.main()) { [weak self] _ in
      self?.readFromStandardInputAndWait()  
    }
    runLoop.run()
  }

  @objc private func readFromStandardInputAndWait() {
    defer {

    case playPrevious
    case toggleShuffle
    case jumpToItem(index: Int)
    case itemFinishedPlaying(item: AVPlayerItem)

    private static let inputMap: [String : Event] = [
      "s"        : .start,
