mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 06:01:22 +00:00
Force minimum 600x600 screen resolution when requesting .
This commit is contained in:
@@ -141,6 +141,17 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
// Calculate optimal width/height for display
|
||||||
|
var optimal_width = window.innerWidth;
|
||||||
|
var optimal_height = window.innerHeight;
|
||||||
|
|
||||||
|
// Scale width/height to be at least 600x600
|
||||||
|
if (optimal_width < 600 || optimal_height < 600) {
|
||||||
|
var scale = Math.max(600 / optimal_width, 600 / optimal_height);
|
||||||
|
optimal_width *= scale;
|
||||||
|
optimal_height *= scale;
|
||||||
|
}
|
||||||
|
|
||||||
// Get entire query string, and pass to connect().
|
// Get entire query string, and pass to connect().
|
||||||
// Normally, only the "id" parameter is required, but
|
// Normally, only the "id" parameter is required, but
|
||||||
// all parameters should be preserved and passed on for
|
// all parameters should be preserved and passed on for
|
||||||
@@ -148,8 +159,8 @@
|
|||||||
|
|
||||||
var connect_string =
|
var connect_string =
|
||||||
window.location.search.substring(1)
|
window.location.search.substring(1)
|
||||||
+ "&width=" + window.innerWidth
|
+ "&width=" + optimal_width
|
||||||
+ "&height=" + window.innerHeight;
|
+ "&height=" + optimal_height;
|
||||||
|
|
||||||
// Add audio mimetypes to connect_string
|
// Add audio mimetypes to connect_string
|
||||||
GuacamoleUI.supportedAudio.forEach(function(mimetype) {
|
GuacamoleUI.supportedAudio.forEach(function(mimetype) {
|
||||||
|
Reference in New Issue
Block a user