Skip to content

Commit 6b3b2a2

Browse files
committed
chrome 122
1 parent 1361ac1 commit 6b3b2a2

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

editor/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,13 @@ function setURL() {
642642
$('loadingContainer').style.display = 'none';
643643
const s = $('startContainer');
644644
s.style.display = '';
645+
646+
const mayBeChrome122 = (navigator.userAgentData?.brands || []).findIndex(e => e.version === '122') >= 0;
647+
if (mayBeChrome122) {
648+
const chrome122Issue = $('chrome122issue');
649+
chrome122Issue.style.display = '';
650+
}
651+
645652
s.addEventListener('click', function() {
646653
s.style.display = 'none';
647654
main();

html5bytebeat.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262
#loadingContainer,
263263
#startContainer {
264264
display: flex;
265+
flex-direction: column;
265266
justify-content: center;
266267
align-items: center;
267268
z-index: 1000;
@@ -292,6 +293,17 @@
292293
background-color: rgba(0, 0, 0, 0.9);
293294
color: #0F0
294295
}
296+
#chrome122issue {
297+
margin: 1em;
298+
padding: 1em;
299+
border-radius: 1em;
300+
background-color: red;
301+
color: white;
302+
}
303+
#chrome122issue a {
304+
text-decoration: underline;
305+
color: cyan;
306+
}
295307
@media screen and (max-width: 700px) {
296308
#startButton {
297309
font-size: 48pt;
@@ -346,7 +358,10 @@
346358
</div>
347359
</div>
348360
<div id="startContainer" style="display: none;">
349-
<div id="startButton">play ▶</div>
361+
<div id="startButton">play ▶</div>
362+
<div id="chrome122issue" style="display:none;">
363+
<div>Chrome v122 is broken. Please vote to get this fixed ASAP <a href="https://issues.chromium.org/issues/324293899">here</a>.</div>
364+
</div>
350365
</div>
351366
<div id="loadingContainer">
352367
<div>loading...</div>

src/ByteBeatNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ class BeatWorkletProcessor extends AudioWorkletProcessor {
5353
}
5454
5555
process(inputs, outputs, parameters) {
56-
if (outputs.length > 0) {
56+
//if (outputs.length > 0) {
5757
this.byteBeat.process(outputs[0][0].length, outputs[0][0], outputs[0][1]);
58-
}
58+
//}
5959
return true;
6060
}
6161
}

0 commit comments

Comments
 (0)