Cast Application Framework (CAF) Receiver Application
This library allows you to serve VMAP ads from Pulse to a Chromecast device through Google's CAF Receiver SDK.
In order to use and test a CAF receiver application, you need the following:
- Purchase and install a Chromecast device.
- Run the Google Home app to set up the Chromecast device.
- Register your Chromecast device as described at https://developers.google.com/cast/docs/registration#devices, so that you can use it for testing.
- Create a sender application which has the Cast button and user controls, such as play/pause, to control the content/ad that is playing on the Chromecast receiver. See https://developers.google.com/cast/docs/developers#app_components for more details.
For more information on the project structure and customization, see Project Structure.
- Clone/Download this library.
- Open the index.html file and update the values for
vmapParametersis an object that contains the parameters needed to make an ad request and to filter the ads based on those parameters. The
pulseHostparameter is mandatory. See VMAP Parameters for all the possible options you can set.
- Build the project:
- npm install
- Host the CAF receiver application on your server in order to use it with the Chromecast device.
- Register your application in order to run the CAF receiver on Chromecast devices. You can find the Cast developer license at https://cast.google.com/publish/#/overview. After registering your application, you receive an application ID that your sender application has to use to perform API calls, such as to launch a receiver application.
- Put the receiver application ID into the sender application code. See https://developers.google.com/cast/docs/downloads for more details.
- Launch your sender application.
- Click the Cast button in the application.
- Select the Cast device that you registered for testing.
- Choose which video content to play.
You should now see preroll/midroll/postroll ads, based on what you passed in the
Debugging a CAF Receiver Application
Open a browser window and point it to the IP address of the Chromecast unit (port 9222). For more information on how to debug from this point, go to Google's Chromecast Developer Guide topic on debugging.
Publishing the CAF Receiver Application
To publish your application, follow the steps described at https://developers.google.com/cast/docs/registration#publish_your_application.