mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-16 16:16:44 +00:00
Keep the display awake when streaming. Fixes #325
This commit is contained in:
parent
3f244ff8e1
commit
e0c4c01e44
@ -26,6 +26,7 @@
|
||||
"pointerLock",
|
||||
"system.network",
|
||||
"fullscreen",
|
||||
"power",
|
||||
"overrideEscFullscreen", {
|
||||
"socket": [
|
||||
"tcp-connect",
|
||||
|
@ -37,6 +37,9 @@ function handleMessage(msg) {
|
||||
$('#loadingSpinner').css('display', 'none'); // This is a fallback for RTSP handshake failing, which immediately terminates the stream.
|
||||
$('body').css('backgroundColor', '#282C38');
|
||||
|
||||
// Release our keep awake request
|
||||
chrome.power.releaseKeepAwake();
|
||||
|
||||
api.refreshServerInfo().then(function (ret) { // refresh the serverinfo to acknowledge the currently running app
|
||||
api.getAppList().then(function (appList) {
|
||||
appList.forEach(function (app) {
|
||||
@ -54,6 +57,9 @@ function handleMessage(msg) {
|
||||
} else if(msg.data === 'Connection Established') {
|
||||
$('#loadingSpinner').css('display', 'none');
|
||||
$('body').css('backgroundColor', 'black');
|
||||
|
||||
// Keep the display awake while streaming
|
||||
chrome.power.requestKeepAwake("display");
|
||||
} else if(msg.data.indexOf('ProgressMsg: ') === 0) {
|
||||
$('#loadingMessage').text(msg.data.replace('ProgressMsg: ', ''));
|
||||
} else if(msg.data.indexOf('TransientMsg: ') === 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user