summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/share/js/kvm/stream.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js
index 80cc2deb..4d432fb4 100644
--- a/web/share/js/kvm/stream.js
+++ b/web/share/js/kvm/stream.js
@@ -51,8 +51,9 @@ function _JanusStreamer(__setActive, __setInactive, __setInfo) {
self.getResolution = function() {
let el_video = $("stream-video");
return {
- real_width: el_video.videoWidth,
- real_height: el_video.videoHeight,
+ // Разрешение видео или элемента
+ real_width: (el_video.videoWidth || el_video.offsetWidth),
+ real_height: (el_video.videoHeight || el_video.offsetHeight),
view_width: el_video.offsetWidth,
view_height: el_video.offsetHeight,
};