Skip to content

Commit

Permalink
Version 74:
Browse files Browse the repository at this point in the history
* Updated logo to a newer version with cleaner edges.
* Edge browser detection updated in accordance with the new Chromium-based edge.
  • Loading branch information
bp2008 committed May 29, 2019
1 parent dd46847 commit 192a8a9
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 46 deletions.
11 changes: 5 additions & 6 deletions ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "73";
var ui_version = "74";
var bi_version = "%%VERSION%%";
var combined_version = ui_version + "-" + bi_version;
//if (!!navigator.userAgent.match(/ Android /))
Expand All @@ -51,10 +51,9 @@
if (!local_bi_session || (local_bi_session.length === 11 && local_bi_session.startsWith("%") && local_bi_session.endsWith("%") && local_bi_session.indexOf("SESSION") === 2))
local_bi_session = "";
var local_bi_session_arg = navigator.cookieEnabled ? "" : (local_bi_session ? "&session=" + local_bi_session : "");
var local_bi_session_argQ = navigator.cookieEnabled ? "" : (local_bi_session ? "?session=" + local_bi_session : "");
document.getElementById("ui3manifest").href = "ui3/manifest.json" + local_bi_session_argQ;
document.getElementById("ui3launcher1").href = "ui3/logos/launcher-icon48.png" + local_bi_session_argQ;
document.getElementById("ui3launcher2").href = "ui3/launcher-icon.png" + local_bi_session_argQ;
document.getElementById("ui3manifest").href = 'ui3/manifest.json?v=' + combined_version + local_bi_session_arg;
document.getElementById("ui3launcher1").href = 'ui3/logos/launcher-icon48.png?v=' + combined_version + local_bi_session_arg;
document.getElementById("ui3launcher2").href = 'ui3/launcher-icon.png?v=' + combined_version + local_bi_session_arg;
document.write('<link href="ui3/libs-ui3.css?v=' + combined_version + local_bi_session_arg + '" rel="stylesheet" />'
+ '<link href="ui3/ui3.css?v=' + combined_version + local_bi_session_arg + '" rel="stylesheet" />'
+ '<link href="ui3/ui3-local-overrides.css?v=' + combined_version + local_bi_session_arg + '" rel="stylesheet" />');
Expand Down Expand Up @@ -461,7 +460,7 @@
{
var src = imgs[i].getAttribute("mysrc");
if (src)
imgs[i].src = src + local_bi_session_argQ;
imgs[i].src = src + '?v=' + combined_version + local_bi_session_arg;
}
})();
document.write('<script src="ui3/libs-ui3.js?v=' + combined_version + local_bi_session_arg + '"><\/script>'
Expand Down
Binary file modified ui3/icons-src/logosrc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui3/launcher-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui3/logos/launcher-icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ui3/logos/launcher-icon128.webp
Binary file not shown.
Binary file modified ui3/logos/launcher-icon144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui3/logos/launcher-icon144.webp
Binary file not shown.
Binary file modified ui3/logos/launcher-icon168.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui3/logos/launcher-icon168.webp
Binary file not shown.
Binary file modified ui3/logos/launcher-icon192.webp
Binary file not shown.
Binary file modified ui3/logos/launcher-icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui3/logos/launcher-icon48.webp
Binary file not shown.
Binary file modified ui3/logos/launcher-icon72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui3/logos/launcher-icon72.webp
Binary file not shown.
Binary file modified ui3/logos/launcher-icon96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ui3/logos/launcher-icon96.webp
Binary file not shown.
19 changes: 7 additions & 12 deletions ui3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@
"name": "Blue Iris UI3",
"icons": [
{
"src": "logos/launcher-icon48.webp",
"sizes": "48x48",
"type": "image/webp"
},
{
"src": "logos/launcher-icon72.webp",
"sizes": "72x72",
"type": "image/webp"
},
{
"src": "logos/launcher-icon96.webp",
"sizes": "96x96",
"src": "logos/launcher-icon128.webp",
"sizes": "128x128",
"type": "image/webp"
},
{
Expand Down Expand Up @@ -47,6 +37,11 @@
"sizes": "96x96",
"type": "image/png"
},
{
"src": "logos/launcher-icon128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "logos/launcher-icon144.png",
"sizes": "144x144",
Expand Down
48 changes: 20 additions & 28 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@ function BrowserIsIE()
_browser_is_ie = /MSIE \d|Trident.*rv:/.test(navigator.userAgent) ? 1 : 0;
return _browser_is_ie == 1;
}
var _browser_is_edge = -1;
function BrowserIsEdge()
var _browser_is_edge_legacy = -1;
function BrowserIsEdgeLegacy()
{
if (_browser_is_edge === -1)
_browser_is_edge = window.navigator.userAgent.indexOf(" Edge/") > -1 ? 1 : 0;
return _browser_is_edge === 1;
if (_browser_is_edge_legacy === -1)
_browser_is_edge_legacy = window.navigator.userAgent.indexOf(" Edge/") > -1 ? 1 : 0;
return _browser_is_edge_legacy === 1;
}
function BrowserEdgeVersion()
{
if (BrowserIsEdge())
{
var m = window.navigator.userAgent.match(/ Edge\/([0-9\.,]+)/);
if (m)
return m[1];
}
var m = window.navigator.userAgent.match(/ Edge\/([0-9\.,]+)/);
if (!m)
m = window.navigator.userAgent.match(/ Edg\/([0-9\.,]+)/);
if (m)
return m[1];
return null;
}
var _browser_is_firefox = -1;
Expand Down Expand Up @@ -83,10 +82,10 @@ function DoUIFeatureDetection()
web_workers_supported = typeof Worker !== "undefined";
export_blob_supported = detectIfCanExportBlob();
fetch_supported = typeof fetch == "function";
if (fetch_supported && BrowserIsEdge())
if (fetch_supported && BrowserIsEdgeLegacy())
{
var edgeVersion = BrowserEdgeVersion();
if (edgeVersion && parseInt(edgeVersion) >= 17)
if (edgeVersion && parseInt(edgeVersion) >= 17 && parseInt(edgeVersion) < 19)
fetch_streams_cant_close_bug = true;
}
readable_stream_supported = typeof ReadableStream === "function";
Expand Down Expand Up @@ -494,7 +493,7 @@ function GetH264PlayerOptions()
}
function GetDefaultH264PlayerOption()
{
if (BrowserIsEdge())
if (BrowserIsEdgeLegacy())
return H264PlayerOptions.JavaScript;
else if (BrowserIsFirefox())
return H264PlayerOptions.JavaScript;
Expand Down Expand Up @@ -3043,7 +3042,7 @@ function DropdownBoxes()
if (ele.extendLeft)
{
left = (left + $ele.outerWidth()) - width;
if ((BrowserIsIE() || BrowserIsEdge()) && height > windowH)
if ((BrowserIsIE() || BrowserIsEdgeLegacy()) && height > windowH)
left -= 20; // Workaround for Edge/IE bug that renders scroll bar offscreen
}

Expand Down Expand Up @@ -17921,18 +17920,8 @@ function FPSCounter1()
while (!queue.isEmpty() && now - queue.peek() >= 1000)
queue.dequeue();
queue.enqueue(now);
if (queue.getLength == 1)
{
// No history. Return predicted FPS based on last frame loading time.
if (lastFrameLoadingTime <= 0)
lastFrameLoadingTime = 10000;
var newFps = 1000.0 / lastFrameLoadingTime;
if (newFps > 2)
newFps = 2;
return newFps.toFloat(1);
}
return queue.getLength();
}
};
}
function FPSCounter2()
{
Expand All @@ -17955,11 +17944,11 @@ function FPSCounter2()
}
/* return average */
return (ticksum / MAXSAMPLES);
}
};
this.getFPS = function (newtick)
{
return (1000 / CalcAverageTick(newtick)).toFloat(1);
}
};
}
///////////////////////////////////////////////////////////////
// Bit rate calculator ////////////////////////////////////////
Expand Down Expand Up @@ -21508,6 +21497,9 @@ function GetDevicePixelRatioTag()
var dpr = BI_GetDevicePixelRatio();
return dpr === 1 ? "" : ('<span class="dprTag">*' + dpr.toFloat(2) + '</span>');
}
/**
* @returns {Boolean} Returns true if the user agent suggests this browser is Chrome. Browsers may pretend to be chrome (MS Edge).
*/
function BrowserIsChrome()
{
return navigator.appVersion.indexOf(" Chrome/") > -1;
Expand Down

0 comments on commit 192a8a9

Please sign in to comment.