-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
As a Google Cast owner of several devices I need to be able to individually control volume/muted for paired devices.
Acceptance criteria
- An API for listing multizone devices is available.
- An API for controlling volume/muted for multizone devices is available.
- Changes are not possible for devices which do not support them.
- APIs for easy SwiftUI binding to controls are available.
- The standard Castor device management UI displays paired devices as well as individual volume/muted controls.
Design hints
The Google Cast SDK API introduces separate GCKMultizoneDevice
objects, whose volume/muted values are controlled via GCKCastSession
. Multizone devices are not nested within GCKDevice
objects, they are rather retrieved using a GCKCastDeviceStatusListener
attached to the session once connected to a device, and lost afterwards. Note that GCKDevice
and GCKMultizoneDevice
are different objets, not sharing a common ancestor. They have a few similar APIs but the comparison stops here.
For this reason the following API seems reasonable:
CastDeviceManager
, resp.CastMultizoneDeviceManager
, are introduced to provide volume/muted control APIs (volume and range, muted flag). These areObservableObject
s which can be bound to UI elements.- Two recipes
MultizoneVolumeRecipe
andMultizoneMutedRecipe
are added to perform sync of volume/muted for a multizone device.CastDeviceManager
is rewritten to use existing similar recipes (currently inCast
) andCastMultizoneDeviceManager
is implemented similarly. - A
CastMultizoneDevice
type is added, wrapping aGCKMultizoneDevice
. This type is similar toCastDevice
with only limited API relevant to multizone devices. - A
MultizoneDevicesRecipe
is created to sync the multizone devices. AmultizoneDevices
property is added to sync the array of multizone devices. - Volume and muted APIs are removed from
Cast
. Instead two methodsdeviceManager(for:)
with similar signatures are added to retrieve a manager for a device or multizone device.
Tasks
- Add new multizone device type.
- Add new recipes:
- Multizone devices.
- Multizone volume.
- Multizone muted.
- Implement device managers:
- Refactor existing current device management.
- Add multizone device manager.
- Synchronize multizone devices in
Cast
. - Replace volume/muted APIs in
Cast
with device manager creation APIs. - Find if there is a way to have common
CastMuteButton
andCastMuteIcon
without code duplication. - Update existing volume slider to use the new API.
- Display secondary sliders for multizone devices (if > 1).
- Ensure correct behavior when part of the paired devices are disconnected.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
🚧 In Progress