Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Container Client Module
The Container Client module is a small plugin for Application which allows for communication between the Container and the Application across an
<iframe> HTML element. The Application is run from within the
- Manage Single-play and continuous-play modes in Application
- Allow Container to feature-detect Application (Sound, Captions, etc)
- Allow Container to toggle captions, music, sound effects, voice-over or all sound
- Allow Container to pause/resume Application
- Bellhop The library which handles the communication between the Application and the parent iframe container.
- Core Module
"libraries": [ "components/bellhop/dist/bellhop.min.js", "components/springroll/dist/core.min.js", "components/springroll/dist/modules/container-client.min.js" ], "librariesDebug": [ "components/bellhop/dist/bellhop.js", "components/springroll/dist/core.js", "components/springroll/dist/modules/container-client.js" ]
Boolean) If the game is played in single-play mode. When
singlePlayEnd() is called it will tell the Container that the user is finished.
Object) Optional play parameters that the Container can pass to the Application. For instance, say the Application content is math game about shapes, and you want the first level to be square and medium difficulty. These options are passed through Containers
openRemote methods (see docs)
Boolean) Read-only version of the
Object) Read-only version of the
Bellhop) The instance of the Bellhop object that represents the parent window. Allows direct communication with the Container. See Bellhop docs for more information about using this object.
endGame([exitType='game_completed']) Self-exit method. In some contexts, this can be used to tell the Container to close the iframe.
singlePlayEnd() End a game that's in single-play mode.