Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 20th, 2013  |  syntax: None  |  size: 0.91 KB  |  views: 216  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED : HRESULT - 0xC00D36C4
  2.        
  3. <MediaElement x:Name="media" AutoPlay="true" Width="300" Height="300"
  4.               Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Margin="350,300,350,100" MediaOpened="media_MediaOpened"  MediaFailed="media_MediaFailed" />
  5.        
  6. protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
  7.     {
  8.         var item = (ESPNHelper.VideoGallery)navigationParameter;
  9.         media.Source = item.VideoWebUrl;
  10.         media.Play();
  11.  
  12.     }
  13.  
  14. private void media_MediaOpened(object sender, RoutedEventArgs e)
  15.     {
  16.         txtStatus.Text = "Total Duration is " + media.NaturalDuration.TimeSpan.Hours + ":" + media.NaturalDuration.TimeSpan.Minutes + ":" + media.NaturalDuration.TimeSpan.Seconds;
  17.     }
  18.  
  19.     private void media_MediaFailed(object sender, ExceptionRoutedEventArgs e)
  20.     {
  21.         txtStatus.Text = "Playback failed";
  22.     }