Создание своего прогресса загрузки трека
This commit is contained in:
@@ -39,6 +39,12 @@
|
||||
</MudStack>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- Громкость -->
|
||||
@@ -60,6 +66,7 @@
|
||||
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" />
|
||||
|
||||
</MudPopover>
|
||||
</MudItem>
|
||||
</MudStack>
|
||||
@@ -78,6 +85,7 @@
|
||||
// Громкость
|
||||
private bool _volumeIsOpen;
|
||||
private double _volumeBeforeMute;
|
||||
private double _bufferValue;
|
||||
|
||||
private bool _isPlayHovered;
|
||||
|
||||
@@ -125,7 +133,7 @@
|
||||
[JSInvokable]
|
||||
public async Task OnDownloadProgress(double second)
|
||||
{
|
||||
var x = second;
|
||||
_bufferValue = second / AudioPlayerService.TotalTime * 100;
|
||||
}
|
||||
|
||||
private async Task<bool> CheckAuthAsync()
|
||||
|
||||
Reference in New Issue
Block a user