Browse Source

Fix mp3 detection for Safari

Cedric Guillemet 4 năm trước cách đây
mục cha
commit
061980d683
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/Audio/audioEngine.ts

+ 2 - 1
src/Audio/audioEngine.ts

@@ -103,7 +103,8 @@ export class AudioEngine implements IAudioEngine {
         this._hostElement = hostElement;
 
         try {
-            if (audioElem && !!audioElem.canPlayType && audioElem.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/, '')) {
+            if (audioElem && !!audioElem.canPlayType && (audioElem.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/, '') || 
+                audioElem.canPlayType('audio/mp3').replace(/^no$/, ''))) {
                 this.isMP3supported = true;
             }
         }