Spaces:
Runtime error
Runtime error
Ron Au
commited on
Commit
·
0ae2e26
1
Parent(s):
27a17c1
fix(ui): Trim handle animation to sync with audio
Browse files
source/ui/src/lib/Notes.svelte
CHANGED
|
@@ -90,7 +90,10 @@ const keyDown = (event: KeyboardEvent): void => {
|
|
| 90 |
tabindex="0"
|
| 91 |
>
|
| 92 |
<audio bind:currentTime bind:duration bind:paused src={$audioBlob} />
|
| 93 |
-
<div
|
|
|
|
|
|
|
|
|
|
| 94 |
{#if paused}
|
| 95 |
<img
|
| 96 |
class="play-button"
|
|
|
|
| 90 |
tabindex="0"
|
| 91 |
>
|
| 92 |
<audio bind:currentTime bind:duration bind:paused src={$audioBlob} />
|
| 93 |
+
<div
|
| 94 |
+
class="handle"
|
| 95 |
+
style:transform="translate({Math.min(imageWidth * (currentTime / (duration - 0.9)), imageWidth)}px, -2%)"
|
| 96 |
+
/>
|
| 97 |
{#if paused}
|
| 98 |
<img
|
| 99 |
class="play-button"
|