Page 1 of 1

JW Player - responsive video

Posted: Sun Nov 30, 2014 10:40 pm
by andrew55
Would be great to have this worked out (it's over my head). Could be used for youtube but also to view self hosted videos.

JW Player is powerful. They are constantly working out kinks to make player better - work on more mobile devices, etc.

Would be good to be able to set video ratio sizes individually and have a separate poster image for videos if wanted.

This is the age of video!

Re: JW Player - responsive video

Posted: Sun Nov 30, 2014 11:12 pm
by HabNurNeFrage
Hi,

there's no problem to embed flash, iframes etc in an responsive way.

- static outer div width 100%
- a relative insight with padding-bottom:50% and height:0
- and insight of that your object set to absolute left:0 right:0 width:100% height:100%

Example

Code: Select all

<div style="width:100%;">
    <div style="position:relative;padding-bottom:50%;height:0;">
        <object . <iframe <whatever style="position:absolute;left:0;right:0;width:100%;height:100%;">
            <params, falbacks, whatever />
        </endtag>
    </div>
</div> 
Now your Object changes its width automatically.
Adjusting aspect by changing the bottom-padding...

Cheers, HaNNF

Re: JW Player - responsive video

Posted: Sun Nov 30, 2014 11:20 pm
by andrew55
HabNurNeFrage - thanks for the reply.

Are you confident this method could be used to display mp4 (H.264) responsive videos, which would play on any device (desktop, iphone, android, etc)?

If so, do you have an example of how to include an mp4 with a poster image in the snippet?

Thanks for any insights.