#include srle.js
#include utility.js

const MamiDetectAutoPlaySource = '/+NIxA!!FhpbmcA#PA$wA@fgAV$#q$#/$#A#OUxBTUUzLjEwMAIeA!)UCCQC8CIA@gA@H49wpKWgA!%&/+MYxA$NIA$ExBTUUzLjEwMFV^%/+MYxDsA@NIA$FV&&/+MYxHYA@NIA$FV&&';

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) {}

    return true;
};
