JWplayer Full screen when user clicks on play
Asked Answered
H

1

3

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.

Hebron answered 9/3, 2015 at 19:25 Comment(0)
A
4

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>
Amor answered 9/3, 2015 at 20:18 Comment(6)
Thank you so much for your help, I can see now how it perfectly works.Hebron
It will not. setFullscreen only works in html5, not Flash, and IE8 does not support HTML5.Amor
@Amor in this way can I disable fullscreen all the time or on display double tap.Bedivere
suppose i have multiple videos then how to open particular video on full screen ?Granniah
Email support <at> jwplayer <dot> com about that.Amor
Use jwplayer("player").on('displayClick', function() { jwplayer("player").setFullscreen(true); }); for v8 of jwplayerBraswell

© 2022 - 2024 — McMap. All rights reserved.