mediaelement.js - 如何改变宽度
mediaelement.js - How to change width
我试图找到控制 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>
这里JS Fiddle进行演示。
您可以在 API list
找到该选项
// 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});
我试图找到控制 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>
这里JS Fiddle进行演示。
您可以在 API list
找到该选项// 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});