/// <summary> /// Gets the URL for a thumbnail with the specified size. /// </summary> /// <param name="vimeoId">The ID of the video.</param> /// <param name="size">The size of the desired thumbnail.</param> public static string GetVimeoThumbnail(this string vimeoId, VimeoThumbnail size) { VimeoVideo video = VimeoHelpers.GetCachedVideoById(vimeoId); if (video == null) return null; switch (size) { case VimeoThumbnail.Small: return video.ThumbnailSmall; case VimeoThumbnail.Medium: return video.ThumbnailMedium; default: return video.ThumbnailLarge; } }
/// <summary> /// Gets the URL for a thumbnail with the specified size. /// </summary> /// <param name="vimeoId">The ID of the video.</param> /// <param name="size">The size of the desired thumbnail.</param> public static string GetVimeoThumbnail(this string vimeoId, VimeoThumbnail size) { VimeoVideo video = VimeoHelpers.GetCachedVideoById(vimeoId); if (video == null) { return(null); } switch (size) { case VimeoThumbnail.Small: return(video.ThumbnailSmall); case VimeoThumbnail.Medium: return(video.ThumbnailMedium); default: return(video.ThumbnailLarge); } }
/// <summary> /// Gets the URL for a thumbnail with the specified size. /// </summary> /// <param name="vimeoId">The ID of the video.</param> /// <param name="size">The size of the desired thumbnail.</param> public static string GetVimeoThumbnail(this int vimeoId, VimeoThumbnail size) { return(GetVimeoThumbnail(vimeoId + "", size)); }
/// <summary> /// Gets the URL for a thumbnail with the specified size. /// </summary> /// <param name="vimeoId">The ID of the video.</param> /// <param name="size">The size of the desired thumbnail.</param> public static string GetVimeoThumbnail(this int vimeoId, VimeoThumbnail size) { return GetVimeoThumbnail(vimeoId + "", size); }