WebPlayer bug or is something wrong with my code?

Hey Everyone,

Can someone explain to me what is causing the following web player to scrunch up when in firefox but when in chrome or safari it works just fine? I just edited the HTML file so that the width and height is 100%.

FireFox 3.6.10
Chrome 6.0.472.63
Safari 4.0.5

Here are screen shots of what I am talking about

Firefox

Chrome

Thanks

Anyone?

Using their default generated code, and modifying the width/height values to 100%, I got Unity to display fine to fill the window. (albeit this was the code generated for 2.6.1)

Have you tried this in 3.0? I wonder if this is just a bug with Firefox as I tried this in IE and it works fine.

Here is the code im using maybe this will help.

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
	<head> 
		<title>Unity Web Player | sidestest</title> 
		<script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js"></script> 
		<script type="text/javascript"> 
		<!--
		function GetUnity() {
			if (typeof unityObject != "undefined") {
				return unityObject.getObjectById("unityPlayer");
			}
			return null;
		}
		if (typeof unityObject != "undefined") {
			var params = {
				disableContextMenu: true
			};
			unityObject.embedUnity("unityPlayer", "sidestest.unity3d", "100%", "100%", params);
		}
		-->
		</script> 
		<style type="text/css"> 
		<!--
		body 
        {
            margin: 0px;
            padding: 0px;
        
        }
        
        div.content 
        {
			margin: auto;
			width: 100%;
		}
        div#unityPlayer 
        {
			cursor: default;
			height: 768px;
			width: 1024px;
		}
        -->
		</style> 
	</head> 
	<body> 
		<div class="content"> 
			<div id="unityPlayer"> 
				<div class="missing"> 
					<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!"> 
						<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" /> 
					</a> 
				</div> 
			</div> 
		</div> 
	</body> 
</html>

Here is the resolution

<style type="text/css">
		<!--
        html { height: 100%;}
		body {min-height: 100%; height: 100%; margin: 0px; padding: 0px;}
        .content
        {
            height:100%;
            
        }
        -->
		</style>

Is this using Unity3’s default generated HTML or your own markup? If it’s the default generated HTML, perhaps you should file a bug report.

I used the code Unk posted. The width is being displayed correctly at 100% but the height is not (it is almost like 20%).

How can I fix this?

The copy of UnityObject.js hosted by the Unity site has a syntax error (missing or misplaced semicolon), likely due to the minification of the javascript. It’s broken on almost every website I’ve visited which has an embedded web player, which is pretty messed up.