GCKUICastContainerViewController 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
一种视图控制器,用于封装另一个视图控制器,并在该控制器下方添加媒体播放通知区域。
通知可以显示“正在播放”项,其中包含当前媒体项的缩略图、标题和副标题、流进度条以及播放/暂停切换按钮。控制器会根据接收器上当前的媒体播放状态,相应地显示和隐藏此项。
- 开始时间
- 3.0
此类集成 UIViewController。
- (NSString* const) kGCKExpandedMediaControlsTriggeredNotification |
当应向用户显示展开的媒体控件时,将发布的通知的名称。
- (UIViewController*) contentViewController |
|
readnonatomicstrong |
- (BOOL) miniMediaControlsItemEnabled |
|
readwritenonatomicassign |
一个标志,用于指示是否应启用“正在播放”项。
如果启用,则每当接收器上加载或播放媒体内容时,系统都会自动显示相应项。默认值为 NO
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eGCKUICastContainerViewController\u003c/code\u003e wraps another view controller and adds a media playback notification area.\u003c/p\u003e\n"],["\u003cp\u003eThe notification area displays media information like thumbnail, title, subtitle, progress bar, and play/pause controls.\u003c/p\u003e\n"],["\u003cp\u003eIt automatically shows or hides based on the receiver's playback state.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can embed their view controller as content and control the "now playing" item's visibility.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a notification to trigger expanded media controls.\u003c/p\u003e\n"]]],["The `GCKUICastContainerViewController` wraps a view controller, adding a media playback notification area. This area displays a \"now playing\" item with a thumbnail, title, subtitle, progress bar, and play/pause toggle. It uses `contentViewController` to embed another view controller. The `miniMediaControlsViewController` manages the \"now playing\" item, which can be enabled or disabled using the `miniMediaControlsItemEnabled` flag. A notification, `kGCKExpandedMediaControlsTriggeredNotification`, is published to present expanded media controls.\n"],null,["# GCKUICastContainerViewController Class\n\n[Public Attributes](#pub-attribs) \\| [Properties](#properties) \nGCKUICastContainerViewController Class Reference \n\nOverview\n--------\n\nA view controller which wraps another View Controller and adds a media playback notification area below that controller.\n\nThe notification can display a \"now playing\" item that displays a thumbnail, title, and subtitle for the current media item, a stream progress bar, and a play/pause toggle button. The controller shows and hides this item as appropriate based on the current media playback state on the receiver.\n\nSince\n: 3.0\n\nInherits UIViewController.\n\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Public Attributes ----------------- ||\n| NSString \\*const | [kGCKExpandedMediaControlsTriggeredNotification](/cast/v3/reference/ios/interface_g_c_k_u_i_cast_container_view_controller#a8656b0b33d63678b90d5d94608f43127) |\n| | The name of the notification that will be published when the expanded media controls should be presented to users. [More...](#a8656b0b33d63678b90d5d94608f43127) |\n| ||\n\n|---------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| UIViewController \\* | [contentViewController](/cast/v3/reference/ios/interface_g_c_k_u_i_cast_container_view_controller#a275c9682d97b7cf234e02591c8afbf6f) |\n| | The view controller to be embedded as the content area of this view controller. [More...](#a275c9682d97b7cf234e02591c8afbf6f) |\n| ||\n| [GCKUIMiniMediaControlsViewController](/cast/v3/reference/ios/interface_g_c_k_u_i_mini_media_controls_view_controller) \\* | [miniMediaControlsViewController](/cast/v3/reference/ios/interface_g_c_k_u_i_cast_container_view_controller#abfffcd7e05822ada42951e3238fb3489) |\n| | The \"now playing\" view controller. [More...](#abfffcd7e05822ada42951e3238fb3489) |\n| ||\n| BOOL | [miniMediaControlsItemEnabled](/cast/v3/reference/ios/interface_g_c_k_u_i_cast_container_view_controller#af141f5231b2cf502c28d4ec9188654d9) |\n| | A flag indicating whether the \"now playing\" item should be enabled. [More...](#af141f5231b2cf502c28d4ec9188654d9) |\n| ||\n\nMember Data Documentation\n-------------------------\n\n|---------------------------------------------------------------------|\n| - (NSString\\* const) kGCKExpandedMediaControlsTriggeredNotification |\n\nThe name of the notification that will be published when the expanded media controls should be presented to users.\n\nProperty Detail\n---------------\n\n|---------------------------------------------------------------------------------------------------|---------------------|\n| |----------------------------------------------| | - (UIViewController\\*) contentViewController | | readnonatomicstrong |\n\nThe view controller to be embedded as the content area of this view controller. \n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|\n| |--------------------------------------------------------------------------------------------------------------------------------------------------------------| | - ([GCKUIMiniMediaControlsViewController](/cast/v3/reference/ios/interface_g_c_k_u_i_mini_media_controls_view_controller)\\*) miniMediaControlsViewController | | readnonatomicstrong |\n\nThe \"now playing\" view controller. \n\n|-------------------------------------------------------------------------------------|--------------------------|\n| |---------------------------------------| | - (BOOL) miniMediaControlsItemEnabled | | readwritenonatomicassign |\n\nA flag indicating whether the \"now playing\" item should be enabled.\n\nIf enabled, the item will be displayed automatically whenever there is media content loaded or playing on the receiver. The default value is `NO`."]]