@fencer04, I could not get this to work so there must be something i am doing wrong. So there are a couple of questions i need to ask. Please be kind and answer.
1. Currently I have the width and height set as 710px and 400px respectively. what should we put in the height and width dimension in the jwplayer plugin settings ?
2. What do you mean by bring in jquery ? Should i call in from google libraries..if so, which version? I would be glad if you could help me here.
3. My container div is called “main” and the jwplayer container is “#jwplayer-1_wrapper”. I have put the above given snippet within script-tags and put it in the header with these div selectors. But it does not seem to work on resize. Please have a look at the code below and suggest me appropriate corrections.
<script type="text/javascript">
$(document).ready(function(){
resizeVideo();
});
$(window).resize(function(){
resizeVideo();
})
function resizeVideo(){
//Get Width of Container
var width = $("#main").width();
//Calculate height based on width and video aspect ration then add the height of the control bar.
var height = (width * 0.5625) + 40;
//Update the container with the new height and width
$("#jwplayer-1_wrapper").width(width).height(height);
}
</script>
@Longtail – Glad to hear that. But cant wait too long. Future sounds too long.
Thnks guys.