miniapp
miniapp copied to clipboard
Screen orientation in MiniApp
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:
- Can MiniApp reuse the The Screen Orientation API?
- 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?
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'.
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)?