diff options
author | Devaev Maxim <[email protected]> | 2021-04-13 09:36:44 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2021-04-13 09:36:50 +0300 |
commit | 6de0ee0017df50d155a00d748ed2b676f8293655 (patch) | |
tree | a183e310397cdb4972ee312ea498c3d1dbece6f1 /web/share/js/kvm/stream.js | |
parent | a145e7295415fbf97d36170df9a7bc1f8d59255e (diff) |
simplified mouse code, fixed some bugs
Diffstat (limited to 'web/share/js/kvm/stream.js')
-rw-r--r-- | web/share/js/kvm/stream.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 2db37608..1414bda4 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -59,7 +59,6 @@ export function Streamer() { self.setState(__state_for_invisible); } }; - $("stream-window").resize_hook = __resizeHook; }; /************************************************************************/ @@ -83,11 +82,6 @@ export function Streamer() { } if (state && state.streamer) { - if (!window.ResizeObserver) { - // Browsers that don't support this API(on lower versions of iOS for example) - __resizeHook(); - } - if (!$("stream-quality-slider").activated) { wm.setElementEnabled($("stream-quality-slider"), true); if ($("stream-quality-slider").value !== state.streamer.encoder.quality) { @@ -255,19 +249,6 @@ export function Streamer() { }); }; - var __resizeHook = function() { - let rect = $("stream-image").getBoundingClientRect(); - let width = $("stream-image").naturalWidth; - let height = $("stream-image").naturalHeight; - let ratio = Math.min(rect.width / width, rect.height / height); - $("stream-box").stream_geometry = { - "x": Math.round((rect.width - ratio * width) / 2), - "y": Math.round((rect.height - ratio * height) / 2), - "width": Math.round(ratio * width), - "height": Math.round(ratio * height), - }; - }; - var __makeStringResolution = function(resolution) { return `${resolution.width}x${resolution.height}`; }; |