1

I'm attempting to allow users of my app (iOS 13) to select purchased videos/movies for playback. From what I have read this can be done with the MPMediaPickerController. The code I have presents the user with the view to select items, but is only showing music.

I'm beginning to think this should be called MPMusicPickerController :)

let mediaItemPicker = MPMediaPickerController(mediaTypes: .anyVideo)

mediaItemPicker.showsCloudItems = true
mediaItemPicker.allowsPickingMultipleItems = false
mediaItemPicker.prompt = "Choose a movie"
self.present(mediaItemPicker, animated: true, completion: nil)
user1542125
  • 593
  • 6
  • 16
  • What if you say `.movie` instead? – matt Apr 04 '20 at 01:59
  • Same, just shows the standard picker where I can choose music files in playlists etc. mediaTypes appears to do nothing to change the media type. – user1542125 Apr 04 '20 at 07:11
  • Yes, I’ve never seen any of those video / movie settings have any effect either. I’ve never figured out what they are for. All the MPMedia stuff means you are imitating iTunes. Well, maybe long ago iTunes played videos. But not any more. So I think this is the wrong API. – matt Apr 04 '20 at 13:06

0 Answers0