Thursday, October 1, 2009

Code: Silverlight Video Player Not Displaying In Firefox

I ran into an issue today where the Silverlight video player on my web page would display in IE and Opera but not Firefox or Chrome.  The issue is with how the browsers handle the height and width specifications on the object tag.  If the html item that contains the object tag does not have a height specified in pixels, then the object tag must.

So changing my code from

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" 
width="100%" height="100%" id="slp">

to:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" 
width="400px" height="400px" id="slp">



resolved the issue.