如何隐藏JWPlayer 6播放按钮?

时间:2015-05-29 19:15:52

标签: javascript css jwplayer jwplayer6

我使用的是JWPlayer 5,但现在转到JWPlayer 6。

<script>
    jwplayer('myElement2').setup({
        file: 'intro.mp4',
        image: 'intro.png',
        skin: 'stormtrooper',
        icons: 'false' // this doesn't work on JWPlayer 6
    });
    jwplayer('myElement2').getPlugin("display").hide();
</script>

在JWPlayer 5上,它是icons: 'false'并且没有播放按钮。

2 个答案:

答案 0 :(得分:2)

最好的方法是创建自己的皮肤,并将该元素排除在定义之外。但我认为你也可以做一点暴力CSS:

<style>
.jwdisplayIcon {
    display: none !important;
}
</style>

单击视频帧仍将开始播放。

答案 1 :(得分:1)

如果您使用Flash,则需要制作自定义皮肤才能执行此操作。

http://support.jwplayer.com/customer/portal/articles/1412123-building-jw-player-skins

如果您使用的是HTML5,上面的答案就足够了。