3249 posts Nice Guy
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
+6 more
RubenBristian says

I have a template that use vimeo videos, and i made a custom oauth_key for the template. I pass it along with the template, so there’s no problem i guess..

1675 posts Envato Elite Author
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Europe
  • Has been a member for 4-5 years
  • Referred between 10 and 49 users
+1 more
Tean says


So if I want to use the video with “fit outside” aspect ratio, as I scale (enlarge) the player, controls scale with it, and then I end up with half of the controls sticking out of the player and not visible.

Well, to size it you should use the api_setSize method… you can’t give it a width and height like you do with any other object…

Then the fit outside is useless, because the video is already scaled within the player, so it’s enough to make it big like your max area size… as well for youtube players…

I am using setSize, and then apply aspect ratio inside my masked area.

So lets say I have a video 640×480 (original size), this would be 800×600 proportionally enlarged.

And lets say my area which I want to fill is 900×600.

If I used “fit inside” then I would just place it inside my area (and center).

Since I want “fit outside”, I would then sizeSize video to 900×675 (which is proportional) and then I have 75 pixels of spare on height side.

So if I center this inside my area which is masked, I am going to loose 37px on top and bottom of the video, thats fine since its “fit outside”, however controls are still at the bottom of the video and are going to get cut of by my mask.

Thats what I was talking about.

Now I know I can set video size directly to 900×600 but then video will get scaled inside the player (like you said) and I will theoretically get “fit inside” and blank space around video which I dont want.

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says



So if I want to use the video with “fit outside” aspect ratio, as I scale (enlarge) the player, controls scale with it, and then I end up with half of the controls sticking out of the player and not visible.

Well, to size it you should use the api_setSize method… you can’t give it a width and height like you do with any other object…

Then the fit outside is useless, because the video is already scaled within the player, so it’s enough to make it big like your max area size… as well for youtube players…

I am using setSize, and then apply aspect ratio inside my masked area.

So lets say I have a video 640×480 (original size), this would be 800×600 proportionally enlarged.

And lets say my area which I want to fill is 900×600.

If I used “fit inside” then I would just place it inside my area (and center).

Since I want “fit outside”, I would then sizeSize video to 900×675 (which is proportional) and then I have 75 pixels of spare on height side.

So if I center this inside my area which is masked, I am going to loose 37px on top and bottom of the video, thats fine since its “fit outside”, however controls are still at the bottom of the video and are going to get cut of by my mask.

Thats what I was talking about.

Now I know I can set video size directly to 900×600 but then video will get scaled inside the player (like you said) and I will theoretically get “fit inside” and blank space around video which I dont want.

You can do what u want only if you know the original video size to size the player proportionally and fit an area… unfortunately, both youtube and vimeo, don’t have an api call to know the original video size or to access its metadata.

by
by
by
by
by
by