JWplayer当用户点击播放时全屏

时间:2015-03-09 19:25:16

标签: jquery html jwplayer

如果用户点击播放按钮,如何让JWplayer全屏显示?在他们的支持下我找不到与此有关的任何内容。

1 个答案:

答案 0 :(得分:3)

这只适用于HTML5模式:

<!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>