{"id":3424,"date":"2018-01-23T10:41:37","date_gmt":"2018-01-23T10:41:37","guid":{"rendered":"https:\/\/www.bennewitz.com\/devel\/?p=3424"},"modified":"2022-09-02T10:20:50","modified_gmt":"2022-09-02T10:20:50","slug":"virtual-mirror-api","status":"publish","type":"post","link":"https:\/\/www.bennewitz.com\/devel\/virtual-mirror-api\/","title":{"rendered":"Virtual Mirror HTML5 API Documentation"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>A short explanation of the very simple API of Virtual Mirror HTML5<br \/>\n<\/strong><\/p>\n<p>These parameters can be passed as key-value to Virtual Mirror HTML5, using GET:<\/p>\n<p><span style=\"color: #3366ff;\"><code>vmjs-[version].html?frameFile=\/path\/file-name<\/code><\/span><br \/>\n<em><span style=\"color: #ff0000;\">frameFile=xxx<\/span> 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.<\/em><\/p>\n<p><span style=\"color: #3366ff;\"><code>vmjs-[version].html?frameFile=\/path\/file-name&amp;frameSize=141<\/code><\/span><br \/>\n<em><span style=\"color: #ff0000;\">frameSize=xxx<\/span> is the frontal width of the eyeglasses by use of millimeters.<\/em><br \/>\n<em> Based on this parameter the eyeglasses will be scaled by Virtual Mirror to match the real size.<br \/>\nIf this parameter wasn&#8217;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&#8217;s important to pass this value.<\/em><\/p>\n<p><span style=\"color: #3366ff;\"><code>vmjs-[version].html?frameFile=\/path\/file-name&amp;frameSize=141&amp;frameName=Ray-Ban-Wayfarer<\/code><\/span><br \/>\n<em><span style=\"color: #ff0000;\">frameName=xxx<\/span> 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&#8217;t provided Virtual Mirror will use &#8216;me-and-my-glasses&#8217; instead as a fallback.<\/em><\/p>\n<p><em><span style=\"color: #3366ff;\"><code>vmjs-[version].html?frameFile=\/path\/file-name&amp;frameSize=141&amp;frameName=Ray-Ban-Wayfarer&amp;lang=en<\/code><\/span><br \/>\n<\/em><em><span style=\"color: #ff0000;\">lang=xx<\/span> 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.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":3423,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[29],"tags":[],"class_list":["post-3424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-virtual-try-for-mobile-devices"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.bennewitz.com\/devel\/wp-content\/uploads\/2018\/01\/mirror-api.png","_links":{"self":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/posts\/3424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/comments?post=3424"}],"version-history":[{"count":0,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/posts\/3424\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/media\/3423"}],"wp:attachment":[{"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/media?parent=3424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/categories?post=3424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bennewitz.com\/devel\/wp-json\/wp\/v2\/tags?post=3424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}