Created
February 12, 2024 16:53
-
-
Save svierk/76fb14bd64a4def2321ef10101bf55d6 to your computer and use it in GitHub Desktop.
HTML Template for Take User Profile Picture LWC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<lightning-card icon-name="custom:custom38" title="Take User Profile Picture"> | |
<div class="slds-grid slds-gutters"> | |
<div class="slds-col slds-size_1-of-2"> | |
<video class="slds-p-left_small video" autoplay></video> | |
<canvas class="slds-hide canvas"></canvas> | |
</div> | |
<div class="slds-col slds-size_1-of-2"> | |
<img src="" class="slds-p-right_small slds-hide preview" alt="Captured User Photo" /> | |
</div> | |
</div> | |
<div slot="footer"> | |
<lightning-button-group> | |
<lightning-button label="Start Camera" icon-name="utility:video" onclick={startCamera}></lightning-button> | |
<lightning-button label="Stop Camera" icon-name="utility:video_off" onclick={stopCamera}></lightning-button> | |
<lightning-button label="Capture Photo" icon-name="utility:photo" onclick={capturePhoto}></lightning-button> | |
<lightning-button label="Update Profile Picture" icon-name="utility:save" onclick={updatePhoto} variant="brand"></lightning-button> | |
</lightning-button-group> | |
</div> | |
</lightning-card> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment