Here is my code.
captureUserMedia(mediaConstraints, successCallback, errorCallback) {
navigator.getUserMedia(mediaConstraints, successCallback, errorCallback);
}
captureUserMedia00(callback){
captureUserMedia({
audio: true,
video: true
}, function(stream) {
console.log('user media Callback', stream);
callback(stream);
}, function(error) {
console.log('user media Error ', JSON.stringify(error));
});
}});
}
Here, when video constraint is not yet allowed by user, but audio is already allowed (due to other just audio recordings), and when prompted for the same, and user 'closes' the prompt, successCallback is called, and I won't be getting the VideoStream, but just Audio.
How can I make sure that both the video and audio permissions are allowed when successCallback is called?