codetemplar Posted May 28, 2015 Share Posted May 28, 2015 Hi all,I am looking at a pixi test game a friend of mine wrote and it requires the index.HTML to be ran through a local host server. The JavaScript for this game is trivial so was wondering why it doesn't load by simply opening index.HTML through chrome directly. Because the JavaScript is so simple I can only really fathom that it is pixi.js which prohibits purely client side execution. Is this a restriction imposed by pixi.js or can you configure it to work?If you need me to post the code let me know. Thanks Quote Link to comment Share on other sites More sharing options...
rich Posted May 28, 2015 Share Posted May 28, 2015 Browser sandbox security prevents this, not Pixi. Quote Link to comment Share on other sites More sharing options...
codetemplar Posted May 28, 2015 Author Share Posted May 28, 2015 Ok thanks. In that case can you please advise me on the following:I have a c++ app that uses directx to render chromium embedded framework. I will feed cef my index.html to run my JavaScript using cef v8 engine. The JavaScript will use pixi.js to play a game I've written. However from what you say it looks like cef sandbox restriction wouldn't allow pixi to run. Is there anything I can do to get this working without embedding some kind of webserver in the c++ app. Maybe configuring cef to be less restrictive in the sandbox?Thanks for any help. Quote Link to comment Share on other sites More sharing options...
xerver Posted May 28, 2015 Share Posted May 28, 2015 You can configure cef to allow file:// loading via XHR (you can do it in chrome too via a command line param). Quote Link to comment Share on other sites More sharing options...
labrat.mobi Posted May 28, 2015 Share Posted May 28, 2015 I guess this will help you, http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=406 Quote Link to comment Share on other sites More sharing options...
codetemplar Posted May 28, 2015 Author Share Posted May 28, 2015 Thanks all,much appreciated! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.