I am using the HTML5 Audio element inside my HTML file.
Trying many methods,I just cannot manage to replace the audio file via AJAX, it still returns the same audiofile.
<div id="audiodiv">
<audio id="audioelement">
<source src="test.ogg" type="audio/ogg">
</audio>
</div>
So I record a new file called test.ogg which overwrites the old one.
I tried using jQuery and using$("#audiodiv").html('')
and re-rendering this part. Then fetching the element via document.getElementbyID
and then using the .play() function
.
It returns the same old test.ogg,which was already overwritten by the new one.
So I tried to delete the cache, still the same problem.
The only way this works is deleting the cache and closing the browser and calling the page again...
How can I solve this?
Thank you very much for help.