Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何为mediaelement.js创建外观?_Javascript_Jquery_Html_Css_Mediaelement.js - Fatal编程技术网

Javascript 如何为mediaelement.js创建外观?

Javascript 如何为mediaelement.js创建外观?,javascript,jquery,html,css,mediaelement.js,Javascript,Jquery,Html,Css,Mediaelement.js,我以前使用过jPlayer,播放器的html标记直接在页面源代码中,我现在正在尝试mediaelement.js,我编写了音频播放器(html/css),但我不知道如何正确使用mediaelement.js 因此mediaelement.js将html标记添加到所有音频和视频标记中: $('audio,video').mediaelementplayer(); // using the jQuery version 因此,获取播放器标记的唯一方法是使用chrome开发者工具检查元素并复制它 但

我以前使用过jPlayer,播放器的html标记直接在页面源代码中,我现在正在尝试mediaelement.js,我编写了音频播放器(html/css),但我不知道如何正确使用mediaelement.js

因此mediaelement.js将html标记添加到所有音频和视频标记中:

$('audio,video').mediaelementplayer(); // using the jQuery version
因此,获取播放器标记的唯一方法是使用chrome开发者工具检查元素并复制它

但这是为mediaelement制作皮肤的正确方法吗?我想一定有更好的方法,我不知道

我搜索了,但找不到任何指南,我在stackoverflow上找到了:


提前感谢。

实际使用chrome开发者工具检查元素是提供样式的简单方法。最坏的情况下,你可以覆盖它

另一方面,我建议您使用mode:shim作为浏览器支持

    $('audio,video').mediaelementplayer({
    mode:'shim',
    startVolume: 0.8,
    loop: false,
    features: ['playpause','duration','volume'],
    success: function(player, node) {
    //success codes here
    }
});

我认为这是最好的方法。