I have js code in the chrome background extension from the following:
function handleCapture(stream) { console.log('content captured'); console.log("backround.js stream: ", stream); alert(stream); // localStream = stream; // used by RTCPeerConnection addStream(); // initialize(); // start signalling and peer connection process } function captureCurrentTab() { console.log('reqeusted current tab'); chrome.tabs.getSelected(null, function(tab) { console.log('got current tab'); var selectedTabId = tab.id; chrome.tabCapture.capture({ audio : false, video : true }, handleCapture); }); }
However, when this is executed, is the variable "handleCapture" "stream" that is being transferred always undefined? Is this to be expected, or is there something I miss here?
In addition, I confirmed that my manifest.json contains capture permission, and I am using Version 31.0.1607.1 canary Aura chrome canary.
Thanks Mike
source share