Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 973 Bytes

README.md

File metadata and controls

54 lines (43 loc) · 973 Bytes

Localcast

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.

Start Server

go run main.go -s PATH_TO_DIR

Endpoints

  • 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

Raspberry Pi Setup

Support external harddrive (3gb)

sudo apt-get install ntfs-3g

Mount external harddrive

sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/media