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

May 3, 2011 at 10: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 microsoft-smf-bin-2.2011.0410.1.zip download)?

Thanks for any help,

Jeff

Coordinator
May 3, 2011 at 11:20 PM

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

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

Regards,

Tim