Преглед изворни кода

Fix mp3 detection for Safari

Cedric Guillemet пре 4 година
родитељ
комит
061980d683
1 измењених фајлова са 2 додато и 1 уклоњено
  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;
             }
         }