A command line tool to play any audio/video on an Apple TV.
npx play-on-apple-tv some-audio-file.mp3 my-apple-tv.localnpx play-on-apple-tv '' my-apple-tv.local
Find the name of your Apple TV using bonjour-browser:
npx bonjour-browser | grep airplay
Play a Youtube video by finding the raw video url using
npx play-on-apple-tv $(youtube-dl -f 136 --get-url '') my-apple-tv.local
If you have a question or have difficulties using
play-on-apple-tv, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.