GCKUIPlayPauseToggleController Class

  • The GCKUIPlayPauseToggleController class provides a way to create custom play/pause UI controls for Cast receivers.

  • Developers can subclass this class and override its properties, or use Key-Value Observing to monitor and update their UI based on changes to the playPauseState and inputEnabled properties.

  • GCKUIMediaController manages the state and enabled/disabled status of the play/pause controls, communicating with the GCKRemoteMediaClient to control the receiver's playback.

  • This class offers an alternative when the standard GCKUIMultistateButton is insufficient for implementing play/pause functionality.

GCKUIPlayPauseToggleController Class Reference

Overview

A class that can be used to implement a custom play/pause toggle UI, in situations where a GCKUIMultistateButton will not suffice.

The application may either subclass this class and override the GCKUIPlayPauseToggleController::playPauseState and GCKUIPlayPauseToggleController::inputEnabled setters, or use KVO to listen for changes to these properties, and update its play/pause UI control(s) accordingly.

Since
3.4

Inherits NSObject.

Instance Method Summary

(instancetype) - init
 Designated initializer. More...
 

Property Summary

GCKUIPlayPauseState playPauseState
 The current play/pause state of the GCKRemoteMediaClient. More...
 
BOOL inputEnabled
 The GCKUIMediaController writes this property to enable or disable the UI control(s) managed by this controller. More...
 

Method Detail

- (instancetype) init

Designated initializer.

Property Detail

- (GCKUIPlayPauseState) playPauseState
readwritenonatomicassign

The current play/pause state of the GCKRemoteMediaClient.

The GCKUIMediaController writes this property whenever the receiver's play/pause state changes. It observes the property (unless it is in the process of writing it) and if it changes, it issues the appropriate media command with the GCKRemoteMediaClient to change the receiver's player state accordingly.

- (BOOL) inputEnabled
readwritenonatomicassign

The GCKUIMediaController writes this property to enable or disable the UI control(s) managed by this controller.

Media-related UI controls are temporarily disabled while a media command is in-flight.