It looks like you're new here. If you want to get involved, click one of these buttons!
<script>
tags, you can just include this in a particular passage and it works fine:
<script>
var audio = document.createElement('audio');
audio.src = 'audio.mp3';
audio.type = 'audio/mpeg';
audio.loop = true;
audio.play();
</script>
But I thought I'd post the results of my investigation anyways in case it is relevant to someone. Inserting the audio element inline as follows, the problem is observed where the audio loads fine and plays for a second before pausing for no apparent reason:
<audio id="myVideo" autoplay controls>
<source src="audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<script>
$('audio').on("abort canplay canplaythrough durationchange emptied ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting",function(e){
console.log(e.type);
});
</script>
The additional script code logs every event on the audio element. Console output looks like this after loading:
VM118:50 Loaded the built-in macros.
VM122:2 loadstart
VM122:2 durationchange
VM122:2 loadedmetadata
VM122:2 progress
VM122:2 suspend
VM122:2 loadeddata
VM122:2 canplay
VM122:2 play
VM122:2 playing
VM122:2 canplaythrough
3 VM122:2 timeupdate
VM122:2 pause
That last pause event happens on its own. I'm not sure what could be causing it. I'd have just submitted a bug to Harlowe repository, but I don't see a way of doing so on bitbucket (https://bitbucket.org/_L_/harlowe)