【问题标题】:getUserMedia alternative for iOSiOS 的 getUserMedia 替代品
【发布时间】:2014-10-30 17:44:00
【问题描述】:

有谁知道是否有任何(近期)计划在 iOS 上为 Safari 启用 getUserMedia?

其次,是否有人知道从 iPhone 上的标准移动网站访问相机的任何变通方法?我看到一个帖子引用了:

<input type="file" accept="image/*" capture="camera">

任何人都可以确认这确实有效,我会使用它来代替 getUserMedia,还是我会先进行浏览器/设备检测以确定我是否应该走 getUserMedia v. capture="camera" 路线?

【问题讨论】:

    标签: iphone html camera getusermedia image-capture


    【解决方案1】:

    好吧,我不确定你想要什么,但我看到这个 javascript 代码有效,我的意思是它会拍照。

     <script>
      $("#image-picker").change( function (event) {
      var files = event.target.files;
      if (files.length>0) {
      }
    });
    /script>
    
    <input id="image-picker" type="file" accept="image/*" />
    

    如果你想保存,你让我在那里,我仍然不知道如何保存你拍的照片。希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-04
      • 2018-06-27
      • 2020-03-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多