如何改变宽度

mediaelement.js - How to change width

本文关键字:改变 何改变      更新时间:2023-09-26

我试图找到控制mediaelement.js音频播放器宽度的过多标签,但似乎无法解决。

我假设这是需要编辑的标签的组合?

我从mediaelemenjs.com下载了这个播放器,它的CSS非常大。

<div class="fluid player">
   <audio id="player2" src="http://www.newlifedeewhy.com/media/school/2014/20140526-School-EpiLimiñana.mp3" type="audio/mp3" controls></audio>
   <script>$('audio,video').mediaelementplayer();</script>
</div>

你可以在API列表中找到这个选项

// if the <video width> is not specified, this is the default
defaultVideoWidth: 480,
// if the <video height> is not specified, this is the default
defaultVideoHeight: 270,
// if set, overrides <video width>
videoWidth: -1,
// if set, overrides <video height>
videoHeight: -1,
// width of audio player
audioWidth: 400,
// height of audio player
audioHeight: 30,

,

$('audio,video').mediaelementplayer({audioWidth: 600});