I am developing a page with 3 JWPs in a row with each set to 360px width in the parameters. This works fine for desktop but the iphone has max 480 (landscape) and 320 (portrait). I have a separate CSS to reduce the screen size for iphone, but can't seem to reduce the width of the JWP to L160 and P100. Is it possible using CSS?
I have tried to set a maximum width of the div containing the JWP, but it maintains it's size and just pushes outside the div.
Failing a CSS solution, do you have any other ideas? I would really like to maintain the 3 videos in a row. I also want to avoid reducing the desktop JWP size down to 320px just to cater for the iphone portrait view.
The big question is how to integrate JWP with FitVids. Does it require custom settings? Looking at my live code in Firebug, it doesn't seem to catch the resizing at all. bc.. <div id="video1_wrapper" style="position: relative; width: 480px; height: 360px;"> <div class="fluid-width-video-wrapper" style="">
@Rick – The demo of fitvids, the bottom player is a JW Player, and it works fine. It just uses an iframe and then you specify the frame a custom player in fitvids. The file tests.html has it.
I just need the JWP to resize, depending on the screen size viewing it. I can use CSS to change all other parts of the page, except for the JWP which remains locked at the height and width set in the html.
I found a semi-solution. If the player is set to 100%, the containing div can control the size of the player. Very good. Problem solved for desktop. Seems I missed this part of the documentation.
However, it doesn't resize for iphone. The video just wants to fit the screen, never more, never less. I guess I'll have to live with that and work with it.
Sorry, missed your post. Your right, I had the wrong path to the JS, sorry. Thanks! Their test page now works. Sorry for my blunder.
Please bare with me while I try to get my head around all this new stuff.
When you wrote "It just uses an iframe and then you specify the frame a custom player in fitvids.", the iframe version is not really the same as my local player, so I'm having trouble interpreting what they've done. They have 3 sizing elements. The video id (which isn't in their html) is set to W:100% H:auto, their iframe is set to W:520 H:391 and the container div is set to W:70%.
What I am not understanding, and hope you can help me with specifics, are *which elements are 100%, which elements are in pixels and which elements determine the size of the player*. No matter what I try with my iphone.css I can not manage to get the player to resize itself and stay within the containing div.
An iFrame is a way to link to a page inside of a page (kind of).
So they have:
<div class="vendor">
<iframe width="520px" height="391px" src="http://socialcam.com/videos/XRMP3Y5t/embed?utm_campaign=web&utm_source=embed" frameborder="0" allowfullscreen></iframe>
</div>And you could make it:
<div class="vendor">
<iframe width="520px" height="391px" src="http://www.yoursite.com/player.html" frameborder="0" allowfullscreen></iframe>
</div>And then player.html has your player code that you provided above.
I'm working with JW Playr 5.8 and fitvids.js. I have fitvids set up correctly and it is scaling videos from YouTube that are embedded on my site.
But I'm still struggling to get JWplayer to be responsive with fitvids.
If I understand correctly, I can put my JW Player javascript embed code on a page, using width=100%/height=100%. Then call that page into an iFrame, which in turn, is then scalable/responsive.
But what I don't get is this: Doesn't that mean I have to create a separate page just to "house" this 100%x100% JW Player embed code?
If I'm reading Ethan's explanation correctly that means I need to create hundreds of pages that just for video embed sources for iFrames?
This makes me think I must be totally missing something painfully obvious? Or, I'm just lazy. But with 200+ videos to embed on my site, there must be a more efficient method?
Am I missing something? Or do you really need to create a separate page for each video then call it to an iFrame in order to have a responsive JW player?
You would call a page into the iframe thus in answer to your question you would need to make pages.
I can give you, if wanted a great function that will create your iframe one which I have used for years. It does require a bit of knowledge in JavaScript and DOM.
I have many examples of this on my web site especially in the section where I use flash apps to call an iframe that play a video using the JWPlayer.
Feel free to visit my web site, mirana.net have a look around and then IF you have additional questions contact me.
You may even enjoy the photo slide shows of the Canadian Rocky Mtns ;-)
Thank you so much for the reply and the patriotism! And my apologies for such a long interval in my own reply.
I checked out your site at www.mirana.net.
But I admit, I couldn't really discern where or how on your site you were using responsive JW player?
Being completely JS and PHP illiterate, I'm stuggling to keep up with some of the more informed answers here. But will keep trying to learn.
PS: Nice pics of Alberta and Europe.(I'm in BC).
@ethan
I am playing with MediaElementjs, which seems (so far) to enable me to have a perfectly responsive player with Flash fallback using width="100%" and height="100%".
But of course - I'd prefer to use a commercial JW player.
Do you think that JW Player might add the ability to set 100% dimensions anytime soon?
FitVids is a slick way to scale any video to any size, and it works with the JW Player, and yes, this has been there for a few versions now (the test page I linked above).
Does fitvids work with JW Player on wordpress sites as well? My wordpress theme has full responsive layout however jw player does not automatically resize. Can see here: http://adiflash.com/adrian/jw-player/
Any way i can use fitvids for jw player to automatically resize with my theme?
Hi - I've got to find a way to do this without using an iframe. Can you think of a way to achieve the same effect with some sort of combination of jquery / javascript?
I'll give you a trick for a responsive JW player. (I just finished two hours of work on it. It was not easy to figure out...).
You have to know two things : <ul> <li>VIDEO_WIDTH (& VIDEO_HEIGHT for the calculus below)</li> <li>VIDEO_RATIO = 100 * VIDEO_HEIGHT / VIDEO_WIDTH</li> </ul>
We have *.post_video* is sized by the width of the video given, but limited by 100%. And the trick is that *.video_wrapper*, width the padding-bottom set a correct ratio. Inside this wrapper, *</strong> take 100% of width and height and is positionned absolutely. And inside, the div generated by the JS Embedder which size is 100% of width and width as we tell.
Tested on FF, Chrome & Android.
A bit complicated, but there is a <strong>position: relative* added in the inline style attribute of the inserted div by the JS Embedder that force us to add the *div.video_wrapper_inside*.
We have *.post_video* which is sized by the given width, but limited by 100%. And the trick is that for *.video_wrapper*, the padding-bottom sets the correct ratio. Inside this wrapper, *.video_wrapper_inside* takes 100% of width and height and is positioned absolutely. And inside again, there is the div generated by the JS Embedder which size is 100% of width and height as we tell.
a note for anyone finding this old thread a bit confusing - i was able to solve the problem of dynamically sizing the flash player without any of this iframe business by using good old javascript to manipulate the flash object width and height attributes. The player respects the new dimensions you give it (i believe you have to give the flash attributes an actual pixel value instead of 100%) and sizes the video accordingly.
I am very interested in this posting, but I am a novice and cannot understand the process. I am using JW Player via JoomlaRuleZ and I want to be able to display a YouTube playlist so that it is responsive. I am using the JW Player plugin, can you give me some very basic instructions, please.
After trying all these things, I decided that I could easily write a small script to detect screen size change with JQUERY and apply a new height and width to my player container. The only important thing to note about this code is that you need to know your videos aspect ratio. It works PERFECTLY. It also handles orientation changes without any issues.
My video is 16:9, I hard coded the values into my function. But if you know the ratio before hand, you could replace the values with variables that change depending on your video.
With Firefox, the video window will expand WHILST you resize (i.e. only whilst dragging), but 'fallback' to its proper size when you stop dragging or release.
WIth safari, the vidoe WINDOW doesn't expand on resizing like firefox, but the CONTENT does. Like as though overflow = hidden.
Hey, Ethan. Thanks for your help with my MIME types issue. I'm still getting that worked out with the host.
In the meantime, are you able to see what I'm doing wrong on this page (please view in a browser other than IE, since I still need to resolve the MIME types issue, which only seems to be affecting IE)...
http://hope.casey.org/video/
I'm trying to use the fitvids method you described in this thread... not sure what I've done wrong, but the video isn't resizing.
Yeah, still trying to get in touch with my server admin on that one. You think the MIME issue is affecting how FitVids renders the player in other browsers too?
The MIME issue is fixed now (I was just having a hard time getting ahold of my server admin.) The video plays now.
http://hope.casey.org/video
I'm just on this thread for FitVids help... but you have been more than generous with your time and patience already, so no worries if you don't feel like digging into my resizing issue as well.