jquery - JWplayer 用户点击播放时全屏

标签 jquery html jwplayer

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

最佳答案

这只适用于 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>

关于jquery - JWplayer 用户点击播放时全屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28950191/

相关文章:

javascript - JWPlayer Iframe - 使用 javascript 停止视频

javascript - 如何在不刷新页面的情况下使用 ajax/javascript 更新数据库 asp.net mvc

jQuery - 只需绑定(bind)一个事件一次

javascript 正则表达式替换不起作用,但字符串替换有效

html - 使 div 占用侧边栏后剩余的空间

html - SVG clipPath 没有正确剪裁

angular - 在 Angular 4 中集成 JW Player

javascript - CSS 输入改变并恢复正常

javascript - 如何在 Javascript 中获取文本字段值

javascript - jw播放器刷新后恢复