Code change to support PlaylistItem.MarkerResource being changed to MarkerResources list

May 3, 2011 at 11:13 PM

Code I'm working from (media framework v2.2):

From my playlist XML file:

string capt = video.Attribute("captionFile") != null ? video.Attribute("captionFile").Value : string.Empty;

The code to create the PlaylistItem:

MarkerResources =  !string.IsNullOrEmpty(capt) ?
                   new MarkerResource() { Format = "TTAF1-DFXP", Source = new Uri(capt, UriKind.RelativeOrAbsolute) } : null

How does this need to be changed to in order to work in media framework v2.5 (the download)?

Thanks for any help,


May 4, 2011 at 12:20 AM

Jeff, MarkerResources is now a collection so you just need to call:

MarkerResources.Add(new MarkerResource() {...});