miniapp icon indicating copy to clipboard operation
miniapp copied to clipboard

Screen orientation in MiniApp

Open QingAn opened this issue 3 years ago • 2 comments

The use case of detecting MiniApp's screen orientation and orientation change event, was discussed in https://www.w3.org/2021/04/29-MiniApp-minutes.html.

Here are two things we need to discuss:

  1. Can MiniApp reuse the The Screen Orientation API?
  2. What is the next step: create a new work item (something like "MiniApp Screen Ori"?) in MiniApp CG, or support this use case in existing spec (maybe MiniApp Lifecycle?)

Any thought?

QingAn avatar Apr 30 '21 02:04 QingAn

On the 2nd point, using an existing spec would be the best choice if it does fit. But I'm not so sure if the screen orientation events and APIs are coupled with the 'lifecycle' aspect. It seems more about UI operation. Anyhow, we should first understand the difference from 'The Scree Orientation API'.

zhangyongjing avatar Apr 30 '21 06:04 zhangyongjing

As regards the 2nd point, It seems that the interfaces related to Orientation are not suitable for the lifeCycle specification, and it is recommended to add a series of MiniApp Screen Orientation API. The Naming of the API could be <host>.screen.orientation.xxx or <host>.screenOrientation.xx or miniapp.screenOrientation.xx or other (need to discuss).

Because the Screen orientation are not only included events, but also include some methods which can be called in real time, such as lock() and unlock().

Also do we need to add a specification on how the API is mounted and named (something like MAOM, abbreviation of MiniApp Object Model)?

Sharonzd avatar Jun 17 '21 11:06 Sharonzd