Parameters

List of parameters that can be specified to the Player.

Parameter Req Description
app Required (*) Specify the application to load.
cat Required (*) Specify the category to load.
lev Required (*) Specify the level to load.
debug Optional Enable a debug icon on screen to easily access debugging logs when using mobile devices. Assign the value '1' to activate.
lang Optional Language of the player's interface ('en' for English, 'fr' for French). English is default value.
pro Optional Set a profile ID to use. A profile needs to be authenticated using a passcode on a first attempt to access it.
(*): NOTE: one (and only one) of these paremeters must be specified to the Player: either app, cat or lev. Specifying none will result in an error message.

These parameters can be provided to the Player using two ways: either by URL or embedded in your HTML code using JavaScript. IMPORTANT: parameters specified using JavaScript (embedded) always have precedence over those in the URL. This means that if you provide the same parameter in the URL and using JavaScript, only the JavaScript value will be used.

URL

To specify parameters in the URL, simply append them at the end of the URL. The example below set values to the lang and debug parameters

http://www.d2soft.com/en/Doc/Parameters?lang=en&debug=1

JavaScript

Parameters are provided in JavaScript using a variable name engine_config. The example below set values to the lang and debug parameters. Note in the code that colons (:) are used to assign the values, not the equal sign (=). Simply put this code somewhere in the same HTML page where the Player is embedded.

<script>
var engine_config = {
  lang: 'en',
  debug: 1
}
</script>