diff --git a/demo/browser.js b/demo/browser.js index 931d141d..36f7f1cf 100644 --- a/demo/browser.js +++ b/demo/browser.js @@ -238,6 +238,7 @@ async function processImage(input) { // just initialize everything and call main function async function detectVideo() { + config.videoOptimized = true; document.getElementById('samples').style.display = 'none'; document.getElementById('canvas').style.display = 'block'; const video = document.getElementById('video'); @@ -257,6 +258,7 @@ async function detectVideo() { // just initialize everything and call main function async function detectSampleImages() { + config.videoOptimized = false; ui.baseFont = ui.baseFontProto.replace(/{size}/, `${1.2 * ui.columns}rem`); ui.baseLineHeight = ui.baseLineHeightProto * ui.columns; document.getElementById('canvas').style.display = 'none'; diff --git a/demo/menu.js b/demo/menu.js index 87934d4a..cb7bf41f 100644 --- a/demo/menu.js +++ b/demo/menu.js @@ -282,7 +282,7 @@ class Menu { ctx.fillStyle = gradient; ctx.fillRect(i * width, 0, width - 4, canvas.height); ctx.fillStyle = theme.background; - ctx.font = `${width / 1.4}px "Segoe UI"`; + ctx.font = `${width / 1.5}px "Segoe UI"`; ctx.fillText(Math.round(values[i]), i * width + 1, canvas.height - 1, width - 1); } }