Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// videoSourceId = sourceInfo.id;
// }
// }
let constraints = {
audio: true,
video: {
mandatory: {
minWidth: 1280, // Provide your own width, height and frame rate here
minHeight: 720,
minFrameRate: 30
},
facingMode: (isFront ? "user" : "environment"),
optional: (videoSourceId ? [{ sourceId: videoSourceId }] : [])
}
};
getUserMedia(constraints, function (stream) {
self.state.localStream = stream;
self.initJanus(self.state.url, cb);
}, console.log);
});
}
minFrameRate: 30,
},
facingMode: isFront ? 'user' : 'environment',
},
};
let getStream = stream => {
localStream = stream;
appClass.setState({
streamURL: stream.toURL(),
status: 'ready',
info: 'Welcome to WebRTC demo',
});
};
getUserMedia(constrains, getStream, logError);
};