mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2026-04-22 08:00:21 +00:00
Added better console logs
This commit is contained in:
@@ -5,7 +5,7 @@ var sendMessage = function(method, params) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var id = callbacks_ids++;
|
||||
callbacks[id] = {'resolve': resolve, 'reject': reject};
|
||||
|
||||
|
||||
common.naclModule.postMessage({
|
||||
'callbackId': id,
|
||||
'method': method,
|
||||
@@ -19,9 +19,9 @@ function handleMessage(msg) {
|
||||
callbacks[msg.data.callbackId][msg.data.type](msg.data.ret);
|
||||
delete callbacks[msg.data.callbackId]
|
||||
} else { // else, it's just info, or an event
|
||||
console.log(msg.data);
|
||||
console.log('%c[handleMessage]', 'color:gray;', 'Message data: ', msg.data)
|
||||
if(msg.data === 'streamTerminated') { // if it's a recognized event, notify the appropriate function
|
||||
$('#loadingSpinner').css('display', 'none'); // This is a fallback for RTSP handshake failing, which immediately terminates the stream.
|
||||
$('#loadingSpinner').css('display', 'none'); // This is a fallback for RTSP handshake failing, which immediately terminates the stream.
|
||||
$('body').css('backgroundColor', '#282C38');
|
||||
|
||||
api.refreshServerInfo().then(function (ret) { // refresh the serverinfo to acknowledge the currently running app
|
||||
|
||||
Reference in New Issue
Block a user