|
@@ -194,15 +194,17 @@ export default {
|
194
|
194
|
return createLocalTracks(
|
195
|
195
|
['audio', 'video'], cameraDeviceId, micDeviceId)
|
196
|
196
|
// If we fail to do this, try to create them separately.
|
197
|
|
- .catch(() => Promise.all(
|
198
|
|
- [createAudioTrack(false), createVideoTrack(false)]))
|
199
|
|
- .then((audioTracks, videoTracks) => {
|
|
197
|
+ .catch(() => Promise.all([
|
|
198
|
+ createAudioTrack(false).then(([stream]) => stream),
|
|
199
|
+ createVideoTrack(false).then(([stream]) => stream)
|
|
200
|
+ ]))
|
|
201
|
+ .then(tracks => {
|
200
|
202
|
if (audioTrackError || videoTrackError) {
|
201
|
203
|
APP.UI.showDeviceErrorDialog(
|
202
|
204
|
audioTrackError, videoTrackError);
|
203
|
205
|
}
|
204
|
206
|
|
205
|
|
- return (audioTracks || []).concat(videoTracks || []);
|
|
207
|
+ return tracks.filter(t => typeof t !== 'undefined');
|
206
|
208
|
});
|
207
|
209
|
} else if (videoRequested && !audioRequested) {
|
208
|
210
|
return createVideoTrack();
|