mp4 h.264 outside ClientBin

Aug 28, 2011 at 6:18 PM

Hi all,

I'm trying to use this app with video i've recorded.

My problem is about directory and video format file :

  • WMV :
    • file inside ClientBin : working
    • file outside ClientBin : working
    • file on another website : working
  • MP4 (H.264) :
    • file inside ClientBin : working
    • file outside ClientBin : not working
    • file on another website : not working

i just wonder why for the mp4 file format, it can't be loaded as well as a wmv file when on the file i write :

<asp:Silverlight ID="Xaml1" runat="server"
    Width="455" Height="305" InitParameters="m=" />

In addition, i have this error with the mp4 file trying to be loaded :

Erreur : Sys.InvalidOperationException: MediaError error #4001 in control 'ctl00_CPHMain_Xaml1': AG_E_NETWORK_ERROR

If someone has a hint or a solution, i searched already on this forum without success.

Thanks for any help :-)

Aug 28, 2011 at 8:04 PM

Damn, i was probably tired :)

The problem was because my IIS webserver doesn't have MIME type for mp4 so can't allow access to such file until i create the MIME type in it.

Sep 22, 2011 at 3:20 AM
Edited Sep 22, 2011 at 3:32 AM

I have the same problem (playing MP4 on another website in silverlight).  I added a mime type for .mp4 as 'video/mp4' to my IIS webserver (7.5), but still get the same error.  If i put the http address of the mp4 directly in the browse, I get a prompt to download the file, so at least the URL is correct.  Anything else I can check?

-- Edit --

Problem solved by browsing to the .html file that loads the silverlight XAP file in IIS, as opposed to the test html page that is generated in bin/debug.  Looks like video only works when the silverlight client is hosted in IIS, regardless of whether the video is hosted in IIS.