浏览代码

feat(SS): handle inline installation not supported error.

dev1
hristoterezov 8 年前
父节点
当前提交
0de9b5775e
共有 1 个文件被更改,包括 12 次插入1 次删除
  1. 12
    1
      modules/RTC/ScreenObtainer.js

+ 12
- 1
modules/RTC/ScreenObtainer.js 查看文件

@@ -59,6 +59,16 @@ const CHROME_EXTENSION_INLINE_ERROR
59 59
     = 'Installs can only be initiated by one of'
60 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 73
  * The error message returned by chrome when the extension is installed.
64 74
  */
@@ -417,7 +427,8 @@ const ScreenObtainer = {
417 427
 
418 428
         if ((CHROME_EXTENSION_POPUP_ERROR === e
419 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 432
                 && options.interval > 0
422 433
                 && typeof options.checkAgain === 'function'
423 434
                 && typeof options.listener === 'function') {

正在加载...
取消
保存