Closed oooookk7 closed 6 years ago
LGTM, I just wanna make sure that the logic is : if evt.data.chromeExtensionStatus === whatever, remove the event handle and do something else, ignore the message and keep the event handler
@johache yes that is the logic intended, so that we don't remove the event listener when it shouldn't.
@johache so it's considered mergeable?
Yep, I already approved the PR :)
This resolves the issue where
getUserMedia({ video: { mediaSource: "screen" } })
for chrome as it listens to all messages in the same page. Currently in the deprecated method which some apps would still be using, the extension would listen to messages fromwindow.postMessage()
and react upon it. That however is a current problem in the AdapterJS since it is listening to all messages instead of acting upon specific messages, and that causes issues for JS plugins that are using thewindow.postMessage()
as well.The current PR just simply listens for specific messages instead.