我以前使用过jPlayer,播放器的html标记直接在页面源代码中,现在我正在尝试mediaelement.js,我对我的音频播放器(html/css)进行了编码,但我不知道如何在mediaelement.js中正确使用它。
因此,mediaelement.js将html标记添加到所有音频和视频标签中:
$('audio,video').mediaelementplayer(); // using the jQuery version因此,获取播放器标记的唯一方法是使用chrome开发工具检查元素并复制它。
但是这是为mediaelement制作皮肤的正确方式吗?我想一定有更好的办法,但我不知道。
我搜索了一下,但找不到任何指南,我在stackoverflow上找到了这个:
Rolling custom control buttons
提前谢谢你。
发布于 2013-01-14 17:37:26
实际上,使用带有chrome开发人员工具的检查元素是赋予样式的简单方法。在最坏的情况下,您可以覆盖它。
另一方面,我建议您使用mode:shim来支持浏览器
$('audio,video').mediaelementplayer({
mode:'shim',
startVolume: 0.8,
loop: false,
features: ['playpause','duration','volume'],
success: function(player, node) {
//success codes here
}
});https://stackoverflow.com/questions/14315787
复制相似问题