You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
display.getFrameData started to fill frameData with default values [0,0,0,1]
As i run this script in other android devices it works just fine.
In android 9 it works only when i uncomment useDeviceMotion() lines.
Run below code in webview (with polyfill script):
var polyfill = new WebVRPolyfill();
var display = null;
var frameData = new VRFrameData();
navigator.getVRDisplays().then((displays) => {
if (displays.length) {
display = displays[0];
// if (display.poseSensor && display.poseSensor.useDeviceMotion) {
// display.poseSensor_.useDeviceMotion();
// }
window.setInterval(() => {
if ( display.getFrameData ) {
display.getFrameData( frameData );
pose = frameData.pose;
} else if ( display.getPose ) {
pose = display.getPose();
}
if ( pose.orientation !== null ) {
console.log(pose.orientation);
}
}, 60);
}
}, (e) => {
console.error(e);
});
It looks like in webview RelativeOrientationSensor doesn't update its orientation, but when i tried to reproduce this bug without polyfill i see orientation in poseSensor.quaternion and in reading event:
Can you try using 0.10.10? there's been some changes in Chromium that the polyfill needed to address around the sensors and 0.10.4 is rather out of date and missing some of those fixes
Just testes on 0.10.10 with same results.
To workaraound this issue we emit events called 'devicemotion2' from android app and
added support for 'devicemotion2' events in webvr-polyfill. We had other issues with chromium previously and this sollution worked for us.
I can make pr if you want, but there should be better name for this event.
Description:
display.getFrameData started to fill frameData with default values [0,0,0,1]
As i run this script in other android devices it works just fine.
In android 9 it works only when i uncomment useDeviceMotion() lines.
Run below code in webview (with polyfill script):
It looks like in webview RelativeOrientationSensor doesn't update its orientation, but when i tried to reproduce this bug without polyfill i see orientation in poseSensor.quaternion and in reading event:
Additional Information:
0.10.4
WebView with Chrome 74
Android 9
The text was updated successfully, but these errors were encountered: