Giter Site home page Giter Site logo

problem playing a video about mind-ar-js HOT 10 CLOSED

hiukim avatar hiukim commented on August 20, 2024
problem playing a video

from mind-ar-js.

Comments (10)

hiukim avatar hiukim commented on August 20, 2024

@jhonrymat I'm not sure I understand what you mean. Can you provide screencaps?

from mind-ar-js.

jhonrymat avatar jhonrymat commented on August 20, 2024

just take the example of advanced.html and change the link of the video, for a video that has embedded audio, but when the page is opened the audio is played instantly without having clicked on the video

from mind-ar-js.

hiukim avatar hiukim commented on August 20, 2024

@jhonrymat

Can you perhaps create a minimal and runnable example? That would help a lot.

Better off, are you able to confirm the problem is caused by MindAR. One good way to do that is remove MindAR and create a regular AFRAME scene with video, and make the "click and play" works.

After that, put in the MindAR library, and see what's the difference. Then we will know what's causing the problem.

from mind-ar-js.

jhonrymat avatar jhonrymat commented on August 20, 2024

here an example in glitch.com
https://mighty-arrow-pyrite.glitch.me/
https://cdn.glitch.com/b38eb9a2-8d3c-4e64-998d-6d0738b4c845%2Fcard.png?v=1616288422890
and here the code
https://glitch.com/edit/#!/mighty-arrow-pyrite?path=index.html%3A1%3A0

from mind-ar-js.

hiukim avatar hiukim commented on August 20, 2024

I run your example, and I couldn't see any video. So there is also no audio as well.

from mind-ar-js.

jhonrymat avatar jhonrymat commented on August 20, 2024

Hello again, could you please explain how to play a video I still can't find how, and then proceed to close the thread, thank you very much

from mind-ar-js.

hiukim avatar hiukim commented on August 20, 2024

Now, I'm a bit confused about the problem you are having. Are you

  1. no able to play video, or
  2. can play video, but the video started playing incorrectly

if 1)
The interactive example you mentioned already provided an example of how to start a video.

if 2)
Can you provide a minimal and runnable example that I can replicate your issue.

from mind-ar-js.

jhonrymat avatar jhonrymat commented on August 20, 2024

You just want to put a video on top of an image but I don't know how to break down your example, just to use the video, I appreciate your help. I tried this way and I did not succeed.

https://glitch.com/edit/#!/mighty-arrow-pyrite?path=index.html%3A1%3A0

from mind-ar-js.

hiukim avatar hiukim commented on August 20, 2024

@jhonrymat Your video doesn't play because the click event wasn't fired/captured. If you need to capture click event on aframe element, you need to setup the raycaster in camera, e.g.

 <a-camera cursor="fuse: false; rayOrigin: mouse;" raycaster="near: 10; far: 10000; objects: .clickable"></a-camera>
        <a-cursor></a-cursor>
      </a-camera>
<a-video class="clickable" src="#surfer" height="4.5" width="8" position="0 3 -9"
        ><a-image
          id="videocontrols"
          src="#play"
          position="0 -3 0"
          scale="0.5 0.5 1"
          play-pause
        ></a-image>
      </a-video>

from mind-ar-js.

jhonrymat avatar jhonrymat commented on August 20, 2024

Excellent, thank you very much, it was what I needed, you are the best. I close thread.

from mind-ar-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.