How to hide JWPlayer 6 play button?

2019-08-06 00:48发布

I was using JWPlayer 5, but right now moving to 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>

On JWPlayer 5 it was icons: 'false' and there were no play button.

2条回答
看我几分像从前
2楼-- · 2019-08-06 01:17

The best way to do that would be to create your own skin, and leave that element out of the definition. But I think you can also do a little brute-force CSS:

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

Clicking the video frame will still start the playback.

查看更多
够拽才男人
3楼-- · 2019-08-06 01:28

If you are using Flash you need to make a custom skin to do this.

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

If you are using HTML5, the answer above will suffice.

查看更多
登录 后发表回答