1
votes

HI I'm developing VR cordova app based on aframe framework.

In My app user must click on enter vr button every time he wished to enter in vr mode. but actually it should start vr mode witout any enter vr button click.I have tried in online for solution but nothing helped me to complete my requirement. i even tried jquery for auto click for but it's not working because its loading to slow or anything else i didn't know exact reason. I'm looking for simple solution that user can enter vr mode by default. I mean without clicking any button.

Hope i will get better answer here and example.

Thanks for your help in advance.

2
I heard auto-enter VR works on mobile for 0.2.0, but not 0.3.x. I will have to look into that. Does it work if you manually click it? Have you tried calling document.querySelector('a-scene').enterVR()?ngokevin
i have tried calling it but its not working.Kiran Chenna
Can U put part of your code ?Gor

2 Answers

1
votes

enterVR() function involves requesting full screen. Due to security reasons chrome does only allows these requests if they are coming from user interaction i.e. tapping, clicking etc.

0
votes

Have you tried

document.querySelector('a-scene').enterVR()