Новый плеер
This commit is contained in:
@@ -31,20 +31,29 @@
|
||||
</MudItem>
|
||||
|
||||
<!-- Название и прогресс -->
|
||||
<MudStack AlignItems="AlignItems.Stretch" Class="flex-grow-1" Style="height: 100%;" Spacing="0">
|
||||
<MudStack Row AlignItems="AlignItems.Stretch" Class="flex-grow-1">
|
||||
<MudText Typo="Typo.body2" Style="font-weight: 500; line-height: 1.2;">@AudioPlayerService.CurrentTrackTitle</MudText>
|
||||
<MudSpacer />
|
||||
<MudText Typo="Typo.body2" Style="font-weight: 500; line-height: 1.2;">@AudioPlayerService.CurrentTimeString / @AudioPlayerService.TotalTimeString</MudText>
|
||||
</MudStack>
|
||||
<MudStack AlignItems="AlignItems.Stretch" Class="d-flex flex-grow-1 relative overflow-hidden align-center rounded-sm" Style="height: 50px;">
|
||||
<MudItem Class="absolute " style="top: 0; left: 0; right: 0; bottom: 0; z-index: 1;">
|
||||
<TrackProgress Value="@AudioPlayerService.CurrentProgress"
|
||||
Min="0" Max="100"
|
||||
Height="50"
|
||||
BufferValue="@_bufferValue"
|
||||
Color="Color.Primary"
|
||||
Icon=""
|
||||
Step="0.1"
|
||||
Opacity="0.3"
|
||||
Buffer
|
||||
ValueChanged="SeekTo" />
|
||||
</MudItem>
|
||||
|
||||
<MudSlider Value="@AudioPlayerService.CurrentProgress" Class="mt-n1" Min="0" Max="100" Size="Size.Small" ValueChanged="@((double newValue) => SeekTo(newValue))" Step="0.01" />
|
||||
<MudProgressLinear Color="Color.Primary" Buffer="true" Value="@AudioPlayerService.CurrentProgress" BufferValue="@_bufferValue" Class="my-7" />
|
||||
<TrackProgress Value="@AudioPlayerService.CurrentProgress"
|
||||
Min="0"
|
||||
Max="100"
|
||||
Color="Color.Primary"
|
||||
BufferValue="@_bufferValue" />
|
||||
<MudStack Row AlignItems="AlignItems.Center" Class="px-3 relative pointer-events-none" Style="z-index: 2; width: 100%;">
|
||||
<MudText Typo="Typo.body2" Style="font-weight: 600; text-shadow: 0px 0px 4px rgba(255,255,255,0.8);">
|
||||
@AudioPlayerService.CurrentTrackTitle
|
||||
</MudText>
|
||||
<MudSpacer />
|
||||
<MudText Typo="Typo.body2" Style="font-family: monospace; font-weight: 600;">
|
||||
@AudioPlayerService.CurrentTimeString / @AudioPlayerService.TotalTimeString
|
||||
</MudText>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
|
||||
<!-- Громкость -->
|
||||
@@ -58,14 +67,13 @@
|
||||
Color="Color.Default"
|
||||
OnClick="ToggleMute" />
|
||||
|
||||
@* Попавер с минимальной шириной *@
|
||||
<MudPopover Open="@_volumeIsOpen"
|
||||
AnchorOrigin="Origin.TopCenter"
|
||||
TransformOrigin="Origin.BottomCenter"
|
||||
Fixed="true"
|
||||
Fixed
|
||||
Class="pa-0 mt-n5"
|
||||
Style="height:120px; width: 10px; background-color: transparent !important; overflow: visible !important;">
|
||||
<MudProgressLinear Vertical="true" Color="Color.Primary" Size="Size.Medium" Value="@AudioPlayerService.CurrentVolume" />
|
||||
<MudProgressLinear Vertical Color="Color.Primary" Size="Size.Medium" Value="@AudioPlayerService.CurrentVolume" />
|
||||
|
||||
</MudPopover>
|
||||
</MudItem>
|
||||
|
||||
Reference in New Issue
Block a user