<!doctype HTML> <html> <script src="https://aframe.io/releases/0.9.2/aframe.min.js"></script> <script src="https://cdn.rawgit.com/jeromeetienne/AR.js/1.7.7/aframe/build/aframe-ar.js"></script> <body style='margin : 0px; overflow: hidden;'> <a-assets> <video id="ar-video" autoplay loop="true" muted="true" src="**.mp4"></video> </a-assets> <!-- デバッグ用の画面表示、VR用のボタンをそれぞれ非表示に --> <a-scene embedded arjs="debugUIEnabled:false;" vr-mode-ui="enabled: false"> <!-- 今回作成した『.patt』ファイルを読み込む --> <a-marker type='pattern' url='**.patt'> <a-video src="#ar-video" width="2.6" height="1.4" position="0 0 0" rotation="270 0 0" play="true"></a-video> </a-marker> <a-entity camera></a-entity> </a-scene> <script> window.addEventListener('click', function () { var v = document.querySelector('#ar-video'); v.play(); }); </script> </body> </html>