Open jaruba opened 9 years ago
With nw.js 0.13 on its way, maybe we can take advantage of chrome.power (https://developer.chrome.com/apps/power) in order to handle this.
If it were to be implemented, here's where its being done on electron: https://github.com/atom/electron/blob/master/atom/browser/api/atom_api_power_monitor.h https://github.com/atom/electron/blob/master/atom/browser/api/atom_api_power_monitor.cc https://github.com/atom/electron/blob/master/atom/browser/api/atom_api_power_save_blocker.h https://github.com/atom/electron/blob/master/atom/browser/api/atom_api_power_save_blocker.cc
Although I'm not sure how helpful this is to have, its just worth a look.
Although I'm not sure how helpful this is to have, its just worth a look.
All apps should have the possibility to inhibit sleep. I've also seen an issue reported to an app made with NW.js that casting a video to the TV would break when monitor sleep started.
All HTTP servers are stopped in this time and all connected clients disconnect. These are just 2 cases I mentioned but there are certainly more reasons for something like this.
Also, the WebGL context is lost during monitor sleep..
I really hope this feature was not totally forgotten about..
RSATom/WebChimera.js is currently the best choice for video playback in NW.js apps, but it has a major problem, it cannot stop the monitor from going into sleep mode while it's playing. (as any normal player would)
This has also been requested for Electron and has been implemented: https://github.com/atom/electron/blob/master/docs/api/power-save-blocker.md
Will NW.js also implement something that can inhibit monitor sleep in the API?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.