HTML can't loop the music [duplicate]

爷,独闯天下 提交于 2020-01-06 15:39:24

问题


here is my code it seems that i cant loop the music, any idea?

<embed name="lostmojo" src="music/Loving.mp3" loop="true" hidden="true" autostart="true">

Thanks in advance!


回答1:


Does the music play at all? I had problems getting it to play using Firefox. If it doesn't play at all, the problem may be due to the hidden attribute, which has spotty support among browsers. If you remove the hidden="true" does it work?

If this is the case, try using CSS to hide the element. Something like this:

<embed name="lostmojo" src="music/Loving.mp3" loop="true" autostart="true" style="visibility:hidden;"/>

That seemed to work for me. The test audio I used looped correctly in Firefox.



来源:https://stackoverflow.com/questions/20881141/html-cant-loop-the-music

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!