make styled button to take picture

This commit is contained in:
2024-03-07 09:09:51 -07:00
parent 0eb64ed716
commit cae2bbc4ff
2 changed files with 18 additions and 2 deletions

View File

@@ -26,8 +26,21 @@
Camera "resolution" doesn't change how it shows on screen but rather stretches the result, eg the following which just stretches it vertically:
:resolution="{ width: 375, height: 812 }"
-->
<camera facingMode="user" autoplay ref="camera">
<button @click="storeImage">I'm on top of the video</button>
<camera
facingMode="environment"
autoplay
ref="camera"
class="relative h-full"
>
<div class="absolute bottom-0 w-full flex justify-center pb-4">
<!-- Button -->
<button
@click="storeImage"
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-2 rounded-full"
>
<fa icon="camera" class="fa-fw"></fa>
</button>
</div>
</camera>
</div>
</section>