jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.79k stars 2.22k forks source link

video in pause #310

Closed barrasylvain closed 6 years ago

barrasylvain commented 6 years ago

Do you want to request a feature or report a bug? I have a feature to request.

What is the current behavior? i have implant a video and it woks fine but only with a desktop computer. Indeed, when I use a mobile, the video is paused. Is there something to add ?

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Operating System and Device Name

vincentfretin commented 6 years ago

On mobile, autoplay video doesn't work on purpose, you need to play your video from a click listener.

someElement.addEventListener('click', evt => document.querySelector('video').play());
barrasylvain commented 6 years ago

I am novice and i try to do but There is a lack of informations for me. Can you explain with an exemple, please. Thank you for all.

Le 28 févr. 2018 à 12:29, Vincent Fretin notifications@github.com a écrit :

On mobile, autoplay video doesn't work on purpose, you need to play your video from a click listener.

someElement.addEventListener('click', evt => document.querySelector('video').play()); — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

vincentfretin commented 6 years ago

Really it depends on your project, if you use aframe, you can look at the source of this example https://aframe.io/examples/showcase/videosphere/ but at the end, it's just to call play() on your video like I said.

nicolocarpignoli commented 6 years ago

solved