From 6b3b2a289629a0d2c25a7f7686fd72c31cd3cdc7 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Mon, 26 Feb 2024 11:09:37 -0800 Subject: [PATCH] chrome 122 --- editor/index.js | 7 +++++++ html5bytebeat.html | 17 ++++++++++++++++- src/ByteBeatNode.js | 4 ++-- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/editor/index.js b/editor/index.js index fc51e44..1c9d9d4 100644 --- a/editor/index.js +++ b/editor/index.js @@ -642,6 +642,13 @@ function setURL() { $('loadingContainer').style.display = 'none'; const s = $('startContainer'); s.style.display = ''; + + const mayBeChrome122 = (navigator.userAgentData?.brands || []).findIndex(e => e.version === '122') >= 0; + if (mayBeChrome122) { + const chrome122Issue = $('chrome122issue'); + chrome122Issue.style.display = ''; + } + s.addEventListener('click', function() { s.style.display = 'none'; main(); diff --git a/html5bytebeat.html b/html5bytebeat.html index 896fc9e..614edf1 100644 --- a/html5bytebeat.html +++ b/html5bytebeat.html @@ -262,6 +262,7 @@ #loadingContainer, #startContainer { display: flex; + flex-direction: column; justify-content: center; align-items: center; z-index: 1000; @@ -292,6 +293,17 @@ background-color: rgba(0, 0, 0, 0.9); color: #0F0 } +#chrome122issue { + margin: 1em; + padding: 1em; + border-radius: 1em; + background-color: red; + color: white; +} +#chrome122issue a { + text-decoration: underline; + color: cyan; +} @media screen and (max-width: 700px) { #startButton { font-size: 48pt; @@ -346,7 +358,10 @@
loading...
diff --git a/src/ByteBeatNode.js b/src/ByteBeatNode.js index 3325ff8..b077d17 100644 --- a/src/ByteBeatNode.js +++ b/src/ByteBeatNode.js @@ -53,9 +53,9 @@ class BeatWorkletProcessor extends AudioWorkletProcessor { } process(inputs, outputs, parameters) { - if (outputs.length > 0) { + //if (outputs.length > 0) { this.byteBeat.process(outputs[0][0].length, outputs[0][0], outputs[0][1]); - } + //} return true; } }