Merge branch 'CorentinTh:main' into main

This commit is contained in:
David Nguyen 2023-12-03 14:05:14 +07:00 committed by GitHub
commit b24090494f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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