英文:
HTML audio tag do not work on SAFARI how to fix it
问题
I try to stream audio from server http://185.34.28.166:8000/;stream.mp3
and when i play on Chrome or Mozilla it work good but when i play this audio on Safari i see loading circle and nothing play. I tried with all formats .mp3, .wav, also .ogg (i know that this format .ogg is not supported by safari). Below code and image how looks like not working audio in safari
<audio class="kopageAudio" controls="">
    <source src="http://185.34.28.166:8000/;stream.mp3" type="audio/mp3">
    <font style="vertical-align: inherit;">
        <font style="vertical-align: inherit;">Twoja przeglądarka nie obsługuje znacznika audio.
        </font>
    </font>
</audio>
I try all formats and many parameters in <audio> tag
I would like to correctly play stream in audio tag on website
英文:
I try to stream audio from server http://185.34.28.166:8000/;stream.mp3
and when i play on Chrome or Mozilla it work good but when i play this audio on Safari i see loading circle and nothing play. I tried with all formats .mp3, .wav, also .ogg (i know that this format .ogg is not supported by safari). Below code and image how looks like not working audio in safari
<audio class="kopageAudio" controls="">
    <source src="http://185.34.28.166:8000/;stream.mp3" type="audio/mp3">
    <font style="vertical-align: inherit;">
        <font style="vertical-align: inherit;">Twoja przeglądarka nie obsługuje znacznika audio.
        </font>
    </font>
</audio>
I try all formats and many parameters in <audio> tag
I would like to correctly play stream in audio tag on website
答案1
得分: 1
您的源类型不正确。
应该是:
类型="音频/mpeg"
英文:
Your source is of the wrong type.
type="audio/mp3"
It should be:
type="audio/mpeg"
答案2
得分: 0
你试过按照这篇帖子上建议的方式设置属性 preload="none" 吗?
https://stackoverflow.com/questions/48896656/mp3-with-audio-tag-does-not-work-in-safari
英文:
Did you try to set the attribute preload="none" as suggested on this post?
https://stackoverflow.com/questions/48896656/mp3-with-audio-tag-does-not-work-in-safari
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。



评论