瀏覽代碼

Change VideoSource._handleBrowserPolicies() slightly

customisations
alemart 1 年之前
父節點
當前提交
6c9c017fc8
共有 1 個檔案被更改,包括 8 行新增3 行删除
  1. 8
    3
      src/sources/video-source.ts

+ 8
- 3
src/sources/video-source.ts 查看文件

136
                 const p = video.play();
136
                 const p = video.play();
137
                 if(typeof p === 'object') {
137
                 if(typeof p === 'object') {
138
                     p.catch((error: DOMException) => {
138
                     p.catch((error: DOMException) => {
139
-                        Utils.error(`Can't autoplay video! Tip: allow manual playback`, error, video);
140
-                        if(Utils.isIOS() && error.name == 'NotAllowedError')
141
-                            Utils.warning('Is low power mode on?');
139
+                        Utils.error(`Can't autoplay video!`, error, video);
140
+
141
+                        if(error.name == 'NotAllowedError') {
142
+                            Utils.warning('Tip: allow manual playback');
143
+
144
+                            if(Utils.isIOS())
145
+                                Utils.warning('Is low power mode on?');
146
+                        }
142
                     });
147
                     });
143
                 }
148
                 }
144
             });
149
             });

Loading…
取消
儲存