diff --git a/src/mami.js/audio/autoplay.js b/src/mami.js/audio/autoplay.js index ae99939..d1c0ccc 100644 --- a/src/mami.js/audio/autoplay.js +++ b/src/mami.js/audio/autoplay.js @@ -5,19 +5,10 @@ const MamiDetectAutoPlaySource = '/+NIxA!!FhpbmcA#PA$wA@fgAV$#q$#/$#A#OUxBTUUzLj const MamiDetectAutoPlay = async () => { try { - const audio = $e('audio', { src: 'data:audio/mpeg;base64,' + MamiSRLE.decode(MamiDetectAutoPlaySource) }); - - try { - await audio.play(); - } catch(ex) { - if('name' in ex && ex.name !== 'NotAllowedError' && ex.name !== 'AbortError') { - console.error(ex); - throw ex; - } - - return false; - } - } catch(ex) {} + await $e('audio', { src: 'data:audio/mpeg;base64,' + MamiSRLE.decode(MamiDetectAutoPlaySource) }).play(); + } catch(ex) { + return false; + } return true; };