Open MustafaJamal opened 1 month ago
Hi,
In my REACT based extension(extension application is at Azure Apps & using application Url in BaseUri of extension manifest) dialog I want to ask user for microphone access, but currently I am getting access violation errors:
Error accessing microphone: DOMException: Permission denied
Here is the code:
useEffect(() => { // I want to access for permission to use Microphone. navigator.mediaDevices.getUserMedia({ audio: true }) .then((stream) => { // Permission granted, do something with the microphone stream console.error("Microphone access granted"); }) .catch((error) => { // Permission denied or error occurred console.error("Error accessing microphone:", error); }); }, []);
Please let me know, what I am missing.
Thanks, Mustafa
Hi,
In my REACT based extension(extension application is at Azure Apps & using application Url in BaseUri of extension manifest) dialog I want to ask user for microphone access, but currently I am getting access violation errors:
Error accessing microphone: DOMException: Permission denied
Here is the code:
useEffect(() => { // I want to access for permission to use Microphone. navigator.mediaDevices.getUserMedia({ audio: true }) .then((stream) => { // Permission granted, do something with the microphone stream console.error("Microphone access granted"); }) .catch((error) => { // Permission denied or error occurred console.error("Error accessing microphone:", error); }); }, []);
Please let me know, what I am missing.
Thanks, Mustafa