GCKUIPlaybackRateController Class
Stay organized with collections
Save and categorize content based on your preferences.
A class that can be used to implement a custom stream playback rate UI.
The application may either subclass this class and override the GCKUIPlaybackRateController::playbackRate and GCKUIPlaybackRateController::inputEnabled setters, or use KVO to listen for changes to these properties, and update its playback rate and/or playback rate UI control(s) accordingly.
- Since
- 4.0
Inherits NSObject.
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."],[[["\u003cp\u003e\u003ccode\u003eGCKUIPlaybackRateController\u003c/code\u003e enables custom stream playback rate UI implementation.\u003c/p\u003e\n"],["\u003cp\u003eIt allows subclassing and overriding, or using KVO to monitor and update playback rate.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGCKUIMediaController\u003c/code\u003e manages playback rate changes and UI control enabling/disabling.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplaybackRate\u003c/code\u003e property reflects the current stream playback rate from \u003ccode\u003eGCKRemoteMediaClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einputEnabled\u003c/code\u003e property controls the enabled/disabled state of playback rate UI controls.\u003c/p\u003e\n"]]],["The `GCKUIPlaybackRateController` class facilitates custom stream playback rate UI implementation. Developers can subclass it, overriding `playbackRate` and `inputEnabled` properties, or use KVO to monitor changes. `playbackRate` reflects the current stream's playback rate from `GCKRemoteMediaClient`, while `inputEnabled` manages the UI control's enabled/disabled state by `GCKUIMediaController`. The `GCKUIMediaController` updates `playbackRate` and observes it, issuing media commands to change the rate. Media UI controls are disabled while a command is active.\n"],null,["# GCKUIPlaybackRateController Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKUIPlaybackRateController Class Reference \n\nOverview\n--------\n\nA class that can be used to implement a custom stream playback rate UI.\n\nThe application may either subclass this class and override the [GCKUIPlaybackRateController::playbackRate](/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller#a0a13c88ff44c5ffc9b46c3c57e98308f \"The current stream playback rate from the GCKRemoteMediaClient. \") and [GCKUIPlaybackRateController::inputEnabled](/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller#a1095e75d10d6450a88b818d833877083 \"The GCKUIMediaController writes this property to enable or disable the UI control(s) managed by this ...\") setters, or use KVO to listen for changes to these properties, and update its playback rate and/or playback rate UI control(s) accordingly.\n\nSince\n: 4.0\n\nInherits NSObject.\n\n|----------------|-------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [init](/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller#ab6cf728742e962bf448689cd5d56171d) |\n| | Designated initializer. [More...](#ab6cf728742e962bf448689cd5d56171d) |\n| ||\n\n|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| float | [playbackRate](/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller#a0a13c88ff44c5ffc9b46c3c57e98308f) |\n| | The current stream playback rate from the [GCKRemoteMediaClient](/cast/docs/reference/ios/interface_g_c_k_remote_media_client \"A class for controlling media playback on a Cast receiver. \"). [More...](#a0a13c88ff44c5ffc9b46c3c57e98308f) |\n| ||\n| BOOL | [inputEnabled](/cast/docs/reference/ios/interface_g_c_k_u_i_playback_rate_controller#a1095e75d10d6450a88b818d833877083) |\n| | The [GCKUIMediaController](/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller \"A controller for UI views that are used to control or display the status of media playback on a Cast ...\") writes this property to enable or disable the UI control(s) managed by this controller. [More...](#a1095e75d10d6450a88b818d833877083) |\n| ||\n\nMethod Detail\n-------------\n\n|-----------------------|---|---|---|\n| - (instancetype) init | | | |\n\nDesignated initializer.\n\nProperty Detail\n---------------\n\n|-------------------------------------------------------|--------------------------|\n| |------------------------| | - (float) playbackRate | | readwritenonatomicassign |\n\nThe current stream playback rate from the [GCKRemoteMediaClient](/cast/docs/reference/ios/interface_g_c_k_remote_media_client \"A class for controlling media playback on a Cast receiver. \").\n\nThe [GCKUIMediaController](/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller \"A controller for UI views that are used to control or display the status of media playback on a Cast ...\") writes this property whenever the playback rate changes. The [GCKUIMediaController](/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller \"A controller for UI views that are used to control or display the status of media playback on a Cast ...\") 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](/cast/docs/reference/ios/interface_g_c_k_remote_media_client \"A class for controlling media playback on a Cast receiver. \") to change the playback rate. \n\n|-----------------------------------------------------|--------------------------|\n| |-----------------------| | - (BOOL) inputEnabled | | readwritenonatomicassign |\n\nThe [GCKUIMediaController](/cast/docs/reference/ios/interface_g_c_k_u_i_media_controller \"A controller for UI views that are used to control or display the status of media playback on a Cast ...\") writes this property to enable or disable the UI control(s) managed by this controller.\n\nMedia-related UI controls are temporarily disabled while a media command is in-flight."]]