Reputation: 25
Can anyone explain why this js script does not work when I zoom in my web browser?
function resizePlayer(){
if(jwplayer().getWidth() == 596) {
jwplayer().resize(1004,565);
} else {
jwplayer().resize(596,335);
}
};
Upvotes: 0
Views: 145
Reputation: 1333
function resizePlayer(){
if(jwplayer().getWidth() == 596) {
jwplayer().resize(1004,565);
} else {
jwplayer().resize(596,335);
}
};
you need attach the listener to an element such as window :
window.onresize = resizePlayer;
http://www.w3schools.com/jsref/event_onresize.asp
Upvotes: 1