Merge branch 'main' into yaml-viewer

This commit is contained in:
Isaiah 2023-11-29 14:11:52 -05:00 committed by GitHub
commit f77a83e2b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,7 @@ const permissionCannotBePrompted = ref(false);
const { const {
stream, stream,
start, start,
stop,
enabled: isMediaStreamAvailable, enabled: isMediaStreamAvailable,
} = useUserMedia({ } = useUserMedia({
constraints: computed(() => ({ constraints: computed(() => ({
@ -83,6 +84,8 @@ watchEffect(() => {
} }
}); });
onBeforeUnmount(() => stop());
async function requestPermissions() { async function requestPermissions() {
try { try {
await ensurePermissions(); await ensurePermissions();