
Two players, resize #1 down on completion, resize #2 up on completion of #1
I've got two players on the same page, I want to resize #1 to (1,1px) when it completes, and resize #2 to twice it's height.
I'm a newbie with javascript and couldn't find sufficient examples to get it done. Here's my code:
<div id="myElement1"></div>
<script type="text/javascript">
jwplayer("myElement1").setup({
file: "http://egbn.org/Jwp6test/EGBN_video_logo.mp4",
image: "http:/egbn.org/images/egbn_still_logo.png",
displaytitle: false,
controls: false,
autostart: true,
stretching: "exactfit",
width: "100%",
height: 360
});
</script>
<div id='myElement2'</div>
<!-- resize height: 5 -->
<script type='text/javascript'>
jwplayer().onComplete(jwplayer().resize(5,5));
</script>
<div id='myElement3'</div>
<script type='text/javascript'>
jwplayer('myElement2').setup({
playlist: "http://egbn.org/JWP6test/testplaylist.xml",
listbar: {
position: 'right',
size: 300
},
displaytitle: false,
width: "100%",
height: 360
});
</script>
javascript:jwplayer(1).resize("100%",600);
How do I fix this to accomplish my goals?
BTW, your link on responsive player demo (Check out this demo [http://demo.jwplayer.com/nyvideo/#slide-4] to test out a responsive vs a non-responsive JW Player.) Is Broken...