Search code examples
airconsole

Airconsole Simulator screen not connecting


Experimenting with the Airconsole platform and I've created a simple placeholder screen and controller. The /screen.html and /controller.html files display fine on my browser at myIPAddress:3000.

I can also access them on a mobile device connected to the same network at myIPAddress:3000.

When I attempt to use the Airconsole Simulator, with myIP (ie http://www.airconsole.com/simulator/#http://myIP:3000/), the controllers connect and display my placeholder content. The screen continues to show the Loading... screen indefinitely.

Same thing happens using the local test - http://www.airconsole.com/?http=1#http://myIP:3000/. I open that URL in my browser, then open the Airconsole mobile app and enter the game code. It detects a connection and my phone displays the placeholder. The screen continues showing the Loading... icon.

Both pages have the airconsole.js file included.

Has anyone encountered this? If so, how were you able to resolve it? Any tips for debugging it for more info is also welcomed.


Solution

  • You have to instantiate the AirConsole object like:

    var airconsole = new AirConsole();
    

    This internally calls the parent frame, which then removes the loading frame etc. and the screen.html is displayed. Or in other words, AirConsole knows you want to start showing your game.

    Note: also until then, no communication with the loading device works either.