You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
document.write('<h1 style="font-family: Courier New; font-size: 30px; color:red;margin-top:200px;">The purpose of this page is to access your camera and microphone.</h1>');
var port = chrome.runtime.connect();
navigator.mediaDevices.getUserMedia({
audio: true,
video: true
}).then(function(stream) {
var tracksLength = stream.getTracks().length;
stream.getTracks().forEach(function(track) {
track.stop();
});
if(tracksLength <= 1) {
throw new Error('Expected two tracks but received: ' + tracksLength);
}
port.postMessage({
messageFromContentScript1234: true,
startRecording: true
});
window.close();
}).catch(function(e) {
var html = '<h1 style="font-family: Courier New; font-size: 30px; color:red;margin-top:20px;">Unable to access your camera and/or microphone.</h1>';
html += '<p style="font-family: Courier New; font-size: 25px; color:black;margin-top:20px;">Please go to following pages and remove "RecordRTC" from blocked-list:</p>';
html += '<pre style="font-family: Courier New; font-size: 25px; color:blue;margin-top:20px;">chrome://settings/content/microphone?search=camera</pre>';
html += '<pre style="font-family: Courier New; font-size: 25px; color:blue;margin-top:20px;">chrome://settings/content/microphone?search=microphone</pre>';