0

我在 AngularJS 应用程序中使用 ng-file-upload 为用户拍照。有没有办法将摄像头设置为使用前置摄像头?拍照按钮如下所示:

<button class="btn btn-primary"
    ng-model="mobilePhoto"
    ngf-select="selectPhoto($event, $file)"
    ngf-capture="'camera'"
    accept="image/*">Launch Camera
</button>

并且工作正常,我想确保它使用手机正面的摄像头。

我找到了这个页面:http ://www.html5rocks.com/en/tutorials/getusermedia/intro/#toc-gettingstarted

这使它看起来可以MediaStreamTrack.getSources()从我的网络应用程序中选择要使用的相机。这可以通过 ng-file-upload 完成吗?如果没有,是否可以编写一个与 ng-file-upload 集成的函数以允许我设置要使用的相机?

提前致谢!

4

0 回答 0