Vonage / vivid-3

Vonage's web UI 🎨 toolbelt
https://vivid.deno.dev
Apache License 2.0
50 stars 11 forks source link

fix(audio-player): keep paused state while dragging (VIV-1787) #1792

Closed YonatanKra closed 2 weeks ago

YonatanKra commented 3 weeks ago
codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (d61b119) to head (e96201a). Report is 994 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1792 +/- ## =========================================== Coverage 100.00% 100.00% =========================================== Files 123 337 +214 Lines 1562 5925 +4363 Branches 108 748 +640 =========================================== + Hits 1562 5925 +4363 ``` | [Flag](https://app.codecov.io/gh/Vonage/vivid-3/pull/1792/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Vonage/vivid-3/pull/1792/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage) | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

YonatanKra commented 3 weeks ago

I found two issues when testing this:

  1. The slider doesn't drag smoothly anymore

    Screen.Recording.2024-06-24.at.16.18.10.mov

  2. Audio player should pause while dragging

Thanks.

  1. This is also happening in the slider with no relation to the audio player (I did send an update that prevents changing the slider from two different locations).
  2. This is the main reason for the fix. The native HTML audio keeps playing while dragging.
RichardHelm commented 3 weeks ago

@YonatanKra Thanks, first issue is solved.

For the second, it depends on the implementation but most audio players (e.g. native <audio> in Chrome) pause the audio while being dragged and resume it afterwards. Otherwise you get choppy sound as it is dragged around