Overview
A controller for UI views that are used to control or display the volume and mute state of a Cast receiver.
The calling application registers its volume-related UI controls with the controller by setting the appropriate properties. The controller then responds to touch events on the controls by issuing the appropriate volume commands to the receiver, and updates the controls based on status information received from the receiver. The controller automatically enables and disables the UI controls as appropriate for the current session and receiver state.
- Since
- 3.0
Inherits NSObject.
Instance Method Summary | |
(instancetype) | - init |
Designated initializer. More... | |
(void) | - setVolume: |
A convenience method for changing the receiver's volume. More... | |
(void) | - setMuted: |
A convenience method for changing the receiver's mute state. More... | |
(void) | - volumeUp |
A convenience method for increasing the receiver's volume by the volume increment. More... | |
(void) | - volumeDown |
A convenience method for decreasing the receiver's volume by the volume increment. More... | |
(void) | - toggleMuted |
A convenience method for toggling the mute state. More... | |
Property Summary | |
UIButton * | volumeUpButton |
A "volume up" button. More... | |
UIButton * | volumeDownButton |
A "volume down" button. More... | |
UISlider * | volumeSlider |
A slider for displaying and changing the current receiver volume. More... | |
UISwitch * | muteSwitch |
A switch for toggling the receiver's mute state. More... | |
GCKUIMultistateButton * | muteToggleButton |
A toggle button for muting/unmuting the receiver. More... | |
Method Detail
- (instancetype) init |
Designated initializer.
- (void) setVolume: | (float) | volume |
A convenience method for changing the receiver's volume.
Delegates to the currently active GCKSession object.
- Parameters
-
volume The new volume. Must be a value in the range [0.0, 1.0].
- (void) setMuted: | (BOOL) | muted |
A convenience method for changing the receiver's mute state.
Delegates to the currently active GCKSession object.
- Parameters
-
muted The new mute state.
- (void) volumeUp |
A convenience method for increasing the receiver's volume by the volume increment.
Delegates to the currently active GCKSession object.
- (void) volumeDown |
A convenience method for decreasing the receiver's volume by the volume increment.
Delegates to the currently active GCKSession object.
- (void) toggleMuted |
A convenience method for toggling the mute state.
Delegates to the currently active GCKSession object.
Property Detail
|
readwritenonatomicweak |
A "volume up" button.
When the button is tapped, the receiver's volume is increased by the volume increment. The button will be disabled if there is no session currently active or if the current session does not support volume adjustment.
|
readwritenonatomicweak |
A "volume down" button.
When the button is tapped, the receiver's volume is decreased by the volume increment. The button will be disabled if there is no session currently active or if the current session does not support volume adjustment.
|
readwritenonatomicweak |
A slider for displaying and changing the current receiver volume.
When the slider's value is changed by the user, the volume is updated on the receiver. When a receiver status is received that indicates a change in the receiver's volume, the slider value is updated accordingly. The slider will be disabled if there is no session currently active or if the current session does not support volume adjustment.
|
readwritenonatomicweak |
A switch for toggling the receiver's mute state.
When the switch is toggled, the mute state is updated on the receiver. When a receiver status is received that indicates a change in the receiver's mute state, the switch is updated accordingly. The switch will be disabled if there is no session currently active or if the current session does not support muting.
|
readwritenonatomicweak |
A toggle button for muting/unmuting the receiver.
The caller should set appropriate "muted" and "unmuted" icons for the button's GCKUIButtonStateMuteOn and GCKUIButtonStateMuteOff states, respectively. The button's state is automatically updated to reflect the current mute state on the receiver. When the button is tapped, the mute state is updated on the receiver. The button will be disabled if there is no session currently active or if the current session does not support volume muting.