[whatwg] <video> element feedback

Shadow2531 shadow2531 at gmail.com
Tue Mar 20 08:18:16 PDT 2007


On 3/20/07, Ian Hickson <ian at hixie.ch> wrote:
> On Sat, 17 Mar 2007, Shadow2531 wrote:
> >
> > "Video content must be rendered inside the element's playback area such
> > that the video content is shown centered in the playback area at the
> > largest possible size that fits completely within it, with the video
> > content's aspect ratio being preserved. Thus, if the aspect ratio of the
> > playback area does not match the aspect ratio of the video, the video
> > will be shown letterboxed."
> >
> > So, that also means that scaletofit in my examples is implied by that?
>
> Yes.

Thanks.

So, if one used <video src="200x200.ogg" style="width: 800px; height:
800px;"></video> , there'd be no way to make the video display at 200
x 200 because it would always scale?

If so, if one wanted to simulate the look I'm describing, would one
have to do the following for example?

<figure style="width: 800px; height: 800px; background: #000;">
    <video src="200x200.ogg" style="width: 200px; height: 200px;"></video>
</figure>

(Just want to be sure.)

> On Fri, 16 Mar 2007, Shadow2531 wrote:
> >
> > A video might be split into separate files (chapters). A playlist is
> > needed to provide consecutive playback without user interaction and to
> > provide view of your choices. If you've ever watched episodes in parts
> > on youtube, you might see why this is important.
>
> Does YouTube support this? I thought YouTube didn't support this, which
> would suggest it's not a high priority...

For youtube, if you play a show that's split up into parts, after the
first part is finished, the flash will *sometimes* display a link to
the next part that you can click on. However, because it's not
automatic, it's not as friendly (depending on the desire of the user).
But, when the next part is not provided at all, it's really
unfriendly.

So, you are correct. Youtube does not do playlists to the extent I was
referring.

Given the low priority for them and the note about JS being required,
a JS simulation of playlists will do.

>> However, what if JS is turned off and you want to do playlists?
>
> If JS is turned off, applications won't work. :-) Just like when you turn
> JS off and try to use Google Calendar, or turn off Flash and try to use
> YouTube. In v2 we can add UI features to handle this, though, such as:

True. Without a default UI and or support for params that provide
initial state, with JS off, the video won't do anything.

> > > > .loop, .startpos
> > > > loop = false | true
> > > > autostart = true | false
> > > > startpos = 0 | specified pos
> > >
> > > Could you elaborate on the use cases for these?
> >
> > <video src="VideoIWasWatching.ogg">
> >    <param name="startpos" value="value gotten from cookie where I left off
> > at">
> > </video>
>
> If the data has to be gotten from a cookie, wouldn't a JS seek() not be
> better? You'll need JS to save the position anyway.

This is another case where I assumed the video element would be usable
without JS. Anyway, the cookie value written out by a php script was
just one example. The saved position could be gotten other ways.

> > <video src="AwesomeMusicVideo.ogg">
> >    <param name="loop" value="true">
> > </video>
>
> Wouldn't the decision of whether to loop or not be a user decision? UAs
> can provide a loop option as a checkable item on a context menu. I'd hate
> to go to a site and have a video keep looping.

I'm thinking more along the lines of a local HTML page that embeds a
local video (one of your favorites for example) where when you load
the page (via a bookmark or a panel for example), it automatically
starts and is set to loop (because you authored it that way).

This is also another use case for playlists. One might create a local
Opera video player panel,  which like winamp, foobar, vlc etc., would
support playlists. (Many have already used OBJECT and plugins for
that.)

In the cases where you just want to play the video, it seems odd to
require JS to do it (not saying it's difficult). However, one can get
used to that. When Audio() was added, JS being a requirement was a
given because there was no element to go along with it.

> > Page where a user is expecting a video to play.
> > <video src="file.ogg">
> >    <param name="autostart" value="true">
> > </video>
>
> We got a bunch of feedback from people saying "never autoplay!". :-)
> Again, the spec allows users to control this now.

Because it's abused by many. Not allowing it would probably be a good deterrent.

So, this is all that is needed to do autostart?

window.onload = function() {
    document.getElementsByTagName("video")[0].play();
};

> > However, if JS is needed for the video element to function at all, then
> > the video element needs to fall back if JS is turned off.
>
> Interesting point.

Yes, since JS is required, if JS is off, the browser should display
the alternate content.

> You can do this with JS, of course (and that's the
> preferred way; hide the fallback when you have JS).

Are you saying that with JS on, the fallback content will be displayed
in addition to the video and you have to use JS to hide the fallback
content like the following?

window.onload = function() {
    var x = document.getElementsByTagName("video")[0];
    x.play();
    x.innerHTML = "";
};


Or, do you just mean that's how the browser would do it automatically?

On a side, the netscape WMP plugin that Opera and FF use requires JS.
If JS is not on, Opera will display the default plugin and the status
bar will warn that you need to enable JS. In the case of the video
element, should we leave that up to the author to give that
information in alternate content?

Thanks. The issues above are solved by the requirement for JS.

Has anyone said anything about data URIs though. I don't think they're
practical for ogg files, but ...

-- 
burnout426



More information about the whatwg mailing list