How to hide JWPlayer 6 play button?

谁说胖子不能爱 提交于 2019-12-11 12:32:03

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/30537414/how-to-hide-jwplayer-6-play-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!