How to reproduce the original issue:
Run getaroom.io locally with AdapterJS 0.14.0 changes and notice that if you invoke the screenshare button, nothing happens. If you check window.navigator.getUserMedia, it gives you the webrtc/adapter shim.
Note that do not test in getaroom.io production since it uses AdapterJS 0.13.4 which does not have problems.
This could be related to some browserify output changes from webrtc/adapter which causes the overrides not to work in getaroom.io. This might cause issues for people using requirejs or reactjs library as they are used by developers. In order to fix it temporarily, a timeout was set to define the screensharing changes again, and to make the code run sequentially, the AdapterJS.webrtcReady follows the same timeout value before triggering the callback ready function.
Perhaps we should move to use browserify just as what webrtc/adapter is using to make proper fixes.
PS: I doubt these fixes are the best but it works for now. I think we should consider proper fixes to prevent related errors.
How to reproduce the original issue: Run getaroom.io locally with AdapterJS
0.14.0
changes and notice that if you invoke the screenshare button, nothing happens. If you checkwindow.navigator.getUserMedia
, it gives you thewebrtc/adapter
shim.Note that do not test in getaroom.io production since it uses AdapterJS
0.13.4
which does not have problems.This could be related to some browserify output changes from
webrtc/adapter
which causes the overrides not to work in getaroom.io. This might cause issues for people using requirejs or reactjs library as they are used by developers. In order to fix it temporarily, a timeout was set to define the screensharing changes again, and to make the code run sequentially, theAdapterJS.webrtcReady
follows the same timeout value before triggering the callback ready function.Perhaps we should move to use browserify just as what
webrtc/adapter
is using to make proper fixes.PS: I doubt these fixes are the best but it works for now. I think we should consider proper fixes to prevent related errors.