我正在开发混合应用程序,我从我的应用程序中调用相机,我希望此相机仅处于纵向模式。我尝试通过更改配置文件来实现:
<preference name="orientation" value="portrait"/>
当相机打开时它开始旋转。我该如何防止它?
我正在开发混合应用程序,我从我的应用程序中调用相机,我希望此相机仅处于纵向模式。我尝试通过更改配置文件来实现:
<preference name="orientation" value="portrait"/>
当相机打开时它开始旋转。我该如何防止它?
https://github.com/gbenvenuti/cordova-plugin-screen-orientation
在进入相机模式之前强制横屏,退出后禁用横屏。
// set to either landscape
screen.lockOrientation('landscape');
// allow user rotate
screen.unlockOrientation();
correctOrientation
属性。 - Najam Us Saqib