go-chromecast icon indicating copy to clipboard operation
go-chromecast copied to clipboard

How do I display a web page?

Open ITmaze opened this issue 4 years ago • 4 comments

Have been attempting to display a web page as a dashboard. It's hosted externally and accessible via https://podcasts.itmaze.com.au/clock.html - but I've been unable to determine how to tell go-chromecast to load the web page and display it.

I've attempted to use load and set the content type using -c text/html, I've tried load-app with dozens of different apps.

I'm clearly missing something obvious, but I understood that there is a default ChromeCast receiver that can display a web page.

If I use the defaultChromecastAppID that's shown in https://github.com/vishen/go-chromecast/blob/master/application/application.go on line 38"

go-chromecast load-app -n test CC1AD845 https://podcasts.itmaze.com.au/clock.html

The debug output for watch shows:

CHROMECAST BROADCAST MESSAGE: type=MEDIA_STATUS proto=CASTV2_1_0 (namespace=urn:x-cast:com.google.cast.media) c1fe7e30-7d78-450c-bf2d-c3a4a39989c8 -> * | {"type":"MEDIA_STATUS","status":[{"mediaSessionId":2,"playbackRate":1,"playerState":"IDLE","currentTime":0,"supportedMediaCommands":12303,"volume":{"level":1,"muted":false},"media":{"contentId":"https://podcasts.itmaze.com.au/clock.html","contentType":"","streamType":"BUFFERED","duration":0,"metadata":{"metadataType":0,"artist":"","title":"","subtitle":"","releaseDate":""}},"queueData":{"startIndex":0},"currentItemId":1,"extendedStatus":{"playerState":"LOADING","media":{"contentId":"https://podcasts.itmaze.com.au/clock.html","contentType":"","streamType":"BUFFERED","duration":0,"metadata":{"metadataType":0,"artist":"","title":"","subtitle":"","releaseDate":""}},"mediaSessionId":2},"repeatMode":"REPEAT_OFF"}],"requestId":0}
CHROMECAST BROADCAST MESSAGE: type=MEDIA_STATUS proto=CASTV2_1_0 (namespace=urn:x-cast:com.google.cast.media) c1fe7e30-7d78-450c-bf2d-c3a4a39989c8 -> * | {"type":"MEDIA_STATUS","status":[{"mediaSessionId":2,"playbackRate":1,"playerState":"IDLE","currentTime":0,"supportedMediaCommands":12303,"volume":{"level":1,"muted":false},"currentItemId":1,"idleReason":"ERROR"}],"requestId":0}

What am I missing?

ITmaze avatar Apr 05 '22 04:04 ITmaze

I have never tried to load a web page before sorry, so I can't answer for sure. I've only been able to load video and audio files like mp3/4, avi, mkv etc. It might be possible to load a webpage like that, but usually the load command takes a filename or url to a media file to load.

vishen avatar Apr 05 '22 06:04 vishen

I have the same question

fivestones avatar Apr 05 '22 12:04 fivestones

I figured out a way, but not with go-chromecast. I installed catt (cast all the things) from https://github.com/skorokithakis/catt. Install with pipx install catt. Once that was done, just catt -d ip.add.of.chromecast cast_site http://some.site and it works!

fivestones avatar Apr 05 '22 15:04 fivestones

It looks like it is possible then. @fivestones not sure if you are able to, but if possible could you run go-chromecast watch and then run the catt command? Otherwise I will try and find some time to try it out when I get a chance :)

vishen avatar Apr 07 '22 00:04 vishen