summaryrefslogtreecommitdiffstats
path: root/webapp/components/webrtc
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-09-20 12:58:39 -0300
committerChristopher Speller <crspeller@gmail.com>2016-09-20 11:58:39 -0400
commitb072fdb23f61f9ebd424567025b80d370c371532 (patch)
treef20176f7696425a055db28bf513a07531fa0376b /webapp/components/webrtc
parent0157e613bdadaea6b0e0b9db7e8e3000282f09f4 (diff)
downloadchat-b072fdb23f61f9ebd424567025b80d370c371532.tar.gz
chat-b072fdb23f61f9ebd424567025b80d370c371532.tar.bz2
chat-b072fdb23f61f9ebd424567025b80d370c371532.zip
PLT-4239 fixes getUserMedia (#4038)
Diffstat (limited to 'webapp/components/webrtc')
-rw-r--r--webapp/components/webrtc/webrtc_controller.jsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/webapp/components/webrtc/webrtc_controller.jsx b/webapp/components/webrtc/webrtc_controller.jsx
index f9cf241d5..968f24638 100644
--- a/webapp/components/webrtc/webrtc_controller.jsx
+++ b/webapp/components/webrtc/webrtc_controller.jsx
@@ -172,10 +172,8 @@ export default class WebrtcController extends React.Component {
{
audio: true,
video: {
- mandatory: {
- minAspectRatio: MIN_ASPECT,
- maxAspectRatio: MAX_ASPECT
- },
+ minAspectRatio: MIN_ASPECT,
+ maxAspectRatio: MAX_ASPECT,
width: VIDEO_WIDTH,
height: VIDEO_HEIGHT
}
@@ -726,8 +724,10 @@ export default class WebrtcController extends React.Component {
this.videocall.hangup();
this.toggleIcons();
- this.localMedia.getVideoTracks()[0].enabled = true;
- this.localMedia.getAudioTracks()[0].enabled = true;
+ if (this.localMedia) {
+ this.localMedia.getVideoTracks()[0].enabled = true;
+ this.localMedia.getAudioTracks()[0].enabled = true;
+ }
}
if (error) {