mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
Add some utils fns, add moshi to cookbook, fix querySelector, support async functions in ReplyOnPause (#29)
* add * add code
This commit is contained in:
@@ -41,8 +41,7 @@
|
||||
|
||||
function updateBars() {
|
||||
analyser.getByteFrequencyData(dataArray);
|
||||
|
||||
const bars = document.querySelectorAll('.box');
|
||||
const bars = document.querySelectorAll('.waveContainer .box');
|
||||
for (let i = 0; i < bars.length; i++) {
|
||||
const barHeight = (dataArray[i] / 255) * 2; // Amplify the effect
|
||||
bars[i].style.transform = `scaleY(${Math.max(0.1, barHeight)})`;
|
||||
|
||||
Reference in New Issue
Block a user