Page Summary
-
GCKUIMiniMediaControlsViewController is a view controller that implements the "now playing" control bar and in its default configuration displays media item details, a progress bar, and a play/pause button.
-
It inherits UIViewController and implements GCKUIMediaButtonBarProtocol, providing methods to manage custom buttons on the control bar.
-
Key properties include
delegatefor handling presentation and hiding,thumbnailEnabledto control thumbnail visibility,activeto indicate the control bar's display state, andminHeightfor its preferred height.
Overview
A view controller which implements the "now playing" control bar.
In its default configuration, it displays a thumbnail, title, and subtitle for the current media item, a stream progress bar, and a play/pause toggle button.
See GCKUIMiniMediaControlsViewControllerDelegate for the delegate protocol.
- Since
- 3.0
Inherits UIViewController. Implements <GCKUIMediaButtonBarProtocol>.
Instance Method Summary | |
| (NSUInteger) | - buttonCount |
| The maximum number of buttons that can be customized by the receiver. More... | |
| (void) | - setButtonType:atIndex: |
Sets the button type for the button at position index. More... | |
| (GCKUIMediaButtonType) | - buttonTypeAtIndex: |
| Returns the current type of button at a given position. More... | |
| (void) | - setCustomButton:atIndex: |
| Sets the instance of UIButton that should be presented at a given button position. More... | |
| (nullable UIButton *) | - customButtonAtIndex: |
| Returns a reference to the custom button at a given position. More... | |
Property Summary | |
| id < GCKUIMiniMediaControlsViewControllerDelegate > | delegate |
| The view controller's delgate, typically a full-screen view controller in charge of presenting and hiding this control bar when appropriate. More... | |
| BOOL | thumbnailEnabled |
| Whether the thumbnail image should be displayed or not. More... | |
| BOOL | active |
| Indicates the display state of the control bar. More... | |
| CGFloat | minHeight |
| The minimal (and preferred) height at which this view should be presented. More... | |
Method Detail
| - (NSUInteger) buttonCount |
The maximum number of buttons that can be customized by the receiver.
- Returns
- Number of buttons.
| - (void) setButtonType: | (GCKUIMediaButtonType) | buttonType | |
| atIndex: | (NSUInteger) | index | |
Sets the button type for the button at position index.
- Parameters
-
buttonType The type of the button. If the type is GCKUIMediaButtonTypeCustom, a UIButton instance should be passed for the same index using setCustomButton:atIndex:. Otherwise a default button is created and presented in that position. index The position in which the button should be presented. 0 is the left-most position. Indices should be smaller than the value returned by buttonCount.
| - (GCKUIMediaButtonType) buttonTypeAtIndex: | (NSUInteger) | index |
Returns the current type of button at a given position.
- Parameters
-
index The button's position, where 0 is the left-most position.
- Returns
- The type of the button at the selected position.
| - (void) setCustomButton: | (nullable UIButton *) | customButton | |
| atIndex: | (NSUInteger) | index | |
Sets the instance of UIButton that should be presented at a given button position.
- Parameters
-
customButton The button instance to be presented in the control bar. index The position in which the button should be presented. 0 is the left-most position. Indices should be smaller than the value returned by buttonCount.
| - (nullable UIButton *) customButtonAtIndex: | (NSUInteger) | index |
Returns a reference to the custom button at a given position.
- Parameters
-
index The button's position, where 0 is the right-most position.
- Returns
- A reference to the button at the selected position, or
nilif there is no custom button at that position, or the position is invalid.
Property Detail
|
readwritenonatomicweak |
The view controller's delgate, typically a full-screen view controller in charge of presenting and hiding this control bar when appropriate.
|
readwritenonatomicassign |
Whether the thumbnail image should be displayed or not.
By default this property is set to YES.
|
readnonatomicassign |
Indicates the display state of the control bar.
When YES, there is media being casted which can be controlled by the control bar, and it can be made visible. When NO, the control bar should be hidden.
|
readnonatomicassign |
The minimal (and preferred) height at which this view should be presented.