Closed joshuawarner32 closed 8 years ago
Hi, First of, thanks for the PR.
On my tests, the issue is only present on Safari (no issue on Chrome, FF, Edge and IE 11). Still, this is a very valid PR. Will merge it.
If you lose the google adapter.js part on grunt publish
, it probably means that you are missing their submodule. run
git submodule init
git submodule update
and it should fix it. (see the readme for more info)
oh, sorry, can you change the PR to be merged in dev please ? We never merge anything immediately into master.
Retargeting to dev
...
When imported in global scope (say, directly in a script tag), the existing code works fine because
window.getUserMedia = ...
also assigns to thegetUserMedia
variable declared as part of the included google adapter.js code.However, when the code isn't imported in global scope (for example, if it's included via webpack - where it's evaluated inside a function),
window.getUserMedia
andgetUserMedia
are actually two different variables. This causesrequestUserMedia
(defined in the google adapter.js code) to fail when it tries to read the localgetUserMedia
variable, which will be null at this point.I have another branch where I manually updated
publish/adapter.debug.js
file, if I should also include those updates in this PR (I need it to be able to import it via npm). Just rebuilding (grunt publish
) doesn't seem to work, since it ends up removing the google adapter.js code. I'm not sure what to do about that.