Просмотр исходного кода

Merge pull request #586 from jitsi/inline_not_supported

feat(SS): handle inline installation not supported error.
dev1
Saúl Ibarra Corretgé 8 лет назад
Родитель
Сommit
dd163e95f9
1 измененных файлов: 12 добавлений и 1 удалений
  1. 12
    1
      modules/RTC/ScreenObtainer.js

+ 12
- 1
modules/RTC/ScreenObtainer.js Просмотреть файл

59
     = 'Installs can only be initiated by one of'
59
     = 'Installs can only be initiated by one of'
60
         + ' the Chrome Web Store item\'s verified sites.';
60
         + ' the Chrome Web Store item\'s verified sites.';
61
 
61
 
62
+/**
63
+ * The error returned by chrome when trying to start inline installation
64
+ * with extension that doesn't support inline installation.
65
+ *
66
+ * @type {string}
67
+ */
68
+const CHROME_EXTENSION_INLINE_NOT_SUPPORTED_ERROR
69
+    = 'Inline installation is not supported for this item. '
70
+        + 'The user will be redirected to the Chrome Web Store.';
71
+
62
 /**
72
 /**
63
  * The error message returned by chrome when the extension is installed.
73
  * The error message returned by chrome when the extension is installed.
64
  */
74
  */
417
 
427
 
418
         if ((CHROME_EXTENSION_POPUP_ERROR === e
428
         if ((CHROME_EXTENSION_POPUP_ERROR === e
419
              || CHROME_EXTENSION_IFRAME_ERROR === e
429
              || CHROME_EXTENSION_IFRAME_ERROR === e
420
-             || CHROME_EXTENSION_INLINE_ERROR === e)
430
+             || CHROME_EXTENSION_INLINE_ERROR === e
431
+             || CHROME_EXTENSION_INLINE_NOT_SUPPORTED_ERROR === e)
421
                 && options.interval > 0
432
                 && options.interval > 0
422
                 && typeof options.checkAgain === 'function'
433
                 && typeof options.checkAgain === 'function'
423
                 && typeof options.listener === 'function') {
434
                 && typeof options.listener === 'function') {

Загрузка…
Отмена
Сохранить