HTML5 Video updates & Web GL #52

Merged
merged 9 commits into from Dec 15, 2011

2 participants

@tneil

Video:
I corrected some copy paste issues with video, and removed the problematic code example.

I also fixed the supported on tags to be 7.0+. While the video element is there on BB6, it doesn't actually play video.

WebGL:
This includes the new WebGL documentation as well as the ability to support tagging for PlayBook 1.0, 1.0+ and 2.0

@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_canvas.js
@@ -22,7 +22,7 @@
* The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.
* Any text inside the between <strong>&#60canvas&#62</strong> tags will be displayed in browsers that do not support the canvas element.
* @BB60+
- * @PB10
+ * @PB10++
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

mistaken double +

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/*
+* Taken from: http://www.khronos.org/registry/webgl/specs/latest/ and http://www.khronos.org/opengles/sdk/docs/man/xhtml/
+*/
+
+/**
+* @namespace
+* The WebGLRenderingContext object is used to manage OpenGL state and render to the drawing buffer
+* @toc {User Interface} HTML5 WebGL Canvas Context
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

The WebGL context has a TOC entry but 2D does not. We should be consistent

@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Sorry, was thinking of an older version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+
+/**
+* @namespace
+* The WebGLContextAttributes interface contains drawing surface attributes and is passed as the second parameter to getContext
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes = { };
+
+/**
+* Default: true. If the value is true, the drawing buffer has a depth buffer of at least 16 bits. If the value is false, no depth buffer is available
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.depth = { };
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Document the default value with an @default tag

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+
+/**
+* Default: true. If the value is true, the drawing buffer has a depth buffer of at least 16 bits. If the value is false, no depth buffer is available
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.depth = { };
+
+/**
+* Default: false. If the value is true, the drawing buffer has a stencil buffer of at least 8 bits. If the value is false, no stencil buffer is available
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.stencil = { };
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Document the default value with an @default tag

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* Default: false. If the value is true, the drawing buffer has a stencil buffer of at least 8 bits. If the value is false, no stencil buffer is available
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.stencil = { };
+
+/**
+* Default: true. If the value is true and the implementation supports antialiasing the drawing buffer will perform antialiasing using its choice of
+* technique (multisample/supersample) and quality. If the value is false or the implementation does not support antialiasing, no antialiasing is
+* performed
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.antialias = { };
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Document the default value with an @default tag

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* technique (multisample/supersample) and quality. If the value is false or the implementation does not support antialiasing, no antialiasing is
+* performed
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.antialias = { };
+
+/**
+* Default: true. If the value is true the page compositor will assume the drawing buffer contains colors with premultiplied alpha. If the value is false
+* the page compositor will assume that colors in the drawing buffer are not premultiplied
+* @type boolean
+* @PB20
+* @RIPPLE
+*/
+WebGLContextAttributes.prototype.premultipliedAlpha = { };
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Document the default value with an @default tag

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_media.js
@@ -116,7 +124,8 @@ TimeRanges.prototype.length = { };
* Returns the time for the start of the range with the given index.
* @param {Number} index
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

The parameter has no description
Also missing an @returns tag

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_media.js
@@ -124,7 +133,8 @@ TimeRanges.prototype.start = function(index) { };
* Returns the time for the end of the range with the given ind
* @param {Number} index
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

The parameter has no description
Also missing an @returns tag

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on the diff Nov 25, 2011
api/html5_media.js
@@ -294,7 +315,8 @@ HTMLMediaElement.prototype.load = function () { };
* play media resources of the given type.
* @param {String} type The media type you are trying to play, for example: "application/octet-stream;codecs=theora" would return an empty string.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Has no @returns tag and is incorrectly documented as void

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz and 1 other commented on an outdated diff Nov 25, 2011
api/html5_media.js
@@ -691,7 +748,8 @@ TextTrackCueList.prototype.length = { };
* @param {String} id Returns the first text track cue (in text track cue order) with text track cue identifier id. Returns null if none of the cues have the given identifier or if the argument is the empty string.
* @returns TextTrackCue
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

function is incorrectly documented as void

@tneil
tneil added a line comment Nov 25, 2011

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz

You need to update the following line -https://github.com/blackberry-webworks/WebWorks-API-Docs/blob/c7d0caa2a8b690eb280af19cb7f57a3ee63d59fa/build/bbPlugin.js#L197

This playbook support tag is used in the templates for document elements that are only true for the playbook (ie permissions)

