The Command and Control (CaC) Tool is a functional web sender for developers to test and debug a receiver application.
Developers can use the CaC Tool to:
- Launch a receiver app on a Cast-enabled device and send a load request to start media playback.
- Simulate voice commands sent by Google Assistant to the receiver.
- Capture logs from Cast Debug Logger and control the receiver debug overlay.
Launch receiver app
There are two ways to launch your receiver with the CaC Tool:
To start a new Cast session:
- Open the CaC Tool, enter your Receiver App ID and click the SET APP ID button.
Click on the Cast button and select a device to launch the receiver on a remote Cast-enabled device.
To join an existing Cast session:
Get the running Cast session ID by using the following codes:
From the receiver side, use the following method to get session ID in the Chrome Remote Debugger console:
Or to get the session ID from a connected web sender, use the following method:
Enter the session ID in the CaC Tool and click the RESUME button.
When the CaC Tool is connected to the receiver app, the Cast button appears with a filled frame shape. The receiver app ID and session ID are also displayed at the top of the tool.
Load media from either your sender app or the CaC Tool.
To start media playback on your receiver, cast your sender app to the same Cast-enabled device and send a load request from your sender app to the receiver.
The CaC Tool also provides multiple ways to send a load request to the receiver app:
Load by entity (voice casting)
When users initiate media playback through Google Assistant, Google Assistant uses Command and Control (CaC) messages to send user credentials and entity to your receiver.
The CaC Tool simulates voice casting and sends a load request with
Load by content
The CaC Tool can also simulate your app sending a load request with
When a media playback starts, the CaC Tool receives Media Status messages from
your receiver app and displays them on the
MEDIA STATUS tab.
Test voice commands
The CaC Tool also simulates voice commands sent by Google Assistant to your receiver app. You can test if the media commands that your app supported are working properly. Non-supported media commands must be handled with appropriate error type and error reasons.
Inspect and control Cast Debug Logger
If your receiver app enables Cast Debug Logger, the CaC Tool captures the log messages and controls the receiver debug overlay.
Use the following buttons to control the receiver and log messages:
- Receiver App ID
- Clear Cache and Stop Receiver - Reload the receiver app and stop casting
- Receiver Debug Overlay
- Show - Toggle the debug overlay on the receiver
- Clear - Clear log messages on the receiver debug overlay
- Log Message Controls
- Insert Message - Insert comments or dividers to the log area
- Download Log - Save log messages
- Clear Log - Clear log messages on the log area
- Log Messages
- Custom Tags - Click the checkbox to filter log messages