From 97fc2d4fa8f660fffbe9fc0d48373f929f81676b Mon Sep 17 00:00:00 2001 From: "R. Aidan Campbell" Date: Wed, 20 Apr 2016 10:53:34 -0400 Subject: [PATCH] Added frontend support for 4K - This does NOT give full 4K support. The NaCl plugin still needs to support it - Progress commit on #42 - Fixed bad default value for 720p bitrate: from 15Mbps to 5Mbps --- index.html | 5 +++-- static/js/index.js | 40 +++++++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 9617985..5040542 100644 --- a/index.html +++ b/index.html @@ -29,6 +29,7 @@
@@ -36,9 +37,9 @@ - 15 Mbps + 5 Mbps
- +
diff --git a/static/js/index.js b/static/js/index.js index 45a81ea..e3a2565 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -96,15 +96,15 @@ function pairTo(targetHost) { console.log("User wants to pair, and we still have no cert. Problem = very yes."); return; } - + if(!api) { api = new NvHTTP(targetHost, myUniqueid); } - + if(api.paired) { return; } - + $('#pairButton').html('Pairing...'); snackbarLog('Attempting pair to: ' + targetHost); var randomNumber = String("0000" + (Math.random()*10000|0)).slice(-4); @@ -112,7 +112,7 @@ function pairTo(targetHost) { $('#pairingDialogText').html('Please enter the number ' + randomNumber + ' on the GFE dialog on the computer. This dialog will be dismissed once complete'); pairingDialog.showModal(); console.log('sending pairing request to ' + targetHost + ' with random number ' + randomNumber); - + api.pair(randomNumber).then(function (paired) { if (!paired) { if (api.currentGame != 0) { @@ -196,30 +196,30 @@ function showApps() { console.log('Moved into showApps, but `api` did not initialize properly! Failing.'); return; } - + api.getAppList().then(function (appList) { if ($('#selectGame').has('option').length > 0 ) { // there was already things in the dropdown. Clear it, then add the new ones. // Most likely, the user just hit the 'retrieve app list' button again $('#selectGame').empty(); } - + appList.forEach(function (app) { $('#selectGame').append($('