Camera use confirmation
I wan't to remove users choice when he is asked for allowing camera in browser if he don't allow it. Is there possibility of doing it, or to ask him again about it? I can't find a way of triggering it unless i refresh my page.
javascript camera
add a comment |
I wan't to remove users choice when he is asked for allowing camera in browser if he don't allow it. Is there possibility of doing it, or to ask him again about it? I can't find a way of triggering it unless i refresh my page.
javascript camera
Your question lacks context, and previous attempts
– Ahmad
Nov 20 '18 at 10:05
So do you want to remove the choice? Or ask them again? I don't understand.
– Chris G
Nov 20 '18 at 10:12
add a comment |
I wan't to remove users choice when he is asked for allowing camera in browser if he don't allow it. Is there possibility of doing it, or to ask him again about it? I can't find a way of triggering it unless i refresh my page.
javascript camera
I wan't to remove users choice when he is asked for allowing camera in browser if he don't allow it. Is there possibility of doing it, or to ask him again about it? I can't find a way of triggering it unless i refresh my page.
javascript camera
javascript camera
asked Nov 20 '18 at 10:04
JackyJacky
77
77
Your question lacks context, and previous attempts
– Ahmad
Nov 20 '18 at 10:05
So do you want to remove the choice? Or ask them again? I don't understand.
– Chris G
Nov 20 '18 at 10:12
add a comment |
Your question lacks context, and previous attempts
– Ahmad
Nov 20 '18 at 10:05
So do you want to remove the choice? Or ask them again? I don't understand.
– Chris G
Nov 20 '18 at 10:12
Your question lacks context, and previous attempts
– Ahmad
Nov 20 '18 at 10:05
Your question lacks context, and previous attempts
– Ahmad
Nov 20 '18 at 10:05
So do you want to remove the choice? Or ask them again? I don't understand.
– Chris G
Nov 20 '18 at 10:12
So do you want to remove the choice? Or ask them again? I don't understand.
– Chris G
Nov 20 '18 at 10:12
add a comment |
2 Answers
2
active
oldest
votes
function initializeMedia() {
if(!('mediaDevices' in navigator)) {
navigator.mediaDevices = {};
}
if(!('getUserMedia' in navigator.mediaDevices)){
//polyfil
navigator.mediaDevices.getUserMedia = function(constraints) {
const getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
if(!getUserMedia) {
return Promise.reject(new Error('getUserMedia is not implemented'))
}
return new Promise(resolve, reject => {
getUserMedia.call(navigator, constraints, resolve, reject);
})
}
}
navigator.mediaDevices.getUserMedia({video: true}).then(stream => {
videoPlayer.srcObject = stream;
videoPlayer.style.display = "block";
}).catch(err => console.log(err))
}
this is method, i can catch it if it's not allowed, and inside i would tell to forget users choice of not allowing it. Or if there is another way to do that
add a comment |
Simply put: No, you can't remove or suppress the choice the user has.
At least me (and I guess most other visitors) would instantly leave your page/app and never use it again if you would have the possibility to revoke the choices I as a user make on my own machine. And the chances for browser vendors to allow it are really really small, because users will stop using the browser if they'd allow it.
Almost the same goes for constantly asking the user over and over again. Most users simply won't visit your page ever again if you keep asking them. In case you are going to build some application, users most likely will stop using it.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390541%2fcamera-use-confirmation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
function initializeMedia() {
if(!('mediaDevices' in navigator)) {
navigator.mediaDevices = {};
}
if(!('getUserMedia' in navigator.mediaDevices)){
//polyfil
navigator.mediaDevices.getUserMedia = function(constraints) {
const getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
if(!getUserMedia) {
return Promise.reject(new Error('getUserMedia is not implemented'))
}
return new Promise(resolve, reject => {
getUserMedia.call(navigator, constraints, resolve, reject);
})
}
}
navigator.mediaDevices.getUserMedia({video: true}).then(stream => {
videoPlayer.srcObject = stream;
videoPlayer.style.display = "block";
}).catch(err => console.log(err))
}
this is method, i can catch it if it's not allowed, and inside i would tell to forget users choice of not allowing it. Or if there is another way to do that
add a comment |
function initializeMedia() {
if(!('mediaDevices' in navigator)) {
navigator.mediaDevices = {};
}
if(!('getUserMedia' in navigator.mediaDevices)){
//polyfil
navigator.mediaDevices.getUserMedia = function(constraints) {
const getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
if(!getUserMedia) {
return Promise.reject(new Error('getUserMedia is not implemented'))
}
return new Promise(resolve, reject => {
getUserMedia.call(navigator, constraints, resolve, reject);
})
}
}
navigator.mediaDevices.getUserMedia({video: true}).then(stream => {
videoPlayer.srcObject = stream;
videoPlayer.style.display = "block";
}).catch(err => console.log(err))
}
this is method, i can catch it if it's not allowed, and inside i would tell to forget users choice of not allowing it. Or if there is another way to do that
add a comment |
function initializeMedia() {
if(!('mediaDevices' in navigator)) {
navigator.mediaDevices = {};
}
if(!('getUserMedia' in navigator.mediaDevices)){
//polyfil
navigator.mediaDevices.getUserMedia = function(constraints) {
const getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
if(!getUserMedia) {
return Promise.reject(new Error('getUserMedia is not implemented'))
}
return new Promise(resolve, reject => {
getUserMedia.call(navigator, constraints, resolve, reject);
})
}
}
navigator.mediaDevices.getUserMedia({video: true}).then(stream => {
videoPlayer.srcObject = stream;
videoPlayer.style.display = "block";
}).catch(err => console.log(err))
}
this is method, i can catch it if it's not allowed, and inside i would tell to forget users choice of not allowing it. Or if there is another way to do that
function initializeMedia() {
if(!('mediaDevices' in navigator)) {
navigator.mediaDevices = {};
}
if(!('getUserMedia' in navigator.mediaDevices)){
//polyfil
navigator.mediaDevices.getUserMedia = function(constraints) {
const getUserMedia = navigator.getUserMedia ||
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia;
if(!getUserMedia) {
return Promise.reject(new Error('getUserMedia is not implemented'))
}
return new Promise(resolve, reject => {
getUserMedia.call(navigator, constraints, resolve, reject);
})
}
}
navigator.mediaDevices.getUserMedia({video: true}).then(stream => {
videoPlayer.srcObject = stream;
videoPlayer.style.display = "block";
}).catch(err => console.log(err))
}
this is method, i can catch it if it's not allowed, and inside i would tell to forget users choice of not allowing it. Or if there is another way to do that
answered Nov 20 '18 at 10:37
JackyJacky
77
77
add a comment |
add a comment |
Simply put: No, you can't remove or suppress the choice the user has.
At least me (and I guess most other visitors) would instantly leave your page/app and never use it again if you would have the possibility to revoke the choices I as a user make on my own machine. And the chances for browser vendors to allow it are really really small, because users will stop using the browser if they'd allow it.
Almost the same goes for constantly asking the user over and over again. Most users simply won't visit your page ever again if you keep asking them. In case you are going to build some application, users most likely will stop using it.
add a comment |
Simply put: No, you can't remove or suppress the choice the user has.
At least me (and I guess most other visitors) would instantly leave your page/app and never use it again if you would have the possibility to revoke the choices I as a user make on my own machine. And the chances for browser vendors to allow it are really really small, because users will stop using the browser if they'd allow it.
Almost the same goes for constantly asking the user over and over again. Most users simply won't visit your page ever again if you keep asking them. In case you are going to build some application, users most likely will stop using it.
add a comment |
Simply put: No, you can't remove or suppress the choice the user has.
At least me (and I guess most other visitors) would instantly leave your page/app and never use it again if you would have the possibility to revoke the choices I as a user make on my own machine. And the chances for browser vendors to allow it are really really small, because users will stop using the browser if they'd allow it.
Almost the same goes for constantly asking the user over and over again. Most users simply won't visit your page ever again if you keep asking them. In case you are going to build some application, users most likely will stop using it.
Simply put: No, you can't remove or suppress the choice the user has.
At least me (and I guess most other visitors) would instantly leave your page/app and never use it again if you would have the possibility to revoke the choices I as a user make on my own machine. And the chances for browser vendors to allow it are really really small, because users will stop using the browser if they'd allow it.
Almost the same goes for constantly asking the user over and over again. Most users simply won't visit your page ever again if you keep asking them. In case you are going to build some application, users most likely will stop using it.
answered Nov 20 '18 at 12:36
DavidDavid
62015
62015
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390541%2fcamera-use-confirmation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Your question lacks context, and previous attempts
– Ahmad
Nov 20 '18 at 10:05
So do you want to remove the choice? Or ask them again? I don't understand.
– Chris G
Nov 20 '18 at 10:12