Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize an embed tag, not crop it

Tags:

html

embed

How do I resize an embed tag (like how one can resize an img tag)?

Example:

<embed src="1.mp4" width="1280" height="1024" />

This works fine because the original is 1280 x 1024. But if I

<embed src="1.mp4" width="640" height="512" />

Then it crops the movie rather than sizing it.

like image 950
Phillip Senn Avatar asked Feb 26 '23 19:02

Phillip Senn


1 Answers

Is it possible to resize an embedded .mov?

You need the scale="tofit" attribute at the end of your embed tag.

<embed src="1.mp4" width="640" height="512" scale="tofit"/>

In IE 7, 8 when using Quicktime you should add:

<param name="SCALE" VALUE="aspect" >

Otherwise the video will be cropped.

like image 112
nearlymonolith Avatar answered Mar 06 '23 05:03

nearlymonolith