I am using HTML5 AudioElement to play my .mp3 files, but I noticed that you cannot skip the position. I am extracting the file via PHP due to 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);
As I said, it plays an audio file, but skipping a position is impossible. Is there a solution to this?
thanks
javascript html5 php html5-audio audio
zer02
source share