Developer Guide Javascript API Reference Developer Tools Release Notes

Resizing the Player

A demo setup of JW Player with an external link that resizes the player on the fly.

const playerInstance = jwplayer('player').setup({
    playlist: ''

const resizeButton = document.getElementById('resize');
resizeButton.addEventListener('click', () => {
    if (playerInstance.getWidth() > 480) {
        playerInstance.resize(480, 270);
    } else {
        playerInstance.resize(640, 360);
This player implementation is a Proof of Concept only provided to show the possibilities of the JW Player and Platform and should not be taken as an offer to create, edit or maintain custom integration or development.