Kokodoko
Kokodoko

Reputation: 28128

JWPlayer aspect ratio keeps 4:3 for my 16:9 video

I am loading an RTMP video stream in JWPlayer. The video stream should be 16:9 but is displayed as 4:3.

My embed code:

var playerInstance = jwplayer("target");
playerInstance.setup({
    file: "rtmp://mystreamhere",
    autostart: true,
    repeat: "always",
    primary: "flash",
    controlbar: "none",
    icons: false,
    width: "100%",
    aspectratio: "16:9"
});

I am also reading the metadata of the video to see if there is something weird going on. It only includes the width of the video, is that correct? Shouldn't it include height or aspect ratio?

My stream metadata:

bandwidth: "1.79769313486231e+308"
bufferfill: 0
qualitylevel: 0
screenwidth: 820
transitioning: "false"

Can I somehow force JWplayer to display the video as 16:9 ? Or is there something missing in my code?

Upvotes: 1

Views: 4543

Answers (1)

emaxsaun
emaxsaun

Reputation: 4201

Under:

file: "rtmp://mystreamhere",

Try to add:

stretching: "exactfit",

Upvotes: 2

Related Questions