disable audio from keeping playing after lock screen or press home button in safari
<p>I'm working on a project and in a case I need to play audio using  tag in web. But I found out that the audio won't stop after lock screen or press home button. It just keeps playing. So is there a way to disable that? BTW I tried simplest way but the audio won't stop. Here's the code:</p>

<pre><code>&lt;html&gt;
    &lt;body&gt;
        &lt;audio src="./movies/1.mp3" controls="controls"&gt;
            Your browser does not support the audio element.
        &lt;/audio&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Maybe. I can listen to some event like hitting home button or lock screen and pause()? But I don't know if that possible.</p>