//
//  AppleMusicPlayer.swift
//  LeCountdown
//
//  Created by Laurent Morvillier on 13/02/2023.
//

import Foundation
import MediaPlayer

@objc class AppleMusicPlayer : NSObject, MPMediaPickerControllerDelegate {
    
//    func play() {
//        
//        let musicPlayer = MPMusicPlayerApplicationController.applicationQueuePlayer
//        musicPlayer.setQueue(with: .songs())
//        
//    }
//    
//    func showMediaPicker(source: UIView) {
//        let controller = MPMediaPickerController(mediaTypes: .music)
//        controller.allowsPickingMultipleItems = true
//        controller.popoverPresentationController?.sourceView = source
//        controller.delegate = self
////        present(controller, animated: true)
//    }
//    
//    func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems mediaItemCollection: MPMediaItemCollection) {
//        
//        
////        let p = MPMediaItemCollection(items: [MPMediaItem])
//        
//        let i = MPMediaItem()
//        i.
//        
//    }
    
}
