prashant-andani / AR-Alphabets

Augmented Reality on Web (Web AR) for Kids to learn Alphabets with fun. AR on all Mobile Devices
https://skillstack.firebaseapp.com/
MIT License
127 stars 43 forks source link

ar.js #9

Open ultradyran opened 6 years ago

ultradyran commented 6 years ago

I couldnt get the ar.js to work on iOS11, and I saw that yours work. I am not sure if the ar.js you use is any different from the official AR.js so I use your ar.js file, and i still received the same error in iOS 11 with "WebCam Error: NotAllowedError".

My code is very simple and only works on PC with webcam:

<!doctype HTML>
<html>
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script src="https://prashant-andani.github.io/AR.js/aframe/build/aframe-ar.js"></script>

<body style='margin : 0px; overflow: hidden;'>
    <a-scene stats embedded arjs artoolkit='sourceType: webcam;'>

        <a-assets>
            <a-asset-item id="model" src="models/mymodel.gltf" />
        </a-assets>
        <a-gltf-model src="#model" scale="0.01 0.01 0.01"></a-gltf-model>
        <!--<a-box material='color: black;'></a-box>-->
        <a-marker-camera preset='custom' type='pattern' patterUrl='ar.patt' url='ar.patt'>

        </a-marker-camera>
    </a-scene>
</body>

</html>

any reason why I cant get it working?

prashant-andani commented 6 years ago

I have modified the AR.js to support custom marker. Let me try to reproduce this issue on iOS11 and get back to you on this ASAP....

prashant-andani commented 6 years ago

Hey @ultradyran it works fine for me... Can you share your link where you hosted this code ?