aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.65k stars 3.96k forks source link

a-video don't work black screen #4351

Closed brunosilvadaniel closed 4 years ago

brunosilvadaniel commented 4 years ago

Description:

So i was trying a test using a-frame the goal is very simple show a video in a marker but i am runing some problems (new programmer btw), i am using just the a-video component inside a hiro marker preset as the code below:

<a-scene embedded arjs='sourceType: webcam; debugUIEnabled: false; detectionMode: mono_and_matrix; matrixCodeType: 3x3;'> <a-marker preset="hiro"> <a-video rotation="90 0 0"autoplay="false" loop="true"src="src/video-test2.mp4"> ` my problem is that almost every time i run the index page the video won't show up, only a black square in top of the marker the error that run on console is that:

"WebGL: INVALID_VALUE: tex (Sub) Image2D: video visible size is empty"

but some times the video work just fine no error, but it starts automatic even with autoplay = "false", i am using webhost000 just for testing, maybe that is the reason.

dmarcos commented 4 years ago

I recommend reading the FAQ: https://aframe.io/docs/0.9.0/introduction/faq.html#why-does-my-video-not-play-on-mobile

If this doesn’t solve the issue I recommend opening a question in StackOverflow. We use github issues for bugs and feature requests. Nice folks to help in SO. Remember to provide a link to a simple example that reproduces the issue.

brunosilvadaniel commented 4 years ago

I find out how to fix justing forcing the video to play by a js command, i found the awnser on here https://github.com/jeromeetienne/AR.js/issues/285, thx to @dmarcos for helping here and stackoverflow!

Bruno Silva Daniel

dmarcos commented 4 years ago

I’m glad you got it working!

brandon-verastegui commented 3 years ago

I find out how to fix justing forcing the video to play by a js command, i found the awnser on here https://github.com/jeromeetienne/AR.js/issues/285, thx to @dmarcos for helping here and stackoverflow!

Bruno Silva Daniel

Hi that link takes you anywhere, is it possible that someone can direct me to the solution? By the way I am using MindAR image tracking... I am hoping that that's not the issue neither..

dmarcos commented 3 years ago

@brandon-verastegui you can copy the url https://github.com/jeromeetienne/AR.js/issues/285

brandon-verastegui commented 3 years ago

@brandon-verastegui you can copy the url jeromeetienne/AR.js#285

Hi Marcos, are you talking about this: https://github.com/jeromeetienne/AR.js/issues/285#issuecomment-520140180 ? By the way thank you very much for your work, where can I buy a shirt to support y'alls work?

dmarcos commented 3 years ago

Thanks! Yes, that comment. Most browsers today don’t allow video autoplay. You need a user gesture to start playback. Best of luck

dmarcos commented 3 years ago

I don’t know anything about MindAR but shouldn’t make a difference