@using VideoStudy.Shared
@if (VideoInfo != null) {
@VideoInfo.Title
@VideoInfo.Author @VideoInfo.Duration.ToString(@"hh\:mm\:ss")
}
@code { [Parameter] public EventCallback OnVideoUrlChanged { get; set; } [Parameter] public EventCallback OnStart { get; set; } [Parameter] public bool IsProcessing { get; set; } [Parameter] public VideoInfo? VideoInfo { get; set; } [Inject] YouTubeService YouTubeService { get; set; } = default!; private string VideoUrl { get; set; } = ""; private async Task FetchInfo() { if (string.IsNullOrWhiteSpace(VideoUrl)) return; await OnVideoUrlChanged.InvokeAsync(VideoUrl); } private async Task StartProcessing() { await OnStart.InvokeAsync(); } }