       }
     }
   }
-
-//  @objc open func tapped(_ gesture: UITapGestureRecognizer) {
-//    if let location = gesture.view as? UICollectionViewCell {
-//      navigate(from: location)
-//    }
-//  }
 
   override open func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
     if let location = collectionView.cellForItem(at: indexPath) {

                    items.append(AudioItem(name: item.name!, id: item.id!))
                  }
                }
                else if let mediaItems = data as? [[String: String]] {
                  for mediaItem in mediaItems {
                    let item = mediaItem

                    let name = item["name"] ?? ""
                    let id = item["id"] ?? ""

                    items.append(AudioItem(name: name, id: id))
                  }
                }
              }

              return items


  func navigate(from view: UICollectionViewCell, playImmediately: Bool=false) {
    if let indexPath = collectionView?.indexPath(for: view),
       let mediaItem = items.getItem(for: indexPath) as? MediaItem {
      if let type = mediaItem.type {
        if type.isEmpty {
          mediaItem.resolveType()
