I cast URLs to my Chromecast to display web pages on it, and this generally works fine, the pages run scripts, css and images.
However I've not been able to play audio in those web pages. When I cast something like YouTube to the Chromecast that audio does play as expected.
I've tried playing audio using:
new Audio('/audioFile.mp3').play();
and
<audio id="audio" src="/audioFile.mp3" />
<script>document.getElementById('audio').play()</script>
Both work in my desktop browser, but not when casting a URL to the Chromecast.
Is there a supported method of playing audio on the Chromecast's browser?
Note: I'm not streaming a browser tab to the Chromecast, I'm directly casting the URL and it is rendering on the Chromecast device and not on any other devices