iOS相机在狩猎中可以正常旋转,但在网络应用程序模式下无法正常旋转



我正在构建一个网络应用程序,该应用程序将允许用户拍摄照片并上传到服务器上的文件夹,然后图像将显示在图库页面上。上传部分工作正常,但我在iOS上遇到了一些问题。当我在safari中运行该应用程序时,当你访问相机时,一切都很好,你可以旋转相机,拍摄人像或风景照片,它们会上传并在画廊页面上正确渲染。问题是当它在主屏幕上以web应用程序模式运行时。。。如果您在人像模式下启动访问相机,相机会启动,但如果您在相机模式下打开手机,图像也会旋转,就像锁定人像模式一样。有没有办法在程序上允许相机像在狩猎中一样旋转?

这是我的代码,也许是错误的?

<form action="upload.php" method="post" enctype="multipart/form-data" style="width:100%;">
                <span style="text-align: center; word-wrap: break-word;">
                Please choose a picture: 
                <br></span>
                <input id="uploadImage"  type="file" accept="image/*" name="uploadFile" onchange="PreviewImage();">
                <img id="uploadPreview" style="height:120px; width: auto;" />
<script type="text/javascript">
function PreviewImage() {
    var oFReader = new FileReader();
    oFReader.readAsDataURL(document.getElementById("uploadImage").files[0]);
    oFReader.onload = function (oFREvent) {
        document.getElementById("uploadPreview").src = oFREvent.target.result;
    };
};
</script>
<input type="submit" value="Upload File" ><br>
Please wait for window to close after uploading
</form>

还有人在iOS网络应用程序中遇到过这个摄像头故障吗?

在iOS 10 中修复

我们遇到了同样的问题,截至今天上午,它仍然有效。

最新更新