From 6085b2df0a18154b8cce065cc07c1b4d0a4847c8 Mon Sep 17 00:00:00 2001 From: Sven <40752681+NeoCoderMatrix86@users.noreply.github.com> Date: Mon, 28 Apr 2025 16:19:41 +0200 Subject: [PATCH] Update AudioPlayer.razor --- .../Shared/Audio/AudioPlayer.razor | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/AudioCuesheetEditor/Shared/Audio/AudioPlayer.razor b/AudioCuesheetEditor/Shared/Audio/AudioPlayer.razor index df921676..11224223 100644 --- a/AudioCuesheetEditor/Shared/Audio/AudioPlayer.razor +++ b/AudioCuesheetEditor/Shared/Audio/AudioPlayer.razor @@ -38,7 +38,11 @@ along with Foobar. If not, see { @String.Format("--{0}--{1}--", CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator, CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator) } - + + + @GetSliderTimeValue() + + @if (_playbackService.TotalTime.HasValue) { @_playbackService.TotalTime.Value.ToString("hh\\:mm\\:ss") @@ -68,8 +72,6 @@ along with Foobar. If not, see @code { - //TODO: Slider should display the value in tooltip (like vlc does) - double sliderValue; HotKeysContext? hotKeysContext; @@ -135,4 +137,17 @@ along with Foobar. If not, see } InvokeAsync(StateHasChanged); } + + string GetSliderTimeValue() + { + var time = sliderValue * _playbackService.TotalTime / 100.0; + if (time.HasValue) + { + return time.Value.ToString(@"hh\:mm\:ss"); + } + else + { + return string.Empty; + } + } }