public void PickVideo() { var path = GetFilePath(); if (path == null) { /* open dialog canceled */ return; } Persisted.LastSourceDirectory = Path.GetDirectoryName(path); SourceVideo.Open(path); }
public static SourceObject SourceVideoObject(SourceVideo v) { switch (v.Platform) { case Constants.YouTubeSource: return(new SourceObject { SourceId = v.Id, SourceName = v.Platform, Title = v.Title, Type = SourceObjectType.Video, Links = new List <SourceLink>() { new SourceLink() { Type = SourceLinkType.Analytics, Link = String.Format("https://www.youtube.com/analytics?o=U#fi=v-{0}", v.Id), }, new SourceLink() { Type = SourceLinkType.Content, Link = String.Format("https://www.youtube.com/watch?v={0}", v.Id), } }, PublishedStatus = v.PublishedStatus, PublishedAt = v.PublishedAt }); case Constants.FacebookSource: return(new SourceObject { SourceId = v.Id, SourceName = v.Platform, Title = v.Title, Type = SourceObjectType.Video, Links = GetLinksForFacebookObject(v), PublishedStatus = v.PublishedStatus, PublishedAt = v.PublishedAt }); default: throw new Exception("Platform not defined"); } }
private static List <SourceLink> GetLinksForFacebookObject(SourceVideo v) { var Links = new List <SourceLink>() { new SourceLink() { Type = SourceLinkType.Content, Link = String.Format("https://www.facebook.com/{0}/videos/{1}/", "feeonline", v.Id), } }; if (v.Title != null) { Links.Add( new SourceLink() { Type = SourceLinkType.Analytics, Link = String.Format("https://www.facebook.com/{0}/publishing_tools/?section=VIDEOS&filtering[0][field]=name&filtering[0][operator]=CONTAIN&filtering[0][value]={1}&sort[0]=created_time_descending", "feeonline", System.Uri.EscapeDataString(v.Title)), }); } return(Links); }
private void SourceVideo_Loaded(object sender, RoutedEventArgs e) { SourceVideo.Play(); }
private void SourceVideo_SourceUpdated(object sender, DataTransferEventArgs e) { SourceVideo.Play(); }