How to programmatically launch a chrome application from the command line

I want to run the Chromecast app, but DO NOT use the chrome extension or iOS or Android. Doing this from the command line.

I noticed that you can send POST to your lame one and it will launch the application. For example, if I do

curl -H "Content-Type: application/json" http://CHROMECAST_IP:8008/apps/YouTube -X POST -d ‘v=oHg5SJYRHA0′

Then it will launch youtube.

But for some reason I can not do this with special applications (in dev mode). I thought I could send POST to http://CHROMECAST_IP:8008/apps/MY_REGISTERED_APP_ID, but no luck. I just get the answer 404. Hmmm ...

My application is just a simple web page (this is not streaming media). I want to run a small headless server that launches my chrome application every day using the CRON task.

Any help is much appreciated! Thank:)

+4
source share
2 answers

All applications that use the official Cast SDK cannot be launched from the command line.

+3
source

You can use nodecastor , which works great with the latest V2 protocol and has a command line version located in the folder bin. It can run the application with the specified identifier.

0
source

Source: https://habr.com/ru/post/1537756/


All Articles