I have 2 pages in my project. I ask for permission to use camera on the first page by using webRTC.
navigator.getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
link_to_second_page != active
if (navigator.getUserMedia) {
// Accepted.
link_to_second_page = active
} else {
// Not accepted.
}
And if user accept it, than the link to the second page become active. And there is a video chat on the second page, that is using webRTC too. The issue is that on Chrome it works perfect, because it saves the "permission accepted" status. But Firefox users are asked for permission for two times. Because Firefox doesn't save "permission accepted" status. Is there any method to ask for cam permission just once on the first page, and launch webRTC on the second?