GCKUIPlayPauseToggleController Class
Stay organized with collections
Save and categorize content based on your preferences.
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.
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.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["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."]]],["The `GCKUIPlayPauseToggleController` class allows for custom play/pause UI implementations. Developers can subclass and override `playPauseState` and `inputEnabled` setters or use KVO to monitor changes. `playPauseState` reflects the `GCKRemoteMediaClient`'s current play/pause status, managed by the `GCKUIMediaController`. `inputEnabled`, also managed by `GCKUIMediaController`, controls whether the UI control is enabled or disabled, often when media commands are active. The initializer is `init`.\n"]]