Ver código fonte

Change VideoSource._handleBrowserPolicies() slightly

customisations
alemart 1 ano atrás
pai
commit
6c9c017fc8
1 arquivos alterados com 8 adições e 3 exclusões
  1. 8
    3
      src/sources/video-source.ts

+ 8
- 3
src/sources/video-source.ts Ver arquivo

@@ -136,9 +136,14 @@ export class VideoSource implements Source
136 136
                 const p = video.play();
137 137
                 if(typeof p === 'object') {
138 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
             });

Carregando…
Cancelar
Salvar