Web-Based AR using the AR.js library.
First, you need a few things set up:
1)Web server to host your HTML code up, or set it up on your own http://localhost/ server. You can also sign up for a sandbox account on codepen.io to easily host your code online.
2)Copy and paste the few lines of HTML code from web.html onto your index.html file:
3) Open the url/codepen link on your device and point your camera to this image(hiro.jpeg).
Link to the tutorial I followed: Click here