没有音量滑块或静音按钮的音频标签? [英] Audio tag without a volume slider or mute button?

查看:70
本文介绍了没有音量滑块或静音按钮的音频标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用

<audio controls controlslist="nodownload">

成功了.

现在,如何删除播放声音时出现的音量滑块(加静音按钮)?

Now, how do I remove the volume slider (plus mute button) that comes up when I play the sound?

我尝试了

<audio controls controlslist="novolume">

没有任何运气.

推荐答案

The new controlslist attribute in the HTML5 standard can only accept three settings:

"nodownload", "nofullscreen" and "noremoteplayback".

除此之外,没有人可以控制特定的控件.唯一(当前)的解决方法是为音频对象构建自己的自定义界面,并仅提供您希望用户通过UI访问的控件.

There are none to control specific controls beside from that. The only (current) workaround for this is to build your own custom interface for the audio object and provide only the controls you want the user to access via the UI.

该属性当前仅在Chrome,Opera以及Android中受支持.当然,这是为音频构建自定义UI(或使用Johannes建议的库)的另一个诱因.

The attribute is currently only supported in Chrome and Opera, as well as Android. This of course being another incentive to build a custom UI for the audio (or use a library as suggested by Johannes).

这篇关于没有音量滑块或静音按钮的音频标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