mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
Code (#40)
This commit is contained in:
@@ -64,6 +64,9 @@
|
|||||||
|
|
||||||
animationId = requestAnimationFrame(updateVisualization);
|
animationId = requestAnimationFrame(updateVisualization);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: maxPulseScale = 1 + (pulseIntensity * 10); // Scale from 1x to 3x based on intensity
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="gradio-webrtc-waveContainer">
|
<div class="gradio-webrtc-waveContainer">
|
||||||
@@ -75,6 +78,8 @@
|
|||||||
class="pulse-ring"
|
class="pulse-ring"
|
||||||
style:background={pulse_color}
|
style:background={pulse_color}
|
||||||
style:animation-delay={`${i * 0.4}s`}
|
style:animation-delay={`${i * 0.4}s`}
|
||||||
|
style:--max-scale={maxPulseScale}
|
||||||
|
style:opacity={0.5 * pulseIntensity}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
@@ -172,8 +177,8 @@
|
|||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
transform: translate(-50%, -50%) scale(3);
|
transform: translate(-50%, -50%) scale(var(--max-scale, 3));
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "gradio_webrtc"
|
name = "gradio_webrtc"
|
||||||
version = "0.0.22rc1"
|
version = "0.0.23"
|
||||||
description = "Stream images in realtime with webrtc"
|
description = "Stream images in realtime with webrtc"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "apache-2.0"
|
license = "apache-2.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user