Chrome 76 returns 中的 checkScreenSharingCapability 需要扩展:"chrome"

checkScreenSharingCapability in Chrome 76 returns extensionRequired: "chrome"

TokBox 文档令人困惑,因为它明确指出:

Important: As of Chrome 72+ and Firefox 52+, an extension is no longer needed for screen sharing. The browser prompts the end user for access to the screen as it would for access to the camera. 

然而,示例代码有:

OT.checkScreenSharingCapability(function(response) {
  if(!response.supported || response.extensionRegistered === false) {
    // This browser does not support screen sharing
  }
});

和chrome版本76returns:

extensionInstalled: false
extensionRegistered: false
extensionRequired: "chrome"
supported: true

所以Chrome76会说不支持。 Firefox v68 returns extensionRegistered = undefined 所以它通过了。如果我忽略该错误并尝试在 Chrome 中进行屏幕共享,它会失败并提示需要扩展。

已通过将@opentok/client 从 2.15.1 更新到 2.16.2

来修复