From 64fd7b088eef424109b5e192048259072b52a415 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Mon, 4 Apr 2022 16:07:51 +0300 Subject: fixed nan in janus video tag --- web/share/js/kvm/stream.js | 5 +++-- 1 file 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, }; -- cgit v1.2.3