A basic custom cast receiver that can be configured using environment variables. The main intention is to be able to quickly spin up a cast receiver without having to write any code.
We also set some recommended default options for an optimal playback experience.
- Docker OR Node.js 20
The Cast Receiver can be run either as a Node.js application or as a Docker container. The Cast Receiver is built using the Google chromecast CAF SDK.
You configure the Cast Receiver by setting environment variables. The following environment variables are available:
TITLE
- Title of the applicationCAST_RECEIVER_OPTIONS
- JSON of the options for the cast receiver, this can override recommended defaults. For a full list of options see docsPLAYBACK_LOGO_IMAGE
- URL to the playback logo image. See docsLOGO
- URL to your logo image.CAST_MEDIA_PLAYER_STYLE
- Gives you full access to style thecast-media-player
element. See docs. Note this may override other ENV variables that may set style options, eg.LOGO
. The format is [[style, value]] eg.[["--splash-image", "url(https://github.com/eyevinn.png"], ["--splash-size", "contain"]]
npm install
cp .env.sample
.env
- Modify
.env
to your needs npm run build
- Host the
dist
folder on a web server
docker build . -t <your-image-name>
docker run -p 8080:8080 <your-image-name> -e ENV_VARIABLE=value
VALUE
You can also create a .env file before running docker build
if you want to add a default set of env variables
npm install
cp .env.sample
.env
- Modify
.env
to your needs npm run dev
See CONTRIBUTING
Join our community on Slack where you can post any questions regarding any of our open source projects. Eyevinn's consulting business can also offer you:
- Further development of this component
- Customization and integration of this component into your platform
- Support and maintenance agreement
Contact sales@eyevinn.se if you are interested.
Eyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor. As our way to innovate and push the industry forward we develop proof-of-concepts and tools. The things we learn and the code we write we share with the industry in blogs and by open sourcing the code we have written.
Want to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!