Skip to content

Api server for casting your local media files to Chromecast

License

Notifications You must be signed in to change notification settings

wlwanpan/localcast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Api server for casting your local media files to Chromecast

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages