google = js detect chrome browser
isChromium = window.chrome// is Google Chrome on IOS
winNav = window.navigator,
isIOSChrome = winNav.userAgent.match("CriOS");
// ------
isChrome: /Google Inc/.test(navigator.vendor),
isChromeIOS: /CriOS/.test(navigator.userAgent),
isChromiumBased: !!window.chrome && !/Edge/.test(navigator.userAgent),
google = js chrome detect active microphone
// initialization
if( localStorage.getItem("voice_access") === null ){
// just assume it is prompt
localStorage.setItem("voice_access", "prompt");
}
// Then somewhere
navigator.getUserMedia({audio: true}, function(e){
// http://stackoverflow.com/…3581/1008999
//
// In chrome, If your app is running from SSL (https://),
// this permission will be persistent.
// That is, users won't have to grant/deny access every time.
localStorage.setItem("voice_access", "granted");
}, function(err){
if(err.name == "PermissionDismissedError"){
localStorage.setItem("voice_access", "prompt");
}
if(err.name == "PermissionDeniedError"){
localStorage.setItem("voice_access", "denied");
}
});
Mozna na jine strance.
https://forums.asp.net/t/2104615.aspx?…
Mozna, muzes zkusit pridat navod, jak zapnout mikrofone. Spousta uzivatelu to nevi. Treba je nutne povolit mf u win, pak v chrome a pak jeste tvym tlacitkem. Mozna by slo neco nahrat, zjistit, ze je to jen sum a vypsat uzivateli, ze jestli neco nahraval, pak nejspis nema povoleny mikrofon a dat mu link, jak povolit mikrofon.
Jinak, jestli tam pouzivas javascript, tak ten si umi zkontrolovat kompatibilitu treba tak, ze testnes existenci funkce. Treba pouzivas
// webcam.capture();
if (!webcam.capture) {alert('error');}
if (typeof webcam.capture == 'undefined') {alert('error');}