How to disable specific control in audio player HTML5

后端 未结 2 828
情深已故
情深已故 2021-01-22 12:51

I just want to show the audio controls but prohibits the user to drag the button because I don\'t want the user to skip the song. How to make this work?

相关标签:
2条回答
  • 2021-01-22 12:55

    It seems there's currently (August 2015) still no standard way to hide specific controls in a clean way. The best way to handle this is by using a library for this. E.g. one of these:

    • http://buzz.jaysalvat.com/
    • http://kolber.github.io/audiojs/
    • http://jplayer.org/
    • http://mediaelementjs.com/
    0 讨论(0)
  • 2021-01-22 13:16

    You can't. You either show the browser's builtin controls, or you don't.

    So what you should so is hide them and make your own (it should be easy if you don't want the seek functionality) or look at something like jPlayer (http://jplayer.org/) and hide the seek bar with CSS.

    0 讨论(0)
提交回复
热议问题