问题描述
我把它放在我的网站上
I put this in my webiste
<audio src="jdc.mp3" accesskey="m">
但是当我按下alt + m时它没有启动。如果我删除accesskey标签并添加控件,我可以播放它。我做错了什么?
but it doesn't start when i press alt+m. I can play it if i remove the accesskey tag and add controls. Am i doing something wrong?
推荐答案
<audio controls="" accesskey="m">
<source src="jdc.mp3" type="audio/mpeg">
</source></audio>
但按Alt +m将仅关注播放器。您仍然需要按空格键进行播放/暂停。
同样,组合键的组合因浏览器和操作系统而异。
查看此处的列表 -
[]
但是,你可以写小javascript / JQuery代码可以做你想做的事。
查看以下链接了解更多详情 -
[ ]
希望,有帮助:)
But pressing Alt+"m" will focus the player only. You still need to press the space bar for play/pause.
Again, the key combination varies from browser to browser and OS to OS.
Check the list here-
HTML accesskey Attribute[^]
However, you can write small javascript/JQuery code to do what you want.
Check following link for further details-
HotKey to Play/Pause HTML5 Music Player[^]
Hope, it helps :)
这篇关于音频元素accesskey无法正常工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!