Jump to content

How to run PIXI using mobile browsers like Mozilla, Google, Opera etc?


Recommended Posts

I would like to try pixi directly from browser since I was task to do something like this for some reasons and I cannot question. How can I run PIXI.js on mobile browsers? I am not going to use CocoonJS or any of this javascript appify third-parties, I just want to run pixi on mobile browser.

So here's what I did, I pasted the entire project folder into my device and load the index.html from there, I can't get it to work of course due to some CORS/Http request which I think is a major hindrance in what I am trying to do. Do I have to to something fancy, like deploying a lite-server into my device to try this on? If not, how am I suppose to do this?


THe project I am working on is browser-base game, so the only way to access the game is through the browser. I am tasked to check performance of pixi (Of course, as advertised, is fast, which I believe) but you know the top management won't take advertisement as proof and would rather see an actual game performing. 

I really don't know how to get around this on mobile browser. I'll appreciate your help!

Thank you!

Link to comment
Share on other sites

Your issue is that :


Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

You will need to deploy your content to a server and enter the URL in your smartphone browser.  You can use Google Drive, Dropbox or a FTP server ( ex: myapp.com/index.html).

Link to comment
Share on other sites

You can usually fire up a server fairly simply on your own machine for local dev, which, depending on your machine setup would also make sharing over the local network trivial.


If you have node and npm on your machine, which makes using modules in JS easy peasy, even in the browser, then the serve module will take the pain away, although there are countless others.


Python also runs a super simple http server if python is installed on your machine, theres a guide here.


There are other ways too, your machine might have apache installed which also makes this whole shindig rather easy.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...