Kickstarting your custom chromecast journey

Eyevinn Technology
3 min readApr 3, 2024

So, you’ve decided that you want to add chromecast support to your app. You look over the documentation and setup a styled media receiver. All is well… but, it doesn’t play that well? 😕

You decide to tweak the settings only to discover that you can’t! You have to create a custom receiver!

That’s why we decided to create our own configurable custom cast-reciever, available on our GitHub and at Eyevinn open source cloud. The receiver is configured using environment variables that are used during build time to create a static receiver that can be hosted anywhere, and since it’s using enviroment variables it can quite easily be integrated into any CI/CD pipeline using any cloud provider.

The receiver also uses Shaka Player instead of the leagcy media player for HLS which is deprecated and will be removed in the future.

In this blog post I’m going to show how easy this can be using Eyevinn open source cloud. 💻

First things first, we’ll head over to Eyevinn — Open Source Cloud and subscribe to the service `Chromecast receiver`.

Next, we’ll create a receiver using the following settings.

These settings each correspond to one of the environment variables supported by the cast receiver, which you can read more about here.

We currently simplify the usage of logos using the `LogoUrl` and `PlaybackLogoUrl`, while the other options are kept generic to give you full control 🎨.

In this example, we’ve configured the receiver to use the latest version of shaka player as well as our own logo and brand color for the progress bar 🚀.

And we’re done! 🎉

We can confirm that all settings are as expected by opening the application we just created in Google Chrome and checking the inspector.

This obviously just scratches the surface of what you’re able to configure. The `CastReceiverOptions` supports all JSON-compatible configuration options, including providing a custom `shakaConfig`, giving you almost full control of how the player behaves. See the CastReceiverOptions for more information.

Currently the configuratior doesn’t have validation of the JSON input used by the `CastReceiverOptions` and `CastMediaPlayerStyle` so make sure to double check the input before creating the receiver as it will fail to build if the JSON is invalid.

If you encounter any issues or have any questions, feel free to open an issue on our github page

--

--

Eyevinn Technology

We are consultants sharing the passion for the technology for a media consumer of the future.