Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Chromecast determine inactivity?

I've made a Chromecast app that displays multiple quotes and the whole idea is to basically connect it to a spare tv/monitor you have lying around and use it to have inspirational quotes change on the screen.

But the problem is, Chromecast automatically times out and goes back to the home screen after every few minutes of inactivity. I'd like to find out how it detects inactivity so I can prevent this behavior and allow my app to keep running on the Chromecast indefinitely, as a sort of replacement for the original photo screensaver.

like image 335
Shahraiz T. Avatar asked Jun 19 '17 02:06

Shahraiz T.


People also ask

How do I stop my Chromecast from timing out?

Go into the settings of your Chromecast with Google TV (top right corner of your TV screen). There is a timeout setting there.

Does the Google Chromecast automatically turn off?

Also, if you have the new Chromecast with Google TV (the oblong one with a remote), there is a timeout in the settings (top right corner of your TV screen). That turns off the Chromecast after it's been sitting in Ambient Mode for a while. You can increase that by going to the settings.

Where do the Chromecast pictures come from?

Google Photos can automatically select what it thinks are your best recent photos and show them on your Chromecast.

Can you turn off ambient mode Chromecast?

You have to go to the Google app > More > Settings > Google assistant > Assistant tab > scroll down to Assistant devices > select your device (mine was phone) > find Ambient mode > deactivate.


1 Answers

I figured out how to keep my app running. There is a property of CastReceiverOptions called disableIdleTimeout that can be set.

const options = new cast.framework.CastReceiverOptions();
options.disableIdleTimeout = true;

const instance = cast.framework.CastReceiverContext.getInstance();
instance.start(options);

With this set to true, the receiver no longer times out after 5 minutes.

like image 158
Brad Avatar answered Oct 02 '22 08:10

Brad