ng-camera icon indicating copy to clipboard operation
ng-camera copied to clipboard

Request camera access after page load

Open shealan opened this issue 10 years ago • 1 comments

Is there any way of requesting browser camera access on a button press, rather than when the page is loaded?

shealan avatar Sep 21 '15 13:09 shealan

@shealan you could wrap the directive in a div with a ng-if like

<div ng-if="!vm.picture">
    <md-camera
        capture-message="Cheeeese!"
        output-height="320"
        output-width="426"
        crop-height="320"
        crop-width="320"
        viewer-height="160"
        viewer-width="213"
        image-format="jpeg"
        jpeg-quality="100"
        action-message="Take picture"
        snapshot="vm.picture"
        shutter-url="sounds/shutter.ogg">
    </md-camera>
</div>

flick36 avatar May 07 '16 19:05 flick36