GCKUICastContainerViewController 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
一个视图控制器,用于封装另一个视图控制器,并在该控制器下方添加媒体播放通知区域。
通知可以显示一个“正在播放”项,用于显示当前媒体项的缩略图、标题和副标题、流进度条,以及播放/暂停切换按钮。控制器会根据接收器上当前的媒体播放状态适当地显示和隐藏此项。
- 开始时间
- 3.0
此类集成 UIViewController。
- (UIViewController*) contentViewController |
|
readnonatomicstrong |
- (BOOL) miniMediaControlsItemEnabled |
|
readwritenonatomicassign |
一个标记,用于指示是否应启用“正在播放”项。
启用后,每当接收设备上加载或播放媒体内容时,媒体项就会自动显示。默认值为 NO
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003ccode\u003eGCKUICastContainerViewController\u003c/code\u003e wraps another view controller and adds a media playback notification area.\u003c/p\u003e\n"],["\u003cp\u003eThis notification area displays a "now playing" item with thumbnail, title, subtitle, progress bar, and play/pause control.\u003c/p\u003e\n"],["\u003cp\u003eIt automatically shows and hides based on the media playback state on the receiver.\u003c/p\u003e\n"],["\u003cp\u003eYou can enable or disable the "now playing" item using \u003ccode\u003eminiMediaControlsItemEnabled\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can embed their own view controller using the \u003ccode\u003econtentViewController\u003c/code\u003e property.\u003c/p\u003e\n"]]],[],null,["# GCKUICastContainerViewController Class\n\n[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| Property Summary ---------------- ||\n| UIViewController \\* | [contentViewController](/cast/docs/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/docs/reference/ios/interface_g_c_k_u_i_mini_media_controls_view_controller) \\* | [miniMediaControlsViewController](/cast/docs/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/docs/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\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/docs/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`."]]