public void PlayLiveVideo(ILiveContent content) { Play(new LiveVideoPlaylistItem() { Type = PlaylistItemType.Live, ContentId = content.Id, Title = content.Label }); }
public static string GetLabel(this INiconicoObject obj) { return(obj switch { IVideoContent video => video.Title, ILiveContent live => live.Title, ICommunity community => community.Name, IChannel channel => channel.Name, IMylist mylist => mylist.Name, ITag tag => tag.Tag, IUser user => user.Nickname, _ => throw new NotSupportedException(obj.ToString()) });