public string Resolve(SharedMediaFileInfo fileInfo) { return String.Format(@" <media> <url type=""wmv"">{0}</url> </media>", SecurityElement.Escape(fileInfo.Path)); }
public void AddMedia(SharedMediaFileInfo info) { this.Items.Add(info); info.OwnerId = this.Id; this.lookup[info.SourceId] = info.Id; }
public string Resolve(SharedMediaFileInfo fileInfo) { this.Log("Resolve: " + fileInfo.Path); string type = "fp"; string url = progDB.VpidToStreamingUrl(fileInfo.SourceId); this.Log("Resolved to: " + url); StringWriter sw = new StringWriter(); XmlTextWriter writer = new XmlTextWriter(sw); writer.Formatting = Formatting.Indented; writer.WriteStartElement("media"); writer.WriteStartElement("url"); writer.WriteAttributeString("type", type); writer.WriteString(url); writer.WriteEndElement(); writer.WriteEndElement(); writer.Close(); string xml = sw.ToString(); this.Log("Resolved XML: " + xml); return xml; }
/// <summary> /// Resolves a given <see cref="T:MediaMallTechnologies.Plugin.SharedMediaFileInfo"/> /// if further logic is required /// to obtain the media URL or to include advertisement URLs, and returns XML information /// about these URLs. /// </summary> /// <param name="fileInfo">The <see cref="SharedMediaFileInfo"/> object that should be resolved.</param> /// <returns> /// The XML description of URLs for video playback. /// </returns> /// <remarks> /// The main video URL must include a "type" param that is either "wmp" (for Windows Media Player) /// or "<c>fp</c>" (for Flash Player) to indicate what type of player is used to display /// the given source media. The optional "startTime" param indicates a start time for the source media, /// in 100-nanoseconds. <b>_Note that the "startTime" param only works when the "type" is "wmp".</b> /// Advertisements must include the timestamp in /// 100-nanoseconds for when they should be shown, relative to the main media playback, and also include a "type" parameter. /// The XML format is as follows: /// <code> /// <![CDATA[ /// <media> /// <url type="wmp|fp" [startTime="100-nanos"]>...</url> /// <ad timestamp="100-nanos" type="wmp|fp">...</ad> /// <ad timestamp="100-nanos" type="wmp|fp">...</ad> /// </media> /// ]]> /// </code> /// The "type" parameter must be one of either "wmp" or "<c>fp</c>". The 100-nanoseconds /// parameters must be non-negative numerical values, and are expressed as <i>seconds</i> * 10^7. /// </remarks> public string Resolve(SharedMediaFileInfo fileInfo) { return(string.Format(@"<media><url type=""wmp"">{0}</url></media>", fileInfo.Path)); }
public void WhenIRetrieveChild1OfRootRSS(int num, string path) { WhenIBrowse(path); _fileInfo = (SharedMediaFileInfo) _payload.Items.Skip(num - 1).Take(1).Single(); }