Open tlakomy opened 6 years ago
@larrylin28 I spent couple of hours debugging this and I've found where the bug is.
In LiveEnvCamera.js
there's a following constraints object:
const constraints = {
video: {facingMode: {ideal: 'environment'}},
};
which gets COMPLETELY ignored by a react-vr app and it always returns the front camera. That's why the user will always see the blackness in a headset. This can be easily verified by raising the phone in GearVR headset a little so that the light can actually come in.
Description
I think it's probably a bug, although I'm not sure if it's intended to work in the first place - I'm trying to use
LiveEnvCamera
to show the camera feed to the user. It obviously doesn't work on desktop, on mobile (Samsung Galaxy S7 Edge) works as intended but on a headset I'm seeing only blackness.Expected behavior
LiveEnvCamera
should show a camera feed to the user in Oculus BrowserActual behavior
LiveEnvCamera
does not show the user a camera feed when using Oculus BrowserReproduction
My sample test component:
Solution
I'd like to confirm whether I'm doing something work or it's not supposed to work in the first place :)
Additional Information