Queueable

public protocol Queueable

A type that can be added to the streaming queue with the Spotify Audio Playback framework.

Types that conform to this protocol implement a convenience method that calls the shared SPTAudioStreamingController instance’s queue method, adding the item that performed the method to the streaming controller’s playback queue.

  • queue(completion:) Default implementation

    Queues the item for playback.

    Note

    This method uses the shared SPTAudioStreamingController instance to queue the item. If the controller has not been initialized, started on its own thread, or logged into the Spotify service, then this method will do nothing.

    Default Implementation

    Declaration

    Swift

    func queue(completion handler: @escaping SKErrorHandler)

    Parameters

    handler

    The callback handler for the request, providing an error identifying if and why the request failed, or nil if the request was successful.