[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] texImage2D calls with HTMLVideoElement

El día 13 de agosto de 2010 12:27, Kenneth Russell <kbr@google.com> escribió:
> On Fri, Aug 13, 2010 at 11:03 AM, Adrienne Walker <enne@google.com> wrote:
>> 2) Regarding the texImage2D call with the HTMLVideoElement, the spec
>> is unclear about how to handle poster attributes.  Is this
>> intentionally left as an implementation detail?
> I'm sure this is an oversight on our part. If you have any suggestions
> on additional spec text please let us know.

After some thought, I think this is more general than just the poster
attribute.  Video controls have a similar problem.  Also, border,
width, and height attributes on an image tag bring up similar

My expectation for the use case of these texImage2D calls is for a
user to create an out-of-DOM element, using the src attribute to
coerce the browser into doing the heavy lifting for the media loading
or using the canvas API for programmatic texture generation.  I don't
expect users to want a pixel-for-pixel copy of, for example, the video
controls that would appear if they set controls=true on a video

Following that line of thought, it would be useful if the spec listed
a minimum set of attributes per element that are required to be
supported when generating source image data from an element.  If
you're asking for suggestions, I would add something like the
following paragraph:

The source image data specified by an HTML element is not guaranteed
to respect all attributes on that element.  texImage2D from an
HTMLImageElement is only required to support the src attribute.
texImage2D from an HTMLCanvasElement is only required to support the
width and height attributes.  texImage2D from an HTMLVideoElement will
upload the current frame of the video specified by the src attribute.

I'll admit that I'm a little unsure on how to word that last sentence.
 I think attributes like autoplay, loop, or playbackrate should be
respected, but I also didn't want to list the entire grab bag of
attributes that affect what frame is currently playing.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: