Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Enable video chat in ms teams #1916

Merged
merged 3 commits into from
Dec 4, 2018
Merged

Conversation

brad
Copy link
Contributor

@brad brad commented Oct 19, 2018

Use an Edge browser user string to enable video chats. Tested on Antergos Linux

  • Closes #1292
  • Closes #1829

@Ash258 Ash258 changed the title fix #1292, fix #1829 enable video chat in ms teams Enable video chat in ms teams Oct 19, 2018
@Ash258 Ash258 added this to the 0.6.3 milestone Oct 19, 2018
@Laxen
Copy link

Laxen commented Oct 22, 2018

Quick question: Can you mention someone (type @ and then their name) and still write things after the mention without it disappearing? The mention disappears for me (name goes from blue to regular black) whenever I type something after the mention. I've found this happens whenever I use Edge as the user agent.

For example type this (replace "name" with an actual name in your team):
@name hello there!

@brad
Copy link
Contributor Author

brad commented Oct 22, 2018

@Laxen I don't see that issue. To make sure I understand you correctly, say there is a user named "Homer J Simpson", if I type @Homer J Simpson hello there! it works, not if I type @homer hello there!
I never have done it that way though, so I can't say whether it worked that way before or not. I usually just type the first few chars and the <TAB> or <Enter> to select the user I want to mention

@Laxen
Copy link

Laxen commented Oct 23, 2018

Yes that is exactly the way I'm doing it. I start typing the name then to select the user and their full name appears in the text box in blue color. Then I press because I want to write a message after the name, and after ~0.5 seconds the color of the name turns into the same color as regular text. When I send the message it's no longer a mention, it's just regular text.

However I just noticed that after you press to get the users full name in your text box, you can then quickly type a message and the mention will stay (everything you type will become blue). However if you pause for ~0.5 seconds the text will turn into regular text and it won't be a mention anymore.

I have the exact same problem in another client (teams-for-linux) when I add Edge to user agents. Calls work, but mentions break. But it's strange if you don't have the same problem, that suggests there's something else going on...

@brad
Copy link
Contributor Author

brad commented Oct 24, 2018

Sorry @Laxen I stand corrected. I experience the same thing you describe when running Teams from this branch. I don't experience that issue however when using the workaround posted here with Rambox 0.6.1 😖 I am flummoxed as to what is going on here, do you have any ideas?

@Laxen
Copy link

Laxen commented Oct 24, 2018

Running your workaround code works for me too (I get normal mentions and calls are enabled). I dived into the Rambox source to find out when the "custom code" is executed and found the following:

  1. Line 68 in AddController.js checks if there's something in the "custom code" box (called js_unread) when editing the configs for a service, and if so it asks to reload the service by calling view.reloadService().
  2. view.reloadService() is defined at line 591 in WebView.js. All it does is basically call webview.loadURL() to reload the URL.
  3. At line 409 in WebView.js an EventListener is defined for "dom-ready". When this event fires it will read js_unread (aka the custom code box) and inject it, together with some other scripts, using webview.executeJavaScript().

I've tried injecting your script at other places but none seem to work, for some reason it needs to be injected when the "dom-ready" event fires or we get the problem with mentions. I have very little knowledge of Electron and JavaScript so I can't really explain why without reading up on it.

I can also mention that I hacked this into teams-for-linux and it works in the same way there as well. Which means I can get it to work there by adding the "dom-ready" listener and using your code. Awesome!

@brad
Copy link
Contributor Author

brad commented Oct 25, 2018

@Laxen Thank you for the insight! I have adjusted to PR to take the "workaround" solution (adjust user agent after dom ready) and embed it into the app. If you wouldn't mind checking that it works for you too, I would appreciate that a lot

@Laxen
Copy link

Laxen commented Oct 25, 2018

Seems to work well, both mentions and calls work perfectly with this fix now! Didn't see that other services modified js_unread in that list before, that is a neat solution.

@saenzramiro
Copy link
Member

Thank you!

@saenzramiro saenzramiro merged commit f5c15ee into ramboxapp:master Dec 4, 2018
@welcome
Copy link

welcome bot commented Dec 4, 2018

Congrats on merging your first pull request! We here at Rambox are proud of you!

@brad brad deleted the teams-video branch December 4, 2018 18:38
@lock
Copy link

lock bot commented Jan 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants