Browse Source

Change VideoSource._handleBrowserPolicies() slightly

customisations
alemart 1 year ago
parent
commit
6c9c017fc8
1 changed files with 8 additions and 3 deletions
  1. 8
    3
      src/sources/video-source.ts

+ 8
- 3
src/sources/video-source.ts View File

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…
Cancel
Save