Google chrome extension chrome.tabCapture.capture返回空流

Google chrome extension chrome.tabCapture.capture返回空流,google-chrome-extension,Google Chrome Extension,我对这段代码有问题,似乎传递给chroma.tabCapture.capture回调的流为null var receiver = null; chrome.tabs.getSelected(null,function(tab) { chrome.tabCapture.capture({ video: true, audio: false, videoConstraints: { mandatory: { minWidt

我对这段代码有问题,似乎传递给chroma.tabCapture.capture回调的流为null

var receiver = null;
chrome.tabs.getSelected(null,function(tab) {
   chrome.tabCapture.capture({
      video: true,
      audio: false,
      videoConstraints: {
        mandatory: {
          minWidth: 16,
          minHeight: 9,
          maxWidth: 1280,
          maxHeight: 720,
          maxFrameRate: 25,  // Note: Frame rate is variable (0 <= x <= 60).
        },
      },
    },
    function(stream) {
      alert(stream);
      if (!stream) {
        console.log('Error starting tab capture: ' + (chrome.runtime.lastError.message || 'UNKNOWN'));
        return;
      }
      if (receiver != null) {
        receiver.close();
      }
      receiver = window.open('receiver.html');
      receiver.currentStream = stream;
    }
  );
});
var接收器=null;
chrome.tabs.getSelected(空,函数(选项卡){
chrome.tabCapture.capture({
视频:没错,
音频:错,
视频限制:{
强制性:{
最小宽度:16,
身高:9,
最大宽度:1280,
最大高度:720,

maxFrameRate:25,//注意:帧速率是可变的(0)您解决了问题吗,我面临着相同的问题吗?rry,最后,我们使用了不同的方法,从画布上捕获了视频您解决了问题吗,我面临着相同的问题吗?rry,最后,我们使用了不同的方法,从画布上捕获了视频