opentok / opentok-react

React components for OpenTok.js
https://www.npmjs.com/package/opentok-react
MIT License
107 stars 105 forks source link

cannot screen share #234

Closed sasaki-q closed 2 years ago

sasaki-q commented 2 years ago

I cannot share my whole screen (can window and tab) how can I fix it?

<div className="flex flex-wrap">
  <Publisher /> 
  {isScreen && <VideoPublisher />}
  {/** @ts-ignore */}
  <CustomOTStreams>
    <Subscriber />
  </CustomOTStreams>
</div>

// VideoPublisher

<OTPublisher 
      properties={{ videoSource: 'screen', width: 200, height: 200 }}
      onError={onPublishScreenError}
/>

error message

Session.publish :: The selected voice or video devices are unavailable. Verify that the chosen devices are not in use by another application. (getUserMedia error: NotReadableError)