An API server built around go-chromecast to cast your local media files to Google Home or Chromecast.
Note: The server has to be under the same local network.
go run main.go -s PATH_TO_DIR
- Get list of media in local dir:
curl localhost:4040/media?type=audio
Response:
[
{
"ID":"5c0dbd824f3d37099f988541",
"Name":"Running.mp3",
},
{
"ID":"5c0dbd824f3d37099f988542",
"Name":"Walking.mp3",
}
]
- Cast media by id:
curl -X POST localhost:4040/media/5c0dbd824f3d37099f988541/cast
- Stop media:
curl -X POST localhost:4040/media/stop
Support external harddrive (3gb)
sudo apt-get install ntfs-3g
Mount external harddrive
sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/media