Новый плеер
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using PlaylistShared.Shared.DTO
|
||||
@inject IAudioPlayerService AudioPlayerService
|
||||
|
||||
<MudItem @onmouseenter="HandleMouseEnter"
|
||||
@onmouseleave="HandleMouseLeave"
|
||||
style="position: relative; display: inline-block; cursor: pointer; border-radius: 4px; overflow: hidden;">
|
||||
|
||||
<MudImage Src="@CoverUrl.FormatCoverUrl(Width, Height)" Height="@Height" Width="@Width" Class="rounded" Style="display: block;" />
|
||||
<MudImage Src="@Track?.CoverUri.FormatCoverUrl(Width, Height)" Height="@Height" Width="@Width" Class="rounded" Style="display: block;" />
|
||||
|
||||
@if (CanPlay && (_isHovered || IsCurrentTrackPlaying))
|
||||
{
|
||||
@@ -20,8 +21,7 @@
|
||||
</MudItem>
|
||||
|
||||
@code {
|
||||
[Parameter] public string CoverUrl { get; set; } = string.Empty;
|
||||
[Parameter] public string TrackTitle { get; set; } = string.Empty;
|
||||
[Parameter] public YandexTrack? Track { get; set; } = null;
|
||||
[Parameter] public string TrackId { get; set; } = string.Empty;
|
||||
[Parameter] public int Height { get; set; } = 50;
|
||||
[Parameter] public int Width { get; set; } = 50;
|
||||
@@ -53,8 +53,7 @@
|
||||
await AudioPlayerService.LoadAndPlayAsync(
|
||||
trackId: TrackId,
|
||||
playlistShareToken: playlistShareToken,
|
||||
title: TrackTitle,
|
||||
coverUrl: CoverUrl);
|
||||
track: Track);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user