소스 검색

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;
             }
         }