Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Resizing jwplayer7 iframe when orientation changes


Hello,

I'm having an issue with JWP7, when the player is loading on portrait or landscape mode it stretches out to the full window as expected, but when changing the device orientation while the player is still playing, the player doesn't scaling the the new window dimensions.

Code example:

#player.height = $window.height;

jwplayer("myElement").setup({
file: "somevideo.mp4",
width: windows.width,
height: windows.height,
});

<div id="player">
<div class="close_btn fadeIn"><img src="/img/close.png" width="50" /></div>
<div id='player_frame'>
<iframe id=""video_iframe></iframe>
</div>
</div>


@media screen and (orientation:portrait) {
.video_iframe
{
height: 100vh;
overflow: hidden;
width: 100vw;
}
}

@media screen and (orientation:landscape) {
.video_iframe
{
height: 100vh;
width: 100vw;
}
}


Any suggestions?

Thank you all in advance.

1 Community Answers

George

JW Player Support Agent  
0 rated :

Could you send me the test page that is having the issue?

This question has received the maximum number of answers.