Skip to main content

Microsoft Silverlight

Unanswered Question Media Errors in FireFox 3RSS Feed

(0)

sharkboy
sharkboy

Member

Member

4 points

6 Posts

Media Errors in FireFox 3

I think this bug is related to the way the browsers calculate the size of a download but I consider it a Silverlight bug because behavior across browsers is not consistent.

 I have a page that pulls media files from the database. It checks to see whether a user has download rights for a file before it can be downloaded. 

Users have the option of streaming the song via Silverlight before downloading it.

The MediaSource property of a MediaElement is set to a URL such as "DownloadFile.aspx?file=123". 

I had the following bug in my in DownloadFile.aspx:

 I had buffer = false but did not manually specify a "Content-Length" header. 

As a result the Silverlight was unable to play the media file in Firefox 3. The same code works on IE 7. Once I added the "Content-Length" header it worked in both browsers.

I guess my expectation was consistent behavior across browsers but since it is not clear what is handled by the browser and what is handled by Silverlight, it makes some of this stuff difficult to debug.

 

IanBlackburn
IanBlack...

Contributor

Contributor

2333 points

371 Posts

Re: Media Errors in FireFox 3

Nice catch!

It may be hard for Silverlight to deal with this though, since it uses the Browser Http stack and so as you rightly say it's down to how the browser calculcates the size of the download.  Although perhaps better exception handling in Silverlight could help in this instance...

I am not sure if there are ever any plans for Silverlight to have it's own http networking stack, but I guess it's a possibility for the future...

(If this has answered your question, "Mark as Answer" - many thanks)

Cheers

Ian Blackburn
SilverlightForBusiness.net
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities