Skip to content

ciderapp/cider-chromecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cider Chromecast

A lightweight Go library and CLI for streaming audio to Chromecast-enabled devices.

Warning

This project was originally developed as an internal plugin for Cider. It is being open-sourced in the spirit of sharing and transparency. While it works as described below, it is not actively maintained or supported. Treat this as a research snapshot rather than a production-ready library.

Features

  • Discover devices (mDNS + SSDP)
  • Describe device (friendly name, manufacturer, model)
  • Secure Cast session + receiver launch
  • Play audio with metadata (title/artist/album/artwork)

Usage

There are two ways to use this library:

  1. Command Line Interface (CLI): Use a tool like wscat after starting the receiver app
  2. Foreign Function Interface (FFI): Build a shared library to call from other languages. See the Building FFI shared library section below.

Protobuf Definition

The proto/cast_channel.proto file defines the CastMessage format. After making changes, regenerate the Go code with:

protoc --go_out=. --go_opt=paths=source_relative proto/cast_channel.proto

Building FFI shared library

Linux: build/linux/amd64/libcider_cast.so + cider_cast.h

mkdir -p build/linux/amd64
GOOS=linux GOARCH=amd64 CC=gcc \
  go build -buildmode=c-shared \
    -o build/linux/amd64/libcider_cast.so \
    ./ffi/ffi.go

macOS: build/darwin/amd64/libcider_cast.dylib + cider_cast.h

mkdir -p build/darwin/amd64
GOOS=darwin GOARCH=amd64 CC=clang \
  go build -buildmode=c-shared \
    -o build/darwin/amd64/libcider_cast.dylib \
    ./ffi/ffi.go

Windows: build/windows/amd64/cider_cast.dll + cider_cast.h

New-Item -ItemType Directory -Force -Path build\windows\amd64

$Env:GOOS   = "windows"
$Env:GOARCH = "amd64"

go build -buildmode=c-shared `
  -o build\windows\amd64\cider_cast.dll `
  ./ffi/ffi.go

Target 386 architecture if you need 32-bit support

About

A lightweight Go integration for streaming audio to Chromecast devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published