Skip to content

Commit

Permalink
chrome 122
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Feb 26, 2024
1 parent 1361ac1 commit 6b3b2a2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
7 changes: 7 additions & 0 deletions editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
17 changes: 16 additions & 1 deletion html5bytebeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
#loadingContainer,
#startContainer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -346,7 +358,10 @@
</div>
</div>
<div id="startContainer" style="display: none;">
<div id="startButton">play ▶</div>
<div id="startButton">play ▶</div>
<div id="chrome122issue" style="display:none;">
<div>Chrome v122 is broken. Please vote to get this fixed ASAP <a href="https://issues.chromium.org/issues/324293899">here</a>.</div>
</div>
</div>
<div id="loadingContainer">
<div>loading...</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ByteBeatNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 6b3b2a2

Please sign in to comment.