- Home /
webplayer Chrome not working, Firefox ok
Hi,
I've noticed that my Unity projects in my site www.astragamingstudios.tk don't work when I use Chrome. They do work when I use Firefox. Other Unity projects on other sites do work. My friend is experiencing the same on his laptop.
My site is a standard Google sites. I use Windows 7, Chrome Version 22.0.1229.79 m, Firefox 12.0.
Could it be the newer webplayer isn't compatible with older web builds?
Answer by CreativeChris · Oct 16, 2012 at 04:00 PM
Hi Boi,
Okay, don't worry about sending us a bug report, I managed to find the offending error:
If you launch developer tools and click the console, you will see a warning which says it's blocking UnityObject: "ran insecure content from http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js."
This line of html on your page:
"iframe title="Unity 3.3 gadget (1.004)" width="800" height="600" scrolling="no" frameborder="0" id="1655576568" name="1655576568" allowtransparency="true" class="igm"> src="//":
You missed out the protocol in src="//" so to fix it should be src="http://b
Or if you want to keep https, you can just link to our https UnityObject file using this link:
https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js instead of the one your using
http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js
Thanks, Chris
Hi Chris,
Could you provide some screenshots or something where the HT$$anonymous$$L should be altered? I can't find it anywhere. I think this HT$$anonymous$$L code is auto generated. Also can you explain why this still works fine in Firefox?
Can anyone help me with this? Where exactly do I need to change this HT$$anonymous$$L code? I think (not sure) it is auto generated by the gadget that embeds the Unity web build. Can anyone explain why it still works fine with Firefox?
Answer by Graham-Dunnett · Dec 07, 2012 at 01:05 PM
Usually a web player is placed into the page using JavaScript fetched from the Unity3d.com website. This JS file is called UnityObject.js (or UnityObject2.js for 4.x content). You can see the source for this if you make an offline build of the game. Open this script in a text file. Search for ssl and you'll find:
useSSL = (document.location.protocol == 'https:'), //This will turn off enableUnityAnalytics, since enableUnityAnalytics don't have a https version. baseDomain = useSSL ? "https://ssl-webplayer.unity3d.com/" : "http://webplayer.unity3d.com/",
This shows you how UnityObject.js handles the choice between a regular http site, and a secure site hosted on a https protocol.
In your website, you appear to be running on an https site. Your html seems to use a Google gadget. You may need to contact whoever created this gadget and ask how it is meant to handle content coming from an http site when the webpage is hosted on a https site. I would recommend, however, using the UnityObject.js/UnityObject2.js to get the content onto the page. This JS also handles installing the plugin if the user does not have it already. I do not know if this is compatible with Google sites, however.
Answer by CreativeChris · Oct 15, 2012 at 03:26 PM
Hi Boi,
Could be a server issue but I'm only guessing here, what do you mean by "don't work", what actually happens? Please file a bug report on this and provide screenshots and video's. I looked on your website and I couldn't find any games, please link to them in the bug report.
Thanks, Chris
Answer by Boi · Oct 15, 2012 at 05:20 PM
The term "games" is somewhat misleading I suppose. I have several Unity projects I use in my classes (AI, AR, multiplayer, ...). Most of them are small mini-games. For example Space Invaders 3D (an actual game) which is under "Unity 3D games 'n demos". This works fine in Firefox, but Chrome keeps telling me to install the webplayer. I can play other Unity games from other sites in Chrome, so I don't think that is the issue. Any help is welcome.
What Space Invaders 3D looks like in Firefox: Firefox
What Space Invaders 3D looks like in Chrome: Chrome
I have the same issue, but oddly, I have a tester running the latest version of Chrome who gets past the 'Webplayer Install' prompt. It seems that it works for some (?!)
Answer by astorga · Nov 09, 2012 at 04:33 PM
Looks like you are hosting your game in a "https" (secured) server. I had exactly this problem too, and the only solution I found is to host it in a non-secured server ("http").
Edit: Actually, there is a way to make it work, you just need to change the scripts references. You can get a gadget to use https references here. While you can use the gadget from the link, I do recommend that you copy and re-host it since I can't guarantee the link availability.
I moved the .unity files to a dropbox folder, but that didn't make any difference. I'm still using the Unity gadget (to embed in Google Sites).
The html need to be in a non-secure context. Since google sites, by default, use a secure context (unless you specify your own domain), it will behave like that.
You can buy your own domain and configure your site to use that. Or, you can host the .html (and all dependent files) in your dropbox public folder and access your game from there.
Thank you for your replies. But is works fine when I use Firefox. It used to work fine when I used Chrome (several month ago). What exactly is causing this? Is there really no way to embed a Unity webplayer in a Google sites? Seem like it should be possible.
Firefox should show a warning about this, at least in first access. Chrome had this behavior too, but for some reason I can't understand, it simply blocks non-secure content now.
It's possible to use the game in google sites, if you have your own, non-secure domain.