summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/stream.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-05-09 07:59:00 +0300
committerDevaev Maxim <[email protected]>2021-05-09 07:59:00 +0300
commit42601dae58c3a4fad9df153f3cf87a62b724b535 (patch)
tree52e83e9231d3f570abc03a531ba8bfebf7235060 /web/share/js/kvm/stream.js
parent8aa0162ba2ea5f847a64677c63412c7f580ac8d8 (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/stream.js')
-rw-r--r--web/share/js/kvm/stream.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js
index 970ac6ef..19ffbedf 100644
--- a/web/share/js/kvm/stream.js
+++ b/web/share/js/kvm/stream.js
@@ -176,6 +176,16 @@ export function Streamer() {
/************************************************************************/
+ self.getResolution = function() {
+ let el_image = $("stream-image");
+ return {
+ real_width: el_image.naturalWidth,
+ real_height: el_image.naturalHeight,
+ view_width: el_image.offsetWidth,
+ view_height: el_image.offsetHeight,
+ };
+ };
+
self.setJanusEnabled = function(enabled) {
__janus_enabled = (!!window.RTCPeerConnection && enabled);
tools.info("Stream: Janus WebRTC Gateway state:", __janus_enabled);