[whatwg] <video> element proposal
Shadow2531
shadow2531 at gmail.com
Wed Feb 28 21:27:45 PST 2007
On 2/28/07, Anne van Kesteren <annevk at opera.com> wrote:
> Hi,
>
> Opera has some internal expiremental builds with an implementation of a
> <video> element. The element exposes a simple API (for the moment) much
> like the Audio() object:
I think it'd be cool if the video element *just* supported theora.
If it supports whatever the browser wants to implement, we'd have to
do like the following I think.
<video src="test.wmv">
<video src="test.mpg">
<video src="test.ogg>
I give up
</video>
</video>
</video>
You probably want the video element to be really, really basic, but I
don't think it should be. It needs to have some features (eventually).
These are just some of the things *I* might like.
Events should be supported on the element (even on the video area):
document.getElementsByTagName("video")[0].addEventListener("click",
function(e) {
e.target.pause();
}, false);
onbuffering, onplaystatechange, onvolumechange (maybe),
onpositionchange, ondownloadcomplete etc. (also via addEventListener)
Some methods|properties:
.getPlayState(), .getVideoWidth() (original size the video was made
at), .getVideoHeight()(original size the video was made at),
.getFileSize(), .getPos(), .setPos()
.volume, .loop, .startpos, .autostart, .allowseek
params (default first):
volume = 50 | 0 - 100
allowseek = true | false
loop = false | true
autostart = true | false
startpos = 0 | specified pos
(how useful is a playcount param? I myself either want it to play once
or forever and not in between.)
video {width: 100%; height: 100%;} should make the video element (and
of course the video itself along with it) autoresize with its
surroundings like an img would.
Changing style.width for example would adjust the video element's (and
of course the video's) width without disrupting playback.
Getting carried away, but I also would like the video element to
support xspf playlists that specify URIs to ogg files.
<http://www.xspf.org/quickstart/>. In that case, an onvideochange
event may be in order and a VideoElement.playlistDoc could be used to
reference the playlist tree. (If for example, you wanted to grab data
out of the xml playlist.)
I assume you want the width and height attributes to be used only for
specifying the original width and height the video was made at, and
css should be used to set the width and height to a % or px etc.?
--
burnout426
More information about the whatwg
mailing list