Skip to content

Conversation

@frankolivier
Copy link
Contributor

Fixes #2426

Microsoft Edge doesn't report HMD orientation before requestPresent (for privacy reasons) which causes checkHeadsetConnected() to always return false; on Microsoft Edge, the 'Enter VR' button falls back to the fullscreen experience, and the content is not rendered in the HMD.

Fix it is to add a vrDisplay.isConnected check (if available) to get the correct answer from hardware.

*/
function checkHeadsetConnected () {
var vrDisplay = controls.getVRDisplay();
if (vrDisplay && vrDisplay.isConnected) { return vrDisplay.isConnected; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do? if (vrDisplay && vrDisplay.isConnected) { return true; }

Copy link

@patrickkettner patrickkettner Feb 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't isConnected be false, though?

should this be

  if (vrDisplay && 'isConnected' in vrDisplay) { return vrDisplay.isConnected; } 
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! We can do that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change to 'isConnected' in vrDisplay and it looks good.

Fixes #2426

Microsoft Edge doesn't report HMD orientation before requestPresent (for
privacy reasons) which causes checkHeadsetConnected() to always return
false
@frankolivier
Copy link
Contributor Author

done

@ngokevin ngokevin merged commit 08f2bfd into aframevr:master Mar 8, 2017
@ngokevin
Copy link
Member

ngokevin commented Mar 8, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants