skyway / old-skyway-screenshare

[Deprecated] This is a library for easy implementation of screen sharing for WebRTC.
Other
24 stars 11 forks source link

Introduce UnknownAdapter #6

Closed leaysgur closed 6 years ago

leaysgur commented 6 years ago

Currently, if user calls ScreenShare.create() on not supported browser(like Safari). It throws...

TypeError: undefined is not an object (evaluating 'this._logger.log')
  create — screenshare-latest.js:137

This PR fixes this and returns UnknowAdapter instead of null.

Thus, we can use ScreenShare.create().isScreenShareAvailable() on every browser.