Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions AudioCuesheetEditor/Shared/Audio/AudioPlayer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ along with Foobar. If not, see
{
<MudText>@String.Format("--{0}--{1}--", CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator, CultureInfo.CurrentCulture.DateTimeFormat.TimeSeparator)</MudText>
}
<MudSlider T="double" Variant="Variant.Filled" Min="0" Max="100" Disabled="!_playbackService.PlaybackPossible" Value="sliderValue" ValueChanged="OnSliderValueChanged" />
<MudSlider T="double" Variant="Variant.Filled" Min="0" Max="100" Disabled="!_playbackService.PlaybackPossible" Value="sliderValue" ValueChanged="OnSliderValueChanged" ValueLabel>
<ValueLabelContent>
@GetSliderTimeValue()
</ValueLabelContent>
</MudSlider>
@if (_playbackService.TotalTime.HasValue)
{
@_playbackService.TotalTime.Value.ToString("hh\\:mm\\:ss")
Expand Down Expand Up @@ -68,8 +72,6 @@ along with Foobar. If not, see
</MudCard>

@code {
//TODO: Slider should display the value in tooltip (like vlc does)

double sliderValue;
HotKeysContext? hotKeysContext;

Expand Down Expand Up @@ -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;
}
}
}