API of Virtual Mirror HTML5

Virtual Mirror HTML5 API Documentation

A short explanation of the very simple API of Virtual Mirror HTML5

These parameters can be passed as key-value to Virtual Mirror HTML5, using GET:

frameFile=xxx requires the location of a file of a picture of the eyeglasses (*.jpg or *.png). It should be loaded from the same domain. If no image was passed, Virtual Mirror will use a default image, defined inside of the configuration file.

frameSize=xxx is the frontal width of the eyeglasses by use of millimeters.
Based on this parameter the eyeglasses will be scaled by Virtual Mirror to match the real size.
If this parameter wasn’t passed Virtual Mirror will fall back to the default value of 130 mm. In result every eyeglasses will get the same size. So it’s important to pass this value.

frameName=xxx will be used for the file name of a screen shot, taken by customers and saved on their device. The value should be urlencoded to translate possible spaces. If the name of the eyeglasses wasn’t provided Virtual Mirror will use ‘me-and-my-glasses’ instead as a fallback.

lang=xx defines the language of the GUI of Virtual Mirror. The value has to be defined as ISO 639-1. Since January 2018 Virtual Mirror was translated to English (en), French (fr), Dutch (nl), Spanish (es), Hebrew (he), Russian (ru) and German (de). As a fallback Virtual Mirror tries to get the language by the language tag defined for that web page.

Leave a Reply

Your email address will not be published. Required fields are marked *