[whatwg] Video proposals
Shadow2531
shadow2531 at gmail.com
Sat Mar 17 03:56:53 PDT 2007
On 3/16/07, Dean Edridge <dean at 55.co.nz> wrote:
> I think the idea of having an attribute for the aspect ratio of a video
> is a great idea, especially given the fact that web sites today should
> be as fluid / liquid as possible since there is a need to cater for a
> range of different screen sizes.
> So this gets my vote FWIW.
Just some thoughts...
I think some video sites might want to use a video element template of
a certain size.
For example, every video page on a site might have a 400 x 400 video
element (to fit with the layout for example), but the video that plays
in it will range in size and aspect ratio.
A way to solve that so the layout of the page is not disrupted would
be to have the video element represent the video screen area where the
video itself can be scaled and centered inside it by the browser.
For example, if the 400 x 400 video element plays a 640 x 480 video
and keepaspect is set, the video would show centered inside the screen
area at 400 x 300. If keepaspect is not set, the video would show at
400 x 400.
If the video was 300 x 120, it'd show at it's original size whether
keepaspect was set or not, unless scaletofit was set. If scaletofit
was set, then keepaspect would cause the video to show at 400 x 160.
If keepaspect wasn't set and scaletofit was, the video would show at
400 x 400.
Examples:
Video element is 400 x 400, but video shows at 400 x 300 inside it.
<video src="640x480.ogg" width="400" height="400" keepaspect></video>
Video element is 400 x 400 and video shows at 400 x 400 inside it.
<video src="640x480.ogg" width="400" height="400"></video>
Video element is 400 x 400 and video shows at 300 x 120 inside it.
<video src="300x120.ogg" width="400" height="400"></video>
Video element is 400 x 400 and video shows at 300 x 120 inside it.
<video src="300x120.ogg" width="400" height="400" keepaspect></video>
Video element is 400 x 400 and video shows at 400 x 400 inside it.
<video src="300x120.ogg" width="400" height="400" scaletofit></video>
Video element is 400 x 400 and video shows at 400 x 160 inside it.
<video src="300x120.ogg" width="400" height="400" scaletofit keepaspect></video>
(scaletofit is implied when the video is larger than the video element)
You might be able to simulate all of that by putting the video element
in another element and playing with css, but that probably wouldn't be
as friendly.
--
burnout426
More information about the whatwg
mailing list