krsbx / mind-ar-ts

A complete rewrite of Mind AR JS in TS
MIT License
22 stars 6 forks source link

Angular integration image detection #107

Open olivelegras opened 1 year ago

olivelegras commented 1 year ago

Hi, I try to use mind-ar-ts in Angular project but unfortunately after I accept camera request I have no camera stream and just have a message " Failed to launch :(Looks like your device/browser is not compatible. Please try the following recommended browsers: For Android device - Chrome For iOS device - Safari".

My try's was on chrome Mac and iOS safari. Any ideas ?

krsbx commented 1 year ago

@olivelegras can you show me the example code? so I can I see it easier

olivelegras commented 1 year ago

Hi @krsbx,

in playar.component.html `

<a-entity mindar-image-target="targetIndex: 0">
    <a-plane color="blue" opaciy="0.5" position="0 0 0" height="0.552" width="1" rotation="0 0 0"></a-plane>
</a-entity>

`

in app.module.ts schemas: [ CUSTOM_ELEMENTS_SCHEMA ]

in package.json ... "@angular/core": "~12.2.0", .... "@types/aframe": "^1.2.2", "aframe": "^1.4.1", "mind-ar": "^1.2.0", "mind-ar-ts": "^0.5.7", ...

in polyfills.ts import 'mind-ar-ts/dist/mindar-image.prod.js'; import 'aframe'; import 'mind-ar-ts/dist/mindar-image-aframe.prod.js';

Test on chrome Mac Version 110.0.5481.177

Capture d’écran, le 2023-03-16 à 10 59 07