Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Request camera access after page load #3

Open
shealan opened this issue Sep 21, 2015 · 1 comment
Open

Request camera access after page load #3

shealan opened this issue Sep 21, 2015 · 1 comment

Comments

@shealan
Copy link

shealan commented Sep 21, 2015

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

@flick36
Copy link

flick36 commented May 7, 2016

@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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants