With new Audio(), is there any way to find out of the audio file exists?
<p>Is there any way to find out if an audio file exists from the initialized Audio instance?</p>

<p>For example, if I try to compare an existing audio and a non-existing audio file:</p>

<pre><code>new Audio('exists.mp3').readyState           =&gt; 0

new Audio('does_not_exist.mp3').readyState   =&gt; 0
(HTTP "Content-Type" of "text/html" is not supported. Load of media resource http://amc.narom.no/Steid failed.)
</code></pre>

<p>The return value is the same, but the console logs the error of not being able to load the media resource. Is there a way to catch this message, or using any method within the Audio object to find out whether the audio file exists or not?</p>

<p>Note:
I know I can do a HttpRequest or AJAX request to the source of the audio to check if it exists, but was wondering if this could be done in a more effective way.</p>