1👍
✅
Give this a try,
// get the <audio> element
const player = document.querySelector('#player');
// get first source element
source = player.getElementsByTagName('source')[0];
// get file url
url = source.src
request.open('GET', url, true);
or
const url = document.querySelector('#player').getElementsByTagName('source')[0].src;
Source:stackexchange.com