A code sample for a VM connection can be found in the /data/www/iframe/index.html
file, in the isntance. Basically, you need to create a genymotion javascript player by importing the .css & .js file in a project, and calling the genymotionManager.add()
method.
The parameters of this method are:
- The ID or the HTML reference to the element you want the player to be
- The webrtc address which is the address of your genymotion VM
- The fileupload address which is the address of your genymotion VM with
/fileupload/
appended - An options object, that can be used to configure the UI
Parameters are:
options = { template: 'player', // the name of template, either "player" or "god_default" touch: true, // enable or disable touch on mobile device mouse: true, // enable or disable mouse clics volume: true, // enable or disable volume widget rotation: true, // enable or disable rotation widget navbar: true, // enable or disable navbar widgets power: true, // enable or disable power widget keyboard: true, // enable or disable keyboard input fullscreen: true, // enable or disable fullscreen widget camera: true, // enable or disable camera widget fileUpload: true, // enable or disable fileupload clipboard: true, // enable or disable clipboard support battery: true, // enable or disable battery widget gps: true, // enable or disable gps widget capture: true, // enable or disable the capture widget identifiers: true, // enable or disable identifiers widget network: true, // enable or disable network widget phone: true, // enable or disable phone widget resolution: true, // enable or disable resolution widget diskIO: true, // enable or disable diskIO widget paas: true, // ALWAYS SET IT TO TRUE token : '', // set it to the value located at "/data/www/static/js/token.js" (it is taken from the initial value of "genymotion-web-ui-password") stun: {}, // can be set to customize stun settings turn: {} // can be set to customize turn settings };
This code is not yet officially available, but we are actively working on making it available using npm/yarn.