I am using the HTML5 AudioElement to play my .mp3 files, but I noticed it is not possible to skip the position. I am fetching the file via PHP from outside the www root.
I am using HTML code :
<audio src="" controls id="appAudio" style="width:1000px;margin-top:10px"></audio>
JavaScript code:
document.getElementById('appAudio').src= 'http://localhost/index.php/player/get_audio_via_php/1';
PHP code:
$file = "/myfolder/1.mp3";
header('Content-Type: audio/mpeg');
header('Content-Length: ' . filesize($file));
return file_get_contents($file);
Like I said it does play the audio file, but skipping position is not possible. Is there a solution to this?
Thank you