using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace XFENewsApplication.Models;
/// <summary>A video and its accompanying text, rendered by the article ListView.</summary>
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;
/// <summary>Complete MP4 chapter sequence, used if the primary stream fails.</summary>
public List<string> FallbackSourceUrls { get; set; } = [];
/// <summary>Alternative complete streams; each URL is a candidate, not a chapter.</summary>
public List<string> 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));
}
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace XFENewsApplication.Models;
/// <summary>A video and its accompanying text, rendered by the article ListView.</summary>
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;
/// <summary>Complete MP4 chapter sequence, used if the primary stream fails.</summary>
public List<string> FallbackSourceUrls { get; set; } = [];
/// <summary>Alternative complete streams; each URL is a candidate, not a chapter.</summary>
public List<string> 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));
}