Beispiel #1
0
 /// <summary>
 /// Generates the short url of the YouTube watch page for this video
 /// </summary>
 public static string GetShortUrl(this PlaylistVideo playlistVideo)
 {
     playlistVideo.GuardNotNull(nameof(playlistVideo));
     return($"https://youtu.be/{playlistVideo.Id}");
 }
Beispiel #2
0
 /// <summary>
 /// Generates the url of the embedded YouTube watch page for this video
 /// </summary>
 public static string GetEmbedUrl(this PlaylistVideo playlistVideo)
 {
     playlistVideo.GuardNotNull(nameof(playlistVideo));
     return($"https://www.youtube.com/embed/{playlistVideo.Id}");
 }
Beispiel #3
0
 /// <summary>
 /// Generates the regular url of the YouTube watch page for this video
 /// </summary>
 public static string GetRegularUrl(this PlaylistVideo playlistVideo)
 {
     playlistVideo.GuardNotNull(nameof(playlistVideo));
     return($"https://www.youtube.com/watch?v={playlistVideo.Id}");
 }