/// <summary> /// Initialises the object with a given Video URL /// </summary> /// <param name="VideoUrl">The URL to a Youtube or Vimeo Video</param> public VideolizerVideo(string VideoUrl) { this.Url = VideoUrl; string vidId = YouTube.GetVideoId(VideoUrl); if (vidId != null) { //Its a Youtube Clip. this.Id = vidId; this.Type = VideoTypes.YouTube; this.EmbedUrl = "//www.youtube.com/embed/" + vidId; } else { vidId = Vimeo.GetVideoId(VideoUrl); if (vidId != null) { //Its a Vimeo Clip. this.Id = vidId; this.Type = VideoTypes.Vimeo; this.EmbedUrl = "//player.vimeo.com/video/" + vidId; } } }
public string vimeoVidId(string url) { return(Vimeo.GetVideoId(url)); }