SKDevice
public struct SKDevice : JSONDecodable
A structure representing a device that supports a Spotify player.
-
The possible devices that can support a Spotify player.
See moreDeclaration
Swift
public enum DeviceType : String, Codable
-
The device ID, or
nil
if unavailable.Declaration
Swift
public let id: String?
-
A Boolean value indicating if this device is the currently active device.
Declaration
Swift
public let isActive: Bool
-
A Boolean value indicating whether controlling this device via the Spotify Web API is restricted. If
true
, then no Web API commands will be accepted by this device.Declaration
Swift
public let isRestricted: Bool
-
The name of the device.
Declaration
Swift
public let name: String
-
The device type. For possible values, see
DeviceType
.Declaration
Swift
public let type: DeviceType
-
The device’s current volume, ranging from
0.0
to1.0
on a linear scale, ornil
if unavailable.Declaration
Swift
public var volume: Float? { get }