Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Media Errors in FireFox 3
1 replies. Latest Post by IanBlackburn on November 11, 2008.
(0)
sharkboy
Member
4 points
6 Posts
11-10-2008 10:29 PM |
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.
IanBlack...
Contributor
2333 points
371 Posts
11-11-2008 2:45 AM |
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...