|
@@ -1190,9 +1190,8 @@ class RTCUtils extends Listenable {
|
1190
|
1190
|
_newGetUserMediaWithConstraints(umDevices, constraints = {}) {
|
1191
|
1191
|
return new Promise((resolve, reject) => {
|
1192
|
1192
|
try {
|
1193
|
|
- this.getUserMedia(
|
1194
|
|
- constraints,
|
1195
|
|
- stream => {
|
|
1193
|
+ this.getUserMedia(constraints)
|
|
1194
|
+ .then(stream => {
|
1196
|
1195
|
logger.log('onUserMediaSuccess');
|
1197
|
1196
|
|
1198
|
1197
|
// TODO(brian): Is this call needed? Why is this
|
|
@@ -1201,8 +1200,8 @@ class RTCUtils extends Listenable {
|
1201
|
1200
|
setAvailableDevices(umDevices, stream);
|
1202
|
1201
|
|
1203
|
1202
|
resolve(stream);
|
1204
|
|
- },
|
1205
|
|
- error => {
|
|
1203
|
+ })
|
|
1204
|
+ .catch(error => {
|
1206
|
1205
|
logger.warn('Failed to get access to local media. '
|
1207
|
1206
|
+ ` ${error} ${constraints} `);
|
1208
|
1207
|
|