嘿嗨大家我正在研究混合应用程序,我从我的应用程序调用相机我希望这个相机只能在纵向模式.我尝试通过更改配置文件来做到这一点 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();
我不知道这是否会起作用,因为相机是原生的,但如果你将相机嵌入你的应用程序,肯定会起作用.
请发布您的结果;)