Stay organized with collections Save and categorize content based on your preferences.
The Cast SDK allows a user to select streaming audio-visual content using a Sender, and play it on (or cast it to) another device known as the Receiver, while controlling playback using the Sender.
The term Sender refers to an app that plays the role of controller for the Cast session. A Sender initiates the Cast session and manages the user's interaction with the content.
There are many kinds of Senders, including mobile apps and Google Chrome web apps, as well as virtual control surfaces on touch-enabled Google Home devices. The media controls in the Chrome web browser function as a Sender, as does Google Assistant itself.
The term Receiver refers to an app running on a Cast-enabled device that is responsible for responding to Sender commands and for conveying streaming content from an online streaming service to the Cast-enabled device. Examples of Cast-enabled Receiver devices include Chromecasts, smart televisions, smart screens, and smart speakers.
The Cast SDK also supports multiple Senders connecting to a Cast session. For instance, one Sender could start a session on a Receiver and another Sender could join the same session to control playback, load new content, or queue more content for later.
App components and architectureGoogle Cast supports Sender app development for Android, iOS, and Cast-supported web platforms, such as Google Chrome.
A Receiver app runs on a Cast-enabled device, examples of which include:
A Sender controls media playback on a Receiver using Media Playback Messages defined by the SDK. If an app use case requires sending data that is not formally defined in the standard Media Playback Messages, you may use the customData
field provided by several message types to pass ancillary data.
There are two basic Cast app development scenarios:
The Google Cast SDK is made up of several Cast API libraries. Along with the APIs, there are two kinds of documentation:
The Cast APIs are divided according to platform and Cast app type. Table 1 contains links to the guides for the various Cast APIs.
Types of Sender AppsSender Apps can run on three platforms:
Although the choice of Sender type will likely be driven largely by the Sender platforms that you intend to support, it’s important to know the capabilities and limitations of each type of Sender (see Table 3).
Table 3: Senders Comparison Capability Android Sender iOS Sender Web Sender Ad breaks and companion ads within a media stream Styled text tracks Group, style and activate media tracks Autoplay and Queueing (edit, reorder, update) Custom channels Custom actions Full Cast UI, including controller and minicontroller Intent to Join Types of Receiver appsReceiver apps handle communication between the Sender app and the Cast device. There are two main types of Receiver: the Web Receiver and the Android TV Receiver. You are expected to provide a Web Receiver at a minimum, and encouraged to provide an Android TV Receiver to maximize the user's experience with your application.
There are three types of Web Receiver, each with a distinct set of qualities and capabilities:
In addition to the capabilities provided by the Custom Receiver, the Android TV Receiver provides Cast Connect, a set of capabilities that provide a native experience for your users, seamlessly combining Cast with Android TV.
Table 2 highlights the capabilities of the different types of Receivers.
Table 2: Receivers Comparison Android TV Receiver Custom Receiver Styled Media Receiver (SMR) Default Media Receiver Platform Android-based (Java/Kotlin) Web-based (HTML5) Requirements Must be registered Capabilities HLS and DASH media playback Support for touch controls Handles voice commands from Assistant-enabled devices Customizable visual style and branding Handles custom messages Cast ConnectThe choice between the three Web Receiver options depends on which media types the app needs to support, the degree of UI customization required, and any custom logic requirements.
Warning: To integrate the Cast API into your app, your app needs to use a media format supported by Cast, such as HLS or DASH. If your app requires an unsupported media format, you will not be able to integrate Cast into your app. Determine which type of Web Receiver to buildProvided your app can integrate with Cast, use the following prompts to determine which type of Web Receiver you should build:
Create a Custom Receiver if: The app requires one or more of the following special capabilities: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 Cast SDK enables users to stream audio-visual content from a Sender app (like mobile or web apps) to a Receiver device (like Chromecasts or smart TVs)."],["Developers can create Cast-enabled apps, building Senders, Receivers, or both, depending on their needs and the desired level of customization."],["The Cast SDK offers various API libraries and documentation for Android, iOS, and web platforms, facilitating the development of different Cast app types."],["Three main types of Receiver apps exist: Custom Receiver (for maximum customization), Styled Media Receiver (for branding), and Default Media Receiver (basic, for limited use cases)."],["Choosing the right Receiver type depends on factors such as media support, UI customization, and specific functionality requirements like DRM or advertising."]]],[]]
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.3