- Home /
Full Screen Web Player?
Hey all,
I'm trying to run my web player full screen for a client. The folks over at HelloRacer do it but they're using the old embed code from R2.
This is what I'm trying to accomplish: http://www.helloracer.com/
I looked at UnityObject.js but, being a technical artist, emphasis on "artist", I couldn't figure it out.
The key line in the HTML generated by 3.0 seems to be:
if (typeof unityObject != "undefined") {
unityObject.embedUnity("unityPlayer", "desk_003.unity3d", 1920, 1080);
}
There are a lot of CSS variables in the HTML, but twizzling them doesn't produce the desired effect (a full screen player).
I'm sure I'm missing something somewhere. I'm using 3.1.0f4 Pro license.
Ideas?
-Spence.
If it helps, this is the page I'm working on:
http://lindsaydigital.com/clients/infZ/desk_003/desk_003.html
Answer by Maarten · Dec 03, 2010 at 10:03 PM
You can use '100%' instead of a number. This will set the full size.
Hmm. Not in my experience. When I replaced the X and Y resolutions with "100%" like this:
unityObject.embedUnity("unityPlayer", "desk_003.unity3d", 100%, 100%);
... it failed and displayed the "download Unity" badge.
Answer by jahroy · Apr 27, 2011 at 11:31 PM
Try adding height="100%" to the html element of your page. That solved my issue for Firefox and IE.
html {
padding: 0px;
margin: 0px;
height: 100%;
}
Answer by dingben · Mar 28, 2011 at 11:06 AM
100% does not set full screen but full window.
to go full screen, you need to use Screen.SetResolution(y,x,true) or Screen.fullScreen
Answer by bigkahuna · Dec 11, 2010 at 11:06 AM
Would someone mind posting an example html file? I tried replacing the pixel dimensions with "100%" and the width changes but the height doesn't.
@bigkahuna: try this:
if (typeof unityObject != "undefined") { unityObject.embedUnity("unityPlayer", "101210_pGroup_01.unity3d", "100%", "100%"); }
@spencer - I've already tried that. Worked in Safari, but didn't in Firefox nor I$$anonymous$$ Anyone have a working example for 3.x?
Well, LB, you're right. Huh. Seems the "100%" code works on Safari only. Weird. O$$anonymous$$, looking deeper.
Found a working example here: http://answers.unity3d.com/questions/25577/unity-3-0-webplayer-at-100
Answer by The_r0nin_temp · May 28, 2011 at 05:37 PM
I get the following error when attempting to login using my Unity Forums login name here. I have cleared all cookies and re-loged at the forums. I still get:
HTTP Status 401 - Authentication Failed: Unable to process claimed identity 'null'
type Status report
message Authentication Failed: Unable to process claimed identity 'null'
description This request requires HTTP authentication (Authentication Failed: Unable to process claimed identity 'null').
Apache Tomcat/6.0.32
Any help would be appreciated!
Your answer
Follow this Question
Related Questions
GUIText Help 1 Answer
Stopping WebPlayer execution from javascript 0 Answers
BCE0044: expecting }, found 'private'. PLEASE HELP!!!!! 2 Answers
Sphere cast thing help please!!!! 1 Answer