Compare commits

...

1 Commits

Author SHA1 Message Date
StyleZhang
dbcf42a47f fix voice input in safari 2023-07-10 09:37:02 +08:00

View File

@@ -56,7 +56,10 @@ const VoiceInput = ({
const y = (v - 128) / 50 * canvas.height
ctx.moveTo(x, 16)
ctx.roundRect(x, 16 - y, 2, y, [1, 1, 0, 0])
if (ctx.roundRect)
ctx.roundRect(x, 16 - y, 2, y, [1, 1, 0, 0])
else
ctx.rect(x, 16 - y, 2, y)
ctx.fill()
x += 3
}