Documentation Archive Developer
Search

MediaPlayer Changes for Swift

MediaPlayer

Modified MPMediaItem
Declaration
From
class MPMediaItem : MPMediaEntity {
    var persistentID: MPMediaEntityPersistentID { get }
    var mediaType: MPMediaType { get }
    var title: String? { get }
    var albumTitle: String? { get }
    var albumPersistentID: MPMediaEntityPersistentID { get }
    var artist: String? { get }
    var artistPersistentID: MPMediaEntityPersistentID { get }
    var albumArtist: String? { get }
    var albumArtistPersistentID: MPMediaEntityPersistentID { get }
    var genre: String? { get }
    var genrePersistentID: MPMediaEntityPersistentID { get }
    var composer: String? { get }
    var composerPersistentID: MPMediaEntityPersistentID { get }
    var playbackDuration: NSTimeInterval { get }
    var albumTrackNumber: Int { get }
    var albumTrackCount: Int { get }
    var discNumber: Int { get }
    var discCount: Int { get }
    var artwork: MPMediaItemArtwork? { get }
    var lyrics: String? { get }
    var compilation: Bool { get }
    var releaseDate: NSDate? { get }
    var beatsPerMinute: Int { get }
    var comments: String? { get }
    var assetURL: NSURL? { get }
    var cloudItem: Bool { get }
    var podcastTitle: String? { get }
    var podcastPersistentID: MPMediaEntityPersistentID { get }
    var playCount: Int { get }
    var skipCount: Int { get }
    var rating: Int { get }
    var lastPlayedDate: NSDate? { get }
    var userGrouping: String? { get }
    var bookmarkTime: NSTimeInterval { get }
}
extension MPMediaItem {
    class func persistentIDPropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String
    class func titlePropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String
}
To
class MPMediaItem : MPMediaEntity {
    var persistentID: MPMediaEntityPersistentID { get }
    var mediaType: MPMediaType { get }
    var title: String? { get }
    var albumTitle: String? { get }
    var albumPersistentID: MPMediaEntityPersistentID { get }
    var artist: String? { get }
    var artistPersistentID: MPMediaEntityPersistentID { get }
    var albumArtist: String? { get }
    var albumArtistPersistentID: MPMediaEntityPersistentID { get }
    var genre: String? { get }
    var genrePersistentID: MPMediaEntityPersistentID { get }
    var composer: String? { get }
    var composerPersistentID: MPMediaEntityPersistentID { get }
    var playbackDuration: NSTimeInterval { get }
    var albumTrackNumber: Int { get }
    var albumTrackCount: Int { get }
    var discNumber: Int { get }
    var discCount: Int { get }
    var artwork: MPMediaItemArtwork? { get }
    var lyrics: String? { get }
    var compilation: Bool { get }
    var releaseDate: NSDate? { get }
    var beatsPerMinute: Int { get }
    var comments: String? { get }
    var assetURL: NSURL? { get }
    var cloudItem: Bool { get }
    var protectedAsset: Bool { get }
    var podcastTitle: String? { get }
    var podcastPersistentID: MPMediaEntityPersistentID { get }
    var playCount: Int { get }
    var skipCount: Int { get }
    var rating: Int { get }
    var lastPlayedDate: NSDate? { get }
    var userGrouping: String? { get }
    var bookmarkTime: NSTimeInterval { get }
}
extension MPMediaItem {
    class func persistentIDPropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String
    class func titlePropertyForGroupingType(_ groupingType: MPMediaGrouping) -> String
}

Declaration
From
class MPMediaPickerController : UIViewController {
    init(mediaTypes mediaTypes: MPMediaType)
    var mediaTypes: MPMediaType { get }
    weak var delegate: MPMediaPickerControllerDelegate?
    var allowsPickingMultipleItems: Bool
    var showsCloudItems: Bool
    var prompt: String?
}
To
class MPMediaPickerController : UIViewController {
    init(mediaTypes mediaTypes: MPMediaType)
    var mediaTypes: MPMediaType { get }
    weak var delegate: MPMediaPickerControllerDelegate?
    var allowsPickingMultipleItems: Bool
    var showsCloudItems: Bool
    var showsItemsWithProtectedAssets: Bool
    var prompt: String?
}