DropletMediaQueueItem

One row in a droplet-supplied Playing Next queue.

struct DropletMediaQueueItem

Initializers

init(id:title:artist:album:duration:artworkURL:artworkData:isCurrent:isUpcoming:)

init(id: String, title: String, artist: String, album: String? = nil, duration: TimeInterval? = nil, artworkURL: URL? = nil, artworkData: Data? = nil, isCurrent: Bool = false, isUpcoming: Bool = true)

Creates a queue row.

Properties

album

let album: String?

Optional album name.

artist

let artist: String

Track artist or subtitle.

artworkData

let artworkData: Data?

Optional inline encoded image bytes (PNG/JPEG/WebP, capped at 2 MB by the host and downsampled off the main thread).

artworkURL

let artworkURL: URL?

Optional remote (https), local (file), or loopback (http on 127.0.0.1, localhost, ::1) artwork URL.

duration

let duration: TimeInterval?

Optional track duration in seconds.

id

let id: String

Stable identifier passed back to playQueueItem(id:) and promoteQueueItemToNext(id:).

isCurrent

let isCurrent: Bool

True when this row represents the currently playing track.

isUpcoming

let isUpcoming: Bool

True when this row is queued after the currently playing track.

title

let title: String

Track title.