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

HTML movie dimensions inside player


I am using JWPlayer v6.8. I am trying to solve a few issues we noticed, being:

using the following code, in HTML5 mode (Chrome 33.0.1750.152 on Linux with the flash plugin disabled) the inner movie is scaled down. When I embed without specifying any scaling or height or aspectratio:

bc.. jwplayer('jwplayerid').setup({
flashplayer: 'url_of_swf',
file: 'source_url',
width:'100%',
primary: 'flash',
analytics: {
enabled: false
}
});



Which looks like this:

http://imgur.com/gPvSaOg

When I try to scale the movie up to 100% width by applying EITHER 'aspectratio' or 'stretching' this happens:

bc.. jwplayer('jwplayerid').setup({
flashplayer: 'url_of_swf',
file: 'source_url',
width:'100%',
aspectratio: '16:9',
primary: 'flash',
analytics: {
enabled: false
}
});



http://imgur.com/SX0JtuG

It is the -webkit-transform operation on the <video> node inside span.jwvideo that does this. The native dimensions of the mp4 that I am trying to play are 1280x688 which leads me to believe the player is trying to scale down from the original dimensions rather than the relative dimensions of the player. The movie that I am trying to play is an mp4 encoded with Zencoder on a profile of which we are fairly certain is compatible.

Same behaviour on iPad:

http://imgur.com/tmTsyAa

I have tried setting aspectratio, stretching, width and height to different values in different combinations but I can't seem to find a way to make this reliably work crossbrowser/device.

Flash mode is ok, scales like it should. I unfortunately can't post a live example of this specific instance.

Any suggestions? Much obliged.

5 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

Ethan is asking you to provide a link to your page.

Ethan Feldman

JW Player Support Agent  
0 rated :

That was spam and I deleted it :)

JW Player

User  
1 rated :

Unfortunately can't post a link; our product is a closed off health care system. I might have found the cause for this behaviour though.

Looks like style.width reports the intrinsic width of the source object (the actual mp4) rather than the values set on the video element as attributes. JWPlayer uses this to calculate the ratios for the stretch setting.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ah, got it.

This question has received the maximum number of answers.