Here you can download the APIs that will enable your application to cast content to a large display connected to a Google Cast receiver device. You can also download various sample apps, listed below, to help you get started.
- The Google Cast Developer's Guide for set-up and guidelines in using the APIs.
- The Google Cast API References for a complete description of the APIs.
Terms of service
By accessing the download links below, you indicate that you have read and accepted Google Cast SDK Additional Developer Terms of Service.
Sender API libraries
iOS Sender API
To set up your iOS project, download the iOS Sender API libraries.
- Supports iOS version 6 and later
- Add the SDK as a linked library, not as an embedded binary
See Xcode setup.
You can also install the iOS Sender API libraries via Cocoapods.
- Install the Cocoapods binary, as explained in Getting Started. The library is called google-cast-sdk.
- Set up your XCode project to use the Google Cast SDK pod, as described in Using CocoaPods.
Android Sender API
To set up your Android project, you need to:
- Add the Google Play services library to your project. For setup instructions, read Set Up Google Play Services SDK.
- Add the v7 mediarouter library to your project. This library provides the framework and UI components that allow your app to select the Google Cast media route. For setup instructions, read Support Library Setup and be sure you follow the section about Adding libraries with resources.
Chrome Sender API
To use the Chrome Sender API, include
in your Chrome page. The API requires Chrome version 32 or later and the Cast Extension version
18.104.22.168 or later.
Receiver API library
The receiver API is available from the receiver application once you register your receiver(s) and device(s) for development. To use the API, include
https://www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js in your receiver application.
This file includes both bitmaps and vectors for the icons. These are also included with the Android v7 mediarouter library.
The reference apps listed here are those that comply with the Google Cast Design Checklist and follow Google Cast development best practices. Use these apps as a starting point when developing your app for Google Cast.
|CastVideos-android||Design Checklist compliant Android sender to Cast videos.||✔|
|CastVideos-ios||Design Checklist compliant iOS sender to Cast videos.||✔|
|CastVideos-chrome||Design Checklist compliant Chrome sender to Cast videos.||✔|
|Cast-Player-Sample||Design Checklist compliant receiver.||✔||✔|
Other sample apps
Here are some additional sample apps that demonstrate the Google Cast SDK. Also, the Android SDK includes 2 samples apps under Google Play services in extras.
|CastCompanionLibrary-android||Android library project for adding Cast features to existing apps.||✔|
|HelloText-Android||Android sender application to send and receive text messages.||✔||✔|
|HelloText-ios||iOS sender application to send and receive text messages.||✔||✔|
|HelloText-Chrome||Chrome sender application to send and receive text messages.||✔||✔|
|hello-cast-video-ios||Basic iOS sender application to cast a Video.||✔|
|CastMedia-chrome||Chrome sender to Cast various media.||✔|
|CastHelloVideo-chrome||Basic Chrome sender application to cast a Video.||✔|
|cast-sender-tool-sample||Basic Chrome sender for videos.||✔|
|CastMediaPlayerStreamingDRM||Chrome sender to play adaptive and DRM video streams.||✔||✔|
|Cast-Simple-Receiver||Basic custom receiver.||✔|
|cast-custom-receiver-sample||Custom receiver to play media.||✔||✔|
|cast-chrome-tictactoe||Chrome sender for TicTacToe game.||✔|
|TicTacToe Receiver||Receiver for TicTacToe game.||✔|
|CastVideoLooping-receiver||Receiver to loop a single video using MSE.||✔|
|Cast-Media-Player-Library-Sample||Receiver on how to use the MPL.||✔||✔|
|CastPresentation-Android||Android sender on how to use the Android Presentation API with Google Cast devices.||✔|
|Closed Captioning||Controlling closed captioning with a custom namespace channel.||✔||✔|
|CastVideosPlaylist-chrome||How to cast a video playlist using a custom namespace channel.||✔||✔|
|MediaRouter||Android sender shows different ways to use the Media Router to display the Cast button.||✔|
|cast-support-media-server||Basic web server with CORS configured to host media files.|