Y
Y
YourQuestion2015-10-25 11:36:26
JavaScript
YourQuestion, 2015-10-25 11:36:26

How to track permission change for getUserMedia()?

navigator.getUserMedia (
// constraints
{
video: true,
audio: true
},
// successCallback
function(localMediaStream) {
var video = document.querySelector('video');
video.src = window.URL.createObjectURL(localMediaStream);
video.onloadedmetadata = function(e) {
// Do something with the video here.
};
},
// errorCallback
function(err) {
if(err === PERMISSION_DENIED) {
// Explain why you need permission and how to update the permission setting
}
}
);

The problem is that the user, having allowed the use of the camera at the beginning, can deny access during recording by clicking on the icon in the address bar:
4IpJoGi.png
Tell me how to track the subsequent change in write access?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question