Explorar el Código

fix Hls is not supported in Safari Mobile

DIYgod hace 7 años
padre
commit
87e137e2c3
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/js/player.js

+ 4 - 0
src/js/player.js

@@ -333,6 +333,10 @@ class DPlayer {
                 }
             }
 
+            if (this.type === 'hls' && (video.canPlayType('application/x-mpegURL') || video.canPlayType('application/vnd.apple.mpegURL'))) {
+                this.type = 'normal';
+            }
+
             switch (this.type) {
             // https://github.com/video-dev/hls.js
             case 'hls':