Skip to content

Commit

Permalink
Code (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyaboulton authored Dec 16, 2024
1 parent e92efb1 commit 8a5c1f1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions frontend/shared/AudioWave.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
animationId = requestAnimationFrame(updateVisualization);
}
$: maxPulseScale = 1 + (pulseIntensity * 10); // Scale from 1x to 3x based on intensity
</script>

<div class="gradio-webrtc-waveContainer">
Expand All @@ -75,6 +78,8 @@
class="pulse-ring"
style:background={pulse_color}
style:animation-delay={`${i * 0.4}s`}
style:--max-scale={maxPulseScale}
style:opacity={0.5 * pulseIntensity}
/>
{/each}
{/if}
Expand Down Expand Up @@ -167,13 +172,13 @@
}
@keyframes pulse {
0% {
transform: translate(-50%, -50%) scale(1);
opacity: 0.5;
}
100% {
transform: translate(-50%, -50%) scale(3);
opacity: 0;
0% {
transform: translate(-50%, -50%) scale(1);
opacity: 0.5;
}
100% {
transform: translate(-50%, -50%) scale(var(--max-scale, 3));
opacity: 0;
}
}
}
</style>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "hatchling.build"

[project]
name = "gradio_webrtc"
version = "0.0.22rc1"
version = "0.0.23"
description = "Stream images in realtime with webrtc"
readme = "README.md"
license = "apache-2.0"
Expand Down

0 comments on commit 8a5c1f1

Please sign in to comment.