Media is not opened

Aug 6, 2010 at 7:29 PM

I am working on a Silverlight application that originally used the Microsoft.SilverlightMediaFramework.Player v2.0.50727 and whenever the source was set the media would be opened.  I am changing the application to use Microsoft.SilverlightMediaFramework.Core  version 2.2010.705.1  and now the media sometimes opens but usually doesn't.

Here is my code when it worked:

myCore.MediaFailed += new EventHandler<ExceptionRoutedEventArgs>(myCore_MediaFailed);
myCore.Source = ClipUri;
myCore.MediaOpened += new RoutedEventHandler(myCore_MediaOpened);

Now I am using the following code and the event handler myCore_MediaOpened is never called.myCore.Playlist.Add(new PlaylistItem
MediaSource = ClipUri,
DeliveryMethod = Microsoft.SilverlightMediaFramework.Plugins.Primitives.DeliveryMethods.ProgressiveDownload,
Title = NowPlayingTitle
myCore.MediaOpened += new EventHandler(myCore_MediaOpened);
myCore.MediaFailed += new EventHandler<Microsoft.SilverlightMediaFramework.Core.CustomEventArgs<Exception>>(myCore_MediaFailed);
myCore.PlaylistChanged += new EventHandler<Microsoft.SilverlightMediaFramework.Core.CustomEventArgs<IList<PlaylistItem>>>(myCore_PlaylistChanged);

The PlayListChnaged event is called but there is never a request to the server that has my audio files.  When I use fiddler I never see the audio file request.

Any ideas about what might be going on here?


Aug 6, 2010 at 8:58 PM

The problem seems to be some sort of timing issue because if I put the following code into the PlayListChanged event handler then it works: