Chromecast videos (Beta)
The FastPix Player SDK includes native support for Google Cast, allowing users to cast video content from a web application to Chromecast devices. This integration is designed to work with minimal configuration and is currently available in Beta.
FastPix manages device detection, session lifecycle, and playback control internally, so developers do not need to implement these functions separately.
Prerequisites
- The user’s device (running the FastPix Player) and the Chromecast device must be on the same Wi-Fi network.
- Ensure you’re using the latest version of the FastPix Player SDK.
- Chromecast support is currently available only in web-based environments.
Chromecast behavior in FastPix Player
The FastPix Player SDK manages Chromecast integration internally, enabling automatic detection, casting controls, and session handling. Below is a breakdown of how the SDK behaves during typical usage.
1. Device Detection and UI Control Visibility
- When a user opens a web application with the FastPix Player, the SDK scans the local Wi-Fi network for available Chromecast devices.
- If one or more devices are found, the Chromecast button is displayed automatically in the player UI. The button is interactive and allows the user to initiate casting.
- If no devices are available, the Cast button remains hidden. No additional logic is required from the developer to manage UI visibility.
2. Casting and playback control
- Clicking the Chromecast button starts a casting session to the selected device.
- During casting the video stream is rendered on the Chromecast device. Playback can be controlled via the FastPix Player interface or through the system's Chromecast controls.
- Users can stop casting at any time by clicking the Chromecast button again, which ends the casting session and automatically resumes playback in the FastPix Player on the original device.
3. Session handling after page refresh
If the user refreshes the browser tab:
- Active session: The SDK retains session metadata. When the user clicks the Play button again, playback resumes on the Chromecast device.
- Ended session: If the session has expired (e.g., the video has finished), the SDK does not automatically reconnect. The user must click Play to initiate a new session.
4. Automatic session termination
The Chromecast session is automatically ended in the following cases:
- The video playback completes.
- The session reaches its defined duration or timeout.
After termination:
- The FastPix Player returns to normal playback on the local device.
- The user may choose to cast again manually if desired.
As we continue to improve Chromecast support, your feedback is critical. Let us know what’s missing.
Updated about 10 hours ago