add(_:completionHandler:)
Adds an array of media items to the end of the playlist.
Declaration
func add(_ mediaItems: [MPMediaItem], completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)func add(_ mediaItems: [MPMediaItem]) async throwsParameters
- mediaItems:
The array of media items to add to the end of the playlist.
- completionHandler:
A block that the system calls after it adds the media items to the playlist.
- error
If an error occurred, this parameter holds the error object that explains the error. Otherwise, the value of this parameter is Nil 227m0.