@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* @PB20
+* @RIPPLE
+*/
+WebGLActiveInfo.prototype.size = { };
+
+/**
+* The data type of the requested variable.
+* @type GLenum
+* @readOnly
+* @PB20
+* @RIPPLE
+*/
+WebGLActiveInfo.prototype.type = { };
+
+/**
+* The data type of the requested variable.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

Looks like a copy/paste error. Should refer to the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* The data type of the requested variable.
+* @type String
+* @readOnly
+* @PB20
+* @RIPPLE
+*/
+WebGLActiveInfo.prototype.name = { };
+
+
+/**
+* @type GLenum
+* @constant
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.STENCIL_BUFFER_BIT = 0x00000400;
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

The value of these constants aren't appearing. They will all require an @default tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+WebGLRenderingContext.prototype.getSupportedExtensions = function() { };
+
+/**
+* Returns an object if the passed extension is supported. The object returned from getExtension contains any constants or functions used by the
+* extension, if any. A returned object may have no constants or functions if the extension does not define any, but a unique object must still be
+* returned. That object is used to indicate that the extension has been enabled
+* @param {String} name name of extension
+* @return {object} an object if the passed extension is supported, or null if not
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.getExtension = function(name) { };
+
+/**
+* Select active texture unit
+* @param {GLenum} texture Specifies which texture unit to make active. The number of texture units is implementation dependent, but must be at least two. texture must be one of TEXTUREi, where i ranges from 0 to (MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1). The initial value is TEXTURE0.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

These constants should be using @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+*/
+WebGLRenderingContext.prototype.attachShader = function(program, shader) { };
+
+/**
+* Associate a generic vertex attribute index with a named attribute variable
+* @param {WebGLProgram} program Specifies the handle of the program object in which the association is to be made.
+* @param {GLuint} index Specifies the index of the generic vertex attribute to be bound.
+* @param {String} name Specifies a null terminated string containing the name of the vertex shader attribute variable to which index is to be bound.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindAttribLocation = function(program, index, name) { };
+
+/**
+* Bind a named buffer object
+* @param {GLenum} target Specifies the target to which the buffer object is bound. The symbolic constant must be ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindAttribLocation = function(program, index, name) { };
+
+/**
+* Bind a named buffer object
+* @param {GLenum} target Specifies the target to which the buffer object is bound. The symbolic constant must be ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.
+* @param {WebGLBuffer} buffer Specifies the name of a buffer object.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindBuffer = function(target, buffer) { };
+
+/**
+* Bind a named framebuffer object
+* @param {GLenum} target Specifies the target to which the framebuffer object is bound. The symbolic constant must be FRAMEBUFFER.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindBuffer = function(target, buffer) { };
+
+/**
+* Bind a named framebuffer object
+* @param {GLenum} target Specifies the target to which the framebuffer object is bound. The symbolic constant must be FRAMEBUFFER.
+* @param {WebGLFramebuffer} framebuffer Specifies the name of a framebuffer object.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindFramebuffer = function(target, framebuffer) { };
+
+/**
+* Bind a named renderbuffer object
+* @param {GLenum} target Specifies the target to which the renderbuffer object is bound. The symbolic constant must be RENDERBUFFER.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindFramebuffer = function(target, framebuffer) { };
+
+/**
+* Bind a named renderbuffer object
+* @param {GLenum} target Specifies the target to which the renderbuffer object is bound. The symbolic constant must be RENDERBUFFER.
+* @param {WebGLRenderbuffer} renderbuffer Specifies the name of a renderbuffer object.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindRenderbuffer = function(target, renderbuffer) { };
+
+/**
+* Bind a named texture to a texturing target
+* @param {GLenum} target Specifies the target of the active texture unit to which the texture is bound. Must be either TEXTURE_2D or TEXTURE_CUBE_MAP.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+
+/**
+* Bind a named texture to a texturing target
+* @param {GLenum} target Specifies the target of the active texture unit to which the texture is bound. Must be either TEXTURE_2D or TEXTURE_CUBE_MAP.
+* @param {WebGLTexture} texture Specifies the name of a texture.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.bindTexture = function(target, texture) { };
+
+/**
+* Set the blend color
+* @param {GLclampf} red specify the red component of BLEND_COLOR
+* @param {GLclampf} green specify the green component of BLEND_COLOR
+* @param {GLclampf} blue specify the blue component of BLEND_COLOR
+* @param {GLclampf} alpha specify the alpha component of BLEND_COLOR
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+WebGLRenderingContext.prototype.bindTexture = function(target, texture) { };
+
+/**
+* Set the blend color
+* @param {GLclampf} red specify the red component of BLEND_COLOR
+* @param {GLclampf} green specify the green component of BLEND_COLOR
+* @param {GLclampf} blue specify the blue component of BLEND_COLOR
+* @param {GLclampf} alpha specify the alpha component of BLEND_COLOR
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.blendColor = function(red, green, blue, alpha) { };
+
+/**
+* Specify the equation used for both the RGB blend equation and the Alpha blend equation
+* @param {GLenum} mode specifies how source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.blendColor = function(red, green, blue, alpha) { };
+
+/**
+* Specify the equation used for both the RGB blend equation and the Alpha blend equation
+* @param {GLenum} mode specifies how source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.blendEquation = function(mode) { };
+
+/**
+* Set the RGB blend equation and the alpha blend equation separately
+* @param {GLenum} modeRGB specifies the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
+* @param {GLenum} modeAlpha specifies the alpha blend equation, how the alpha component of the source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz jeffheifetz commented on an outdated diff Nov 25, 2011
api/html5_canvas_context3d.js
+*/
+WebGLRenderingContext.prototype.blendEquation = function(mode) { };
+
+/**
+* Set the RGB blend equation and the alpha blend equation separately
+* @param {GLenum} modeRGB specifies the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
+* @param {GLenum} modeAlpha specifies the alpha blend equation, how the alpha component of the source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
+* @PB20
+* @RIPPLE
+*/
+WebGLRenderingContext.prototype.blendEquationSeparate = function(modeRGB, modeAlpha) { };
+
+/**
+* Specify pixel arithmetic
+* @param {GLenum} sfactor Specifies how the red, green, blue, and alpha source blending factors are computed. The following symbolic constants are accepted: ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR, SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, ONE_MINUS_CONSTANT_ALPHA, and SRC_ALPHA_SATURATE. The initial value is ONE.
+* @param {GLenum} dfactor Specifies how the red, green, blue, and alpha destination blending factors are computed. The following symbolic constants are accepted: ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR, SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA. CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR, CONSTANT_ALPHA, and ONE_MINUS_CONSTANT_ALPHA. The initial value is ZERO.
@jeffheifetz
jeffheifetz added a line comment Nov 25, 2011

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jeffheifetz

I've given up commenting every function that refers to constants, but know that I think they should be links

@jeffheifetz

Looks great, merging

@jeffheifetz jeffheifetz reopened this Dec 15, 2011
@jeffheifetz jeffheifetz merged commit 4989af9 into master Dec 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment