GCKUIMiniMediaControlsViewController 类

GCKUIMiniMediaControlsViewController 类参考

概览

实现“正在播放”控制条的视图控制器。

在默认配置中,它会显示当前媒体项的缩略图、标题和副标题、视频流进度条以及播放/暂停切换按钮。

如需查看委托协议,请参阅 GCKUIMiniMediaControlsViewControllerDelegate

开始时间
3.0

继承自 UIViewController。实现了 <GCKUIMediaButtonBarProtocol>

实例方法摘要

(NSUInteger) - buttonCount
 接收者可自定义的按钮数量上限。更多…
 
(void) - setButtonType:atIndex:
 为位置 index 处的按钮设置按钮类型。更多…
 
(GCKUIMediaButtonType- buttonTypeAtIndex:
 返回给定位置的当前按钮类型。更多…
 
(void) - setCustomButton:atIndex:
 设置应在指定按钮位置显示的 UIButton 实例。更多…
 
(UIButton *__nullable) - customButtonAtIndex:
 返回对指定位置的自定义按钮的引用。更多…
 

房源摘要

id< GCKUIMiniMediaControlsViewControllerDelegatedelegate
 视图控制器的委托,通常是一个全屏视图控制器,负责在适当的时候显示和隐藏此控制栏。更多…
 
BOOL thumbnailEnabled
 是否应显示缩略图。更多…
 
BOOL active
 指示控制条的显示状态。更多…
 
CGFloat minHeight
 应呈现此视图的最小(和首选)高度。更多…
 

方法详细信息

- (NSUInteger) buttonCount

接收者可自定义的按钮数量上限。

返回
按钮数量。
- (void) setButtonType: (GCKUIMediaButtonType buttonType
atIndex: (NSUInteger)  index 

为位置 index 处的按钮设置按钮类型。

Parameters
buttonTypeThe 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.
indexThe 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

返回给定位置的当前按钮类型。

Parameters
indexThe button's position, where 0 is the left-most position.
返回
所选位置处的按钮类型。
- (void) setCustomButton: (UIButton *__nullable)  customButton
atIndex: (NSUInteger)  index 

设置应在指定按钮位置显示的 UIButton 实例。

Parameters
customButtonThe button instance to be presented in the control bar.
indexThe position in which the button should be presented. 0 is the left-most position. Indices should be smaller than the value returned by buttonCount.
- (UIButton *__nullable) customButtonAtIndex: (NSUInteger)  index

返回对指定位置的自定义按钮的引用。

Parameters
indexThe button's position, where 0 is the right-most position.
返回
对所选位置处的按钮的引用;如果该位置处没有自定义按钮,或者该位置无效,则为 nil

媒体资源详情

- (id<GCKUIMiniMediaControlsViewControllerDelegate>) delegate
readwritenonatomicweak

视图控制器的委托,通常是一个全屏视图控制器,负责在适当的时候显示和隐藏此控制栏。

- (BOOL) thumbnailEnabled
readwritenonatomicassign

是否应显示缩略图。

默认情况下,此属性设置为 YES

- (BOOL) active
readnonatomicassign

指示控制栏的显示状态。

YES 时,表示正在投放媒体,可以通过控制栏控制媒体,并且控制栏可以显示。当值为 NO 时,应隐藏控制栏。

- (CGFloat) minHeight
readnonatomicassign

应呈现此视图的最小(和首选)高度。