How do I edit the Default Volume?

这一生的挚爱 提交于 2019-12-03 17:31:11

Got interested too with that question. So you have to go to your folder like:

/wordpress/wp-includes/js/mediaelement/

File name:

mediaelement-and-player.min.js

Ctrl+F and search for - startVolume

It found me 2 similar results startVolume:0.8; One probably for video and second for audio. So change it from 0.8 to 1. Then ctrl+F5 on your page and we're done! :)

Was trying to figure this out and didn't want to edit core files. Inside your theme's footer.php file add:

<!--Change Wordpress Audio Player Default Volume-->
<script type="text/javascript">
jQuery(document).ready(function ($) {
    if($.fn.mediaelementplayer) {
        $("audio").mediaelementplayer({
            success: function (mediaElement, domObject) {
                mediaElement.setVolume(1.0);
            }
        });
    }
});
</script>

Just change the 1.0 to whatever you want between 0.1-1.0

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