JWplayer当用户点击播放时全屏 [英] JWplayer Full screen when user clicks on play
本文介绍了JWplayer当用户点击播放时全屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只要用户点击播放按钮,我怎么让JWplayer全屏?在他们的支持下我找不到与此有关的任何事情。
How do I make JWplayer full screen as soon as a user clicks on the play button? I couldn't find anything relating to this on their support.
推荐答案
这仅适用于HTML5模式:
This will only work in HTML5 mode:
<!DOCTYPE html>
<html>
<head>
<title>Full Screen</title>
</head>
<body>
<script src="http://p.jwpcdn.com/6/12/jwplayer.js" type="text/javascript"></script>
<div id="player"></div>
<script type="text/javascript" language="javascript">
jwplayer("player").setup({
file: "http://content.jwplatform.com/videos/C4lp6Dtd-el5vTWpr.mp4",
image: "http://content.bitsontherun.com/thumbs/i8oQD9zd-640.jpg",
primary: 'html5',
width: 640,
height: 360
});
jwplayer().onDisplayClick(function() { jwplayer().setFullscreen(true); });
</script>
</body>
</html>
这篇关于JWplayer当用户点击播放时全屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文