mind-ar-js icon indicating copy to clipboard operation
mind-ar-js copied to clipboard

Black Video on Android

Open gerickt opened this issue 2 years ago • 3 comments

My code https://glitch.com/edit/#!/elfin-muddy-brake

te black screen mindar-blackvideo

I'm testing on android

gerickt avatar Aug 04 '22 15:08 gerickt

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

hiukim avatar Aug 04 '22 18:08 hiukim

same problem - any guidance greatly appreciated

endohendo avatar Aug 10 '22 08:08 endohendo

Hi, I have the same problem. Black video on Android, white on iOS

SOLUTION:

So after some googling last night, I found out a solution.

You must add a click on play function. Unfortunately (or luckily) mobile browsers block autoplay videos, because in most of the times those videos are ads or promo videos. So in order to work around this, you just need to add in your code that the video should play on click, not automatically with the loading of the page.

Hope that helps.

annamarthin avatar Aug 11 '22 21:08 annamarthin

You should be able to autoplay the video with a few extra parameters.

<video src="..." muted autoplay playsinline></video>

positlabs avatar Sep 26 '22 13:09 positlabs

I have the same issue. Some browser works but a few browsers such as Xiaomi and Android default browser didn't work However, I use this code and it works for many browsers.

<div dangerouslySetInnerHTML={{ __html: <video webkit-playsinline playsinline muted id="video" > <source src="${videoUrl}" type="video/mp4}"/> </video>, }}></div>

skyredmilad avatar Jan 11 '23 16:01 skyredmilad

The issue is stale. feel free to re-open if there is new insight.

hiukim avatar Feb 07 '23 02:02 hiukim