Browse Source

Merge pull request #122 from tsareg/audio_output_change_warning

Log warning instead of error for audio output device change errors
dev1
Paweł Domas 9 years ago
parent
commit
bdd219cfc2
2 changed files with 6 additions and 2 deletions
  1. 3
    1
      modules/RTC/JitsiTrack.js
  2. 3
    1
      modules/RTC/RTCUtils.js

+ 3
- 1
modules/RTC/JitsiTrack.js View File

334
     return Promise.all(this.containers.map(function(element) {
334
     return Promise.all(this.containers.map(function(element) {
335
         return element.setSinkId(audioOutputDeviceId)
335
         return element.setSinkId(audioOutputDeviceId)
336
             .catch(function (error) {
336
             .catch(function (error) {
337
-                logger.error('Failed to change audio output device on element',
337
+                logger.warn(
338
+                    'Failed to change audio output device on element. Default' +
339
+                    ' or previously set audio output device will be used.',
338
                     element, error);
340
                     element, error);
339
                 throw error;
341
                 throw error;
340
             });
342
             });

+ 3
- 1
modules/RTC/RTCUtils.js View File

570
                 .catch(function (ex) {
570
                 .catch(function (ex) {
571
                     GlobalOnErrorHandler.callUnhandledRejectionHandler(
571
                     GlobalOnErrorHandler.callUnhandledRejectionHandler(
572
                         {promise: this, reason: ex});
572
                         {promise: this, reason: ex});
573
-                    logger.error('Failed to set audio output on element',
573
+                    logger.warn('Failed to set audio output device for the ' +
574
+                        'element. Default audio output device will be used ' +
575
+                        'instead',
574
                         element, ex);
576
                         element, ex);
575
                 });
577
                 });
576
         }
578
         }

Loading…
Cancel
Save