Stay organized with collections Save and categorize content based on your preferences.
A class containing global objects and state for the framework.
The context must be initialized early in the application's lifecycle via a call to setSharedInstanceWithOptions: (GCKCastContext).
Inherits NSObject.
Sets the shared instance, supplying a Cast options object.
If the shared instance is already initialized, an exception will be thrown.
Sets the shared instance, supplying a Cast options object.
The call will fail if the context is already initialized. This method must be called on the main thread.
YES
on success, NO
on failure.
Returns the singleton instance.
If a shared instance has not yet been initialized, an exception will be thrown.
+ (BOOL) isSharedInstanceInitializedTests if the singleton instance has been initialized yet.
Registers a device provider, which adds support for a new type of (non-Cast) device.
Unregisters the device provider for a given device category.
Sets the credentials data of the current user.
You should call this API with the current user information before starting a cast session and whenever user account is changed.
The credentials data will be embedded in the launch request. If it is to launch an Android TV app, the app can use the credentials data to determine if the app supports this specific user. If not, the cast app will be launched instead.
If an Android TV app is launched, the credential data will be passed to the app, within the launch intent. The app can use this data to personalize the user experience.
If it has not been shown before, presents a fullscreen modal view controller that calls attention to the Cast button and displays some brief instructional text about its use.
YES
if the view controller was shown, NO
if it was not shown because it had already been shown before. Since version 4.1, NO
is also returned if the Cast Button was not found.
Provided by category GCKCastContext(UI).
- (BOOL) presentCastInstructionsViewControllerOnceWithCastButton: (GCKUICastButton *) castButtonIf it has not been shown before, presents a fullscreen modal view controller that calls attention to the Cast button, whose view is passed in, and displays some brief instructional text about its use.
YES
if the view controller was shown, NO
if it was not shown because it had already been shown before. NO
is also returned if the Cast Button was not found.
Provided by category GCKCastContext(UI).
- (void) clearCastInstructionsShownFlagClears the persistent flag that tracks whether the Cast instructions modal view controller has been shown.
Provided by category GCKCastContext(UI).
- (void) presentDefaultExpandedMediaControlsDisplays the default Cast expanded media controls.
Provided by category GCKCastContext(UI).
- (NSString* const) kGCKNotificationKeyCastStateThe userInfo
key for the new Cast state in a Cast state change notification.
The name of the notification that will be published when the Cast state changes.
- (NSString* const) kGCKExpandedMediaControlsTriggeredNotificationThe name of the notification that will be published when the expanded media controls should be presented to users.
- (NSString* const) kGCKUICastDialogWillShowNotificationThe name of the notification that will be published when the Cast dialog is about to be shown.
The name of the notification that will be published when the Cast dialog has been dismissed.
The discovery manager.
This object handles the discovery of receiver devices.
The session manager.
This object manages the interaction with receiver devices.
The image cache implementation that will be used by the framework to fetch images that are referenced in media metadata.
A default implementation will be used if one is not provided by the application. May be set to nil
to reinstate the default image cache.
Provided by category GCKCastContext(UI).
The image picker implementation that will be used to select an image for a specific purpose.
A default implementation will be used if one is not provided by the application. May be set to nil
to reinstate the default image picker.
Provided by category GCKCastContext(UI).
- (BOOL) useDefaultExpandedMediaControls readwritenonatomicassignThe instance of the default Cast expanded media controls view controller.
Provided by category GCKCastContext(UI).
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."],[[["The `GCKCastContext` class manages global objects and state for the Google Cast framework, requiring initialization early in the application's lifecycle."],["It provides methods for device and session management, UI presentation (like the Cast dialog and media controls), and registering device providers."],["Developers can access properties like `castState`, `discoveryManager`, and `sessionManager` to interact with the Cast context and monitor casting activities."],["The class also offers notifications for state changes and UI events, allowing developers to respond to Cast-related events in their applications."],["Custom image caches and pickers can be set for handling media metadata and image selections within the Cast framework."]]],["The GCKCastContext class manages global objects and states for the framework, requiring initialization early in the application's lifecycle. Key actions include registering/unregistering device providers, setting user credentials, and displaying the Cast dialog. The class can construct view controllers for media controls and present instructional modals for the Cast button. It also manages singleton instances with methods for setting and retrieving the shared instance. Public attributes define notification keys and names. Properties handle casting state, device discovery, session management, image handling, and media controls behavior.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4