using System.ComponentModel; using System.Runtime.CompilerServices; namespace XFENewsApplication.Models; /// A video and its accompanying text, rendered by the article ListView. public class VideoArticlePart : ArticlePart, INotifyPropertyChanged { private string playbackError = string.Empty; public string Title { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public string PosterUrl { get; set; } = string.Empty; public string PageUrl { get; set; } = string.Empty; public string VideoId { get; set; } = string.Empty; /// Complete MP4 chapter sequence, used if the primary stream fails. public List FallbackSourceUrls { get; set; } = []; /// Alternative complete streams; each URL is a candidate, not a chapter. public List AlternativeSourceUrls { get; set; } = []; public string PlaybackError { get => playbackError; set { if (playbackError == value) return; playbackError = value; OnPropertyChanged(); } } public event PropertyChangedEventHandler? PropertyChanged; private void OnPropertyChanged([CallerMemberName] string? propertyName = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); }