The Audio tag in Safari. Why doesn't the code work?
Could you please clarify why this code doesn't work in Safari:
<audio controls="controls">
<source src="/catcher.ogg" type="audio/ogg" />
<source src="/catcher.mp3" type="audio/mp3" />
Your browser does not support the audio tag.
</audio>
It seems that the desired codec is connected, but the music does not play.
What's wrong, please tell me?
3
Author: Dmitriy Simushev, 2012-09-18
2 answers
Must support. Try in type specify the desired codec
2
Author: Deonis, 2012-09-20 14:59:32
Don't put /
before catcher.mp3
or catcher.ogg
. /
use it when you need to show the path to a file, for example <source src="audio/catcher.mp3" type="audio/mp3" />
-2
Author: Яросвет Рытиков, 2020-12-14 14:42:02