playbackCoordinator(_:didIssue:completionHandler:)
Tells the delegate to seek to a new time.
Declaration
func playbackCoordinator(_ coordinator: AVDelegatingPlaybackCoordinator, didIssue seekCommand: AVDelegatingPlaybackCoordinatorSeekCommand, completionHandler: @escaping @Sendable () -> Void)func playbackCoordinator(_ coordinator: AVDelegatingPlaybackCoordinator, didIssue seekCommand: AVDelegatingPlaybackCoordinatorSeekCommand) asyncParameters
- coordinator:
The playback coordinator that issues the command.
- seekCommand:
The command to execute. Before performing it, verify that its Expectedcurrentitemidentifier property value matches the item that you’re currently playing. If the command isn’t valid for the current item, ignore it and call the completion handler.
- completionHandler:
A completion handler that your app must call when it finishes handling the command, either successfully or after beginning a suspension if it can’t handle the command currently.
If the value of the command’s Shouldbufferinanticipationofplayback property is True, call the completion handler only after the player is ready for playback.
Discussion
The coordinator issues this command to perform a seek in the item timeline, potentially pausing playback in the process.