简体   繁体   English

Android设备:在A-Frame中进入VR模式时呈现黑色

[英]Android devices: rendering black when entering VR mode in A-Frame

When clicking the "Enter VR" icon (the goggle icon), to enter in VR mode, the screen periodically turns black. 单击“输入VR”图标(护目镜图标)时,要进入VR模式,屏幕会定期变黑。 The issue seems to occur at random times. 这个问题似乎随机发生。

We have tried using both A-Frame version 0.3.0 and 0.3.2., but with no difference in behavior. 我们尝试使用A-Frame版本0.3.0和0.3.2。但行为没有区别。

Whether it fails (renders black or is successful) I recieve the following errors: 无论是失败(呈现黑色还是成功),我都会收到以下错误:

aframe.min.js:281 Uncaught TypeError: Cannot read property 'length' of undefined
at r (aframe.min.js:281)
at M.fireVRDisplayPresentChange_ (aframe.min.js:58)
at HTMLDivElement.s (aframe.min.js:58)

aframe.min.js:149 Uncaught (in promise) DOMException: 
A call to screen.orientation.lock() or 
screen.orientation.unlock() canceled this call.

index.html#/lobby:1 Uncaught (in promise)     
DOMException: screen.orientation.lock() is not available on this device.

The issue seems to vary in occourance depending on device. 根据设备的不同,问题似乎有所不同。

Tested on: Samsung Galaxy S6/S6 Edge Nexus 6x One plus 3 测试:三星Galaxy S6 / S6 Edge Nexus 6x One plus 3

Does anyone have any information regarding this issue and hopefully a fix? 有没有人有关于这个问题的任何信息,希望能解决?

The workaround we ended up with was altering the aframe when using mobile android devices, to make it believe it was using a samsung VR device. 我们最终得到的解决方法是在使用移动Android设备时改变框架,使其相信它使用的是三星VR设备。 Seemingly some of the functionality hasn't been implemented for android devices in AFrame, which is why we went with this solution. 似乎AFrame中的Android设备尚未实现某些功能,这就是我们采用此解决方案的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM