aframevr / aframevr/aframe

Display helpful message on orientation modal when Portrait Orientation Lock is engaged

Open
#1,239 2 comments 4 reactions 1 assignee View on GitHub

@cvan is already working on this.

Since Sep 11, 2016.

feature request mobile
Dominant language
JavaScript
Stars
17.6k
Forks
4.4k
PR merge metrics
No merged PRs in 30d

Description

Description:

If a user has Portrait Orientation Lock ¹ enabled (like any sane user does such as myself), we should tell the user. The first time we added this back in November/December, I was confused initially because nothing happened when I rotated my phone from portrait to landscape. I just kept seeing "Insert phone into Cardboard holder." Then, doy! I realised I had portrait orientation lock on, and since we only hide that message when an orientationchange event fires (which never would with portrait orientation lock on), nothing happened. FWIW, the webvr-polyfill has the same problem.

Also, FWIW, I know I'm not alone. I've seen two other people encounter the same problem as I did. I do realise not everyone has portrait orientation lock on, but let's give a good experience. Otherwise, folks will just leave the site if it seems broken.

Anyway, we can easily solve the potential user confusion in this case. Using deviceorientation events, if we detect the user turned the phone landscape on iOS (or any mobile browser where the Fullscreen API is not supported) but no orientationchange event has fired, then let's add a small message below Insert phone into Cardboard holder that says Disable Portrait Orientation Lock.

––
¹
Portrait Orientation Lock on iOS 9


- A-Frame Version: `0.1.2`, `master` - Platform/Device: iOS/Android

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.