mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2026-06-19 07:10:59 +00:00
Add warning if no key frames can be received in 10 seconds
This commit is contained in:
+1
-1
Submodule moonlight-common-c updated: f2c1d03d8e...9e4651e460
+13
-5
@@ -42,13 +42,21 @@ function handleMessage(msg) {
|
|||||||
|
|
||||||
// Show a termination snackbar message if the termination was unexpected
|
// Show a termination snackbar message if the termination was unexpected
|
||||||
var errorCode = parseInt(msg.data.replace('streamTerminated: ', ''));
|
var errorCode = parseInt(msg.data.replace('streamTerminated: ', ''));
|
||||||
if (errorCode !== 0) {
|
switch (errorCode) {
|
||||||
if (errorCode === -100) { // ML_ERROR_NO_VIDEO_TRAFFIC
|
case 0: // ML_ERROR_GRACEFUL_TERMINATION
|
||||||
|
break;
|
||||||
|
|
||||||
|
case -100: // ML_ERROR_NO_VIDEO_TRAFFIC
|
||||||
snackbarLogLong("No video received from host. Check the host PC's firewall and port forwarding rules.");
|
snackbarLogLong("No video received from host. Check the host PC's firewall and port forwarding rules.");
|
||||||
}
|
break;
|
||||||
else {
|
|
||||||
|
case -101: // ML_ERROR_NO_VIDEO_FRAME
|
||||||
|
snackbarLogLong("Your network connection isn't performing well. Reduce your video bitrate setting or try a faster connection.");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
snackbarLogLong("Connection terminated");
|
snackbarLogLong("Connection terminated");
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
api.refreshServerInfo().then(function(ret) {
|
api.refreshServerInfo().then(function(ret) {
|
||||||
|
|||||||
Reference in New Issue
Block a user