locked
Error:Sys.InvalidOperationException: MediaError error #4001 in control 'Xaml1': AG_E_NETWORK_ERROR RRS feed

  • Question

  • hi, 

     I am getting this error when i am filling the Source (Http Url ) in MediaElement .source

    "    Error:Sys.InvalidOperationException: MediaError error #4001 in control 'Xaml1': AG_E_NETWORK_ERROR  "

    I have mention the code used in my application as below :

    page.xaml

    <Grid Grid.Row="0" Background="Black" Margin="125,130,395,352">

             <MediaElement x:Name="VideoElement" Cursor="Hand" />

    </Grid>

      page.xaml.cs

    Uri ur = new Uri(((Service.Segments)(((object[])(e.AddedItems))[0])).VideoPath);

    VideoElement.Source = ur;

     

    can anybody tell me, why it is showing such error.

    Friday, October 31, 2008 12:47 AM

Answers

  •  Give a break point at the Uri ur=....

    and then see what is the ur value that is assigned to the media element. The reason of this error is most likely the uri that is generated is wrong.

    Friday, October 31, 2008 12:54 AM

All replies

  •  Give a break point at the Uri ur=....

    and then see what is the ur value that is assigned to the media element. The reason of this error is most likely the uri that is generated is wrong.

    Friday, October 31, 2008 12:54 AM
  • I had the same problem and managed to solve it by copying the actual video file to the ClientBin folder within windows explorer.

     

    I hope it helps.

    Jas

    Wednesday, December 24, 2008 10:05 AM
  •  

    Thanks,I tried your solution now is working 

     

    Shakil Ahmed

    Karachi/Pakistan 

     

    Thursday, January 21, 2010 5:43 AM