webrtc config electron#850
webrtc config electron#850ara4n merged 21 commits intomatrix-org:developfrom t3chguy:webrtc_settings
Conversation
init on LoggedInView mounting configurable via UserSettings new class: CallMediaHandler Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
|
Can one of the admins verify this patch? |
| */ | ||
|
|
||
| import UserSettingsStore from './UserSettingsStore'; | ||
| import * as Matrix from 'matrix-js-sdk'; |
There was a problem hiding this comment.
this feels a bit weird - shouldn't this be operating on a MatrixClient rather than importing the whole js-sdk as Matrix?
There was a problem hiding this comment.
@ara4n it's in the same class as createNewMatrixCall is in, which looking at VectorConferenceHandler is used in the same manner. Just following the patterns I see. The other way to do it would be to pass the devices when initiating/answering a call, would you prefer this?
|
|
||
| // Only run these in electron, at least until a better mechanism for perms exists | ||
| // https://w3c.github.io/permissions/#dom-permissionname-device-info | ||
| if (window && window.process && window.process.type) CallMediaHandler.loadDevices(); |
There was a problem hiding this comment.
ah, so the picker only works when in electron?
There was a problem hiding this comment.
PR is to fix element-hq/element-web#2822 primarily so that's what its designed for, I did no testing in a browser but should work given microphone+camera permissions at browser level
|
this generally looks good to me, other than questions, although it's a bit of a shame it only works for electron. (plus i need to test it; i can do so against an external UVC webcam). any idea what's needed on the permissions front to make it work on the browser? |
|
we could run it on the browser but if the device-info permission is missing then all the devices have an empty label which makes it pointless having it as its impossible to know which device is which. I guess I could remove that check and instead see whether the returned labels != '' |
|
yeah, i think this would be very useful (and easier to test, critically) for non-electron too. I suggest doing the returned labels != '' check, and then i can test & merge. |
loadDevices not only in electron Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
NEEDS TESTING/me has no webcam </3 |
| let webcamDropdown = <p>No Webcams detected</p>; | ||
|
|
||
| const audioInputs = this.state.mediaDevices.audioinput; | ||
| if ('default' in audioInputs) { |
There was a problem hiding this comment.
needs if (Object.keys(audioInputs).length > 0) {
| } | ||
|
|
||
| const videoInputs = this.state.mediaDevices.videoinput; | ||
| if ('default' in videoInputs) { |
There was a problem hiding this comment.
needs if (Object.keys(videoInputs).length > 0) {
| } | ||
|
|
||
| return <div> | ||
| <h3>WebRTC</h3> |
There was a problem hiding this comment.
Let's call it VoIP, and i18n please
| _renderWebRtcSettings: function() { | ||
| if (this.state.mediaDevices === false) { | ||
| return <div> | ||
| <h3>WebRTC</h3> |
|
@t3chguy if you can i18nize, fix the merge conflict & and fix 'defaults' bug then i'll merge this immediately. thanks |
… webrtc_settings and i18nize webrtc stufffs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> # Conflicts: # src/components/structures/UserSettings.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
| this.setState({ | ||
| mediaDevices, | ||
| activeAudioInput: this._localSettings['webrtc_audioinput'] || 'default', | ||
| activeVideoInput: this._localSettings['webrtc_videoinput'] || 'default', |
There was a problem hiding this comment.
do these need changing also?
so that we can set falsey values, for unsetting device
most dolphinately needs testing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
|
lgtm after epic :) |
|
I HATE WEBRTC |
needs testing with webcam
allows configurabilty of input devices used for webrtc calls
depends on matrix-org/matrix-js-sdk#427