hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.21k stars 413 forks source link

Video not showing, not playing #64

Closed brandon-verastegui closed 2 years ago

brandon-verastegui commented 2 years ago

Hi, I've done everything to try to make a video appear and play efficiently, I was able to see a little bit of it but only when the video was just too big to be completely shown. What is the right way to code it?

  <a-scene mindar-image="imageTargetSrc: ./SSS-target.mind" vr-mode-ui="enabled: false" device-orientation-permission-ui="enabled: false" color-space="RGB" renderer="colorManagement: true, physicallyCorrectLights">

` <a-camera position="0 0 0" look-controls="enabled: false"

`` `` `` ` ` ``
hiukim commented 2 years ago

Does it work without MindAR? I mean as a regular aframe application?

benhamlett commented 2 years ago

Here is an example of how I got it working ( Code block kept breaking sorry ) :)

brandon-verastegui commented 2 years ago

Here is an example of how I got it working ( Code block kept breaking sorry ) :)

<a-camera position="0 0 0" look-controls="enabled: false"></a-camera>

<a-entity id="my_target" mindar-image-target="targetIndex: 0">
  <a-video src="#vid" position="0 0 0.5" rotation="0 0 0" width="1" height="1"></a-video>
</a-entity>

it's still not working for me, what If I am using a video on top of an image? this is my code now that I tried to use your script

<a-scene mindar-image="imageTargetSrc: ./SSS-target.mind" vr-mode-ui="enabled: false" device-orientation-permission-ui="enabled: false" color-space="RGB" renderer="colorManagement: true, physicallyCorrectLights">

` `` `` `` `` `` ` ``
brandon-verastegui commented 2 years ago

Does it work without MindAR? I mean as a regular aframe application?

Some have been able to have their videos shown on just A-Frame, Three.js Ar.js but many say that autoplay parameter deactivates the video on AR experiences on webAR, strangely even though I took off the autoplay parameter from the video line, it still not showing, I am going to try with a WebM format and see if it works, I am also using a video in front of an image. If it works next thing would be trying to set a video inside of a 3D box with a paralax effect, is there any recommended lines to use to create that effect?