Restrictions

Letsee WebAR SDK uses WebRTC to acquire vision from Camera and stream the Video Stream. Based on this Video Stream, it provides AR experience by performing various tracking. Desktop: you can use the loopback host name localhost. Web content launched by localhost can obtain the connected camera permission even if it is executed on the browser. However, it won't work for an ip address because as it restricts attempts to obtain camera permission from the browser.

To execute and debug WebAR contents using a mobile device, configure a web server to access web contents using the https protocol or access web contents using the https protocol by setting a proxy pass or proxy tunneling.

Configuring a web server for static web content

nginx.conf (or included conf file) check

server {
	listen 80 default_server;
  listen [::]:80 default_server;
	root /var/www/html;
}

-> Copy static web content to the designated place like a root folder or create static web content path like a symbolic link 
check included conf file

<IfModule mod_ssl.c>
	<VirtualHost *:443>
		DocumentRoot /var/www
	</VirtualHost>
</IfModule>

-> Copy static web content to the designated place like a root folder or create static web content path like a symbolic link 

For Python module name is different for 2.x and 3.x versions. Check the installed Python version and run the command accordingly

// Check Python version
$ python -V

// Python 2.x
$ python -m SimpleHTTPServer 8080

// Python 3.x
$ python -m http.server 8080

This module basically sets the path where the command was executed as rootand the folder designated as the root operates as a web server. The above command is an example of running the http server using the 8080 port.

Please refer to the link below to set detailed options.

20.19. SimpleHTTPServer - Simple HTTP request handler - Python 2.7.18 documentation

To run a local web server using Node.js, Node.js and npm should be installed. Click here for the installation instructions. Command to install and run the web server package is as follows:

$ npm install http-server -g
$ http-server

This package defaults to the root of the ./public folder or the ./ folder where it was launched and binds to port 8080.