mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
fixed issue with 4K streaming
This commit is contained in:
parent
6b97487148
commit
b5d2a20146
@ -29,7 +29,7 @@
|
|||||||
<select id="selectResolution">
|
<select id="selectResolution">
|
||||||
<option value="1280:720">1280x720</option>
|
<option value="1280:720">1280x720</option>
|
||||||
<option value="1920:1080">1920x1080</option>
|
<option value="1920:1080">1920x1080</option>
|
||||||
<option value="2160:3840">2160x3840</option>
|
<option value="3840:2160">4K</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="mdl-select">
|
<div class="mdl-select">
|
||||||
|
@ -89,12 +89,12 @@ function hideAllWorkflowDivs() {
|
|||||||
// do NOT hide the nacl module. you can't interact with it then
|
// do NOT hide the nacl module. you can't interact with it then
|
||||||
}
|
}
|
||||||
|
|
||||||
// pair to the given hostname or IP
|
// pair to the given hostname or IP. Returns whether pairing was successful.
|
||||||
function pairTo(targetHost) {
|
function pairTo(targetHost) {
|
||||||
if(!pairingCert) {
|
if(!pairingCert) {
|
||||||
snackbarLog('ERROR: cert has not been generated yet. Is NaCL initialized?');
|
snackbarLog('ERROR: cert has not been generated yet. Is NaCL initialized?');
|
||||||
console.log("User wants to pair, and we still have no cert. Problem = very yes.");
|
console.log("User wants to pair, and we still have no cert. Problem = very yes.");
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!api) {
|
if(!api) {
|
||||||
@ -102,7 +102,7 @@ function pairTo(targetHost) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(api.paired) {
|
if(api.paired) {
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#pairButton').html('Pairing...');
|
$('#pairButton').html('Pairing...');
|
||||||
@ -124,7 +124,7 @@ function pairTo(targetHost) {
|
|||||||
$('#pairButton').html('Pairing Failed');
|
$('#pairButton').html('Pairing Failed');
|
||||||
$('#pairingDialogText').html('Error: failed to pair with ' + targetHost + '. failure reason unknown.');
|
$('#pairingDialogText').html('Error: failed to pair with ' + targetHost + '. failure reason unknown.');
|
||||||
}
|
}
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#pairButton').html('Paired');
|
$('#pairButton').html('Paired');
|
||||||
@ -133,7 +133,7 @@ function pairTo(targetHost) {
|
|||||||
|
|
||||||
var hostSelect = $('#selectHost')[0];
|
var hostSelect = $('#selectHost')[0];
|
||||||
for(var i = 0; i < hostSelect.length; i++) { // check if we already have the host.
|
for(var i = 0; i < hostSelect.length; i++) { // check if we already have the host.
|
||||||
if (hostSelect.options[i].value == targetHost) return;
|
if (hostSelect.options[i].value == targetHost) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var opt = document.createElement('option');
|
var opt = document.createElement('option');
|
||||||
@ -142,9 +142,11 @@ function pairTo(targetHost) {
|
|||||||
$('#selectHost').append(opt);
|
$('#selectHost').append(opt);
|
||||||
hosts.push(targetHost);
|
hosts.push(targetHost);
|
||||||
saveHosts();
|
saveHosts();
|
||||||
|
return true;
|
||||||
}, function (failedPairing) {
|
}, function (failedPairing) {
|
||||||
snackbarLog('Failed pairing to: ' + targetHost);
|
snackbarLog('Failed pairing to: ' + targetHost);
|
||||||
console.log('pairing failed, and returned ' + failedPairing);
|
console.log('pairing failed, and returned ' + failedPairing);
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -428,7 +430,7 @@ function updateDefaultBitrate() {
|
|||||||
} else { // 720, 60fps
|
} else { // 720, 60fps
|
||||||
$('#bitrateSlider')[0].MaterialSlider.change('10');
|
$('#bitrateSlider')[0].MaterialSlider.change('10');
|
||||||
}
|
}
|
||||||
} else if (res.lastIndexOf("2160:3840", 0) === 0) {
|
} else if (res.lastIndexOf("3840:2160", 0) === 0) {
|
||||||
if (frameRate.lastIndexOf("30", 0) === 0) { // 2160p, 30fps
|
if (frameRate.lastIndexOf("30", 0) === 0) { // 2160p, 30fps
|
||||||
$('#bitrateSlider')[0].MaterialSlider.change('40');
|
$('#bitrateSlider')[0].MaterialSlider.change('40');
|
||||||
} else { // 2160p, 60fps
|
} else { // 2160p, 60fps
|
||||||
|
Loading…
x
Reference in New Issue
Block a user