diff options
author | Devaev Maxim <[email protected]> | 2018-12-24 01:30:54 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-12-24 01:30:54 +0300 |
commit | a4e7808c5e5348442add6d40e007976f22fb65fc (patch) | |
tree | 329478623e03e5ad66f8333ea8941ce4beeaf7b8 /web | |
parent | 69a60b218633b201e06771650c2c36bbec7bac13 (diff) |
fixed browser detection
Diffstat (limited to 'web')
-rw-r--r-- | web/share/js/kvm/stream.js | 10 | ||||
-rw-r--r-- | web/share/js/tools.js | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 01ded5bc..c1ed4df5 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -87,14 +87,14 @@ function Streamer() { if (!__prev) { var path = "/streamer/stream?key=" + __client_key; - if (tools.browser.is_chrome || tools.browser.is_blink) { - // uStreamer fix for Blink https://bugs.chromium.org/p/chromium/issues/detail?id=527446 - tools.info("Stream: using advance_headers=1 to fix Blink MJPG bugs"); - path += "&advance_headers=1"; - } else if (tools.browser.is_safari || tools.browser.is_ios) { + if (tools.browser.is_safari || tools.browser.is_ios) { // uStreamer fix for WebKit tools.info("Stream: using dual_final_frames=1 to fix WebKit MJPG bugs"); path += "&dual_final_frames=1"; + } else if (tools.browser.is_chrome || tools.browser.is_blink) { + // uStreamer fix for Blink https://bugs.chromium.org/p/chromium/issues/detail?id=527446 + tools.info("Stream: using advance_headers=1 to fix Blink MJPG bugs"); + path += "&advance_headers=1"; } $("stream-image").src = path; $("stream-image").className = "stream-image-active"; diff --git a/web/share/js/tools.js b/web/share/js/tools.js index fbd5abc6..fe240d00 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -104,7 +104,7 @@ var tools = new function() { })(!window["safari"] || (typeof safari !== "undefined" && safari.pushNotification))); // eslint-disable-line no-undef // Chrome 1+ - var is_chrome = (!!window.chrome && !!window.chrome.webstore); + var is_chrome = !!window.chrome; // Blink engine detection var is_blink = ((is_chrome || is_opera) && !!window.CSS); |