init(id:name:type:capabilities:)
Creates a media device with the specified identifier, name, type, and capabilities.
Declaration
init(id: String, name: String, type: MediaDevice.DeviceType, capabilities: [MediaDevice.Capability])Parameters
- id:
A stable, unique identifier for the device.
- name:
The human-readable name the system displays for the device.
- type:
The kind of device that plays media.
- capabilities:
The capabilities the device supports. Each value in the array describes one operation the device supports, built from a Capability, such as Absolutevolume(_:onchange:) or Relativevolume(onincrement:ondecrement:). Pass an empty array if the device exposes no controllable capabilities.