Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

HTML5 Video updates & Web GL #52

Merged
merged 9 commits into from over 2 years ago

2 participants

Tim Neil Jeffrey Heifetz
Tim Neil

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

api/html5_canvas.js
@@ -22,7 +22,7 @@
22 22 * The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.
23 23 * Any text inside the between <strong>&#60canvas&#62</strong> tags will be displayed in browsers that do not support the canvas element.
24 24 * @BB60+
25   - * @PB10
  25 + * @PB10++
2

mistaken double +

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((9 lines not shown))
  9 +*
  10 +* Unless required by applicable law or agreed to in writing, software
  11 +* distributed under the License is distributed on an "AS IS" BASIS,
  12 +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +* See the License for the specific language governing permissions and
  14 +* limitations under the License.
  15 +*/
  16 +
  17 +/*
  18 +* Taken from: http://www.khronos.org/registry/webgl/specs/latest/ and http://www.khronos.org/opengles/sdk/docs/man/xhtml/
  19 +*/
  20 +
  21 +/**
  22 +* @namespace
  23 +* The WebGLRenderingContext object is used to manage OpenGL state and render to the drawing buffer
  24 +* @toc {User Interface} HTML5 WebGL Canvas Context
3

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

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
api/html5_canvas_context3d.js
((60 lines not shown))
  60 +
  61 +/**
  62 +* @namespace
  63 +* The WebGLContextAttributes interface contains drawing surface attributes and is passed as the second parameter to getContext
  64 +* @PB20
  65 +* @RIPPLE
  66 +*/
  67 +WebGLContextAttributes = { };
  68 +
  69 +/**
  70 +* 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
  71 +* @type boolean
  72 +* @PB20
  73 +* @RIPPLE
  74 +*/
  75 +WebGLContextAttributes.prototype.depth = { };
2

Document the default value with an @default tag

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((68 lines not shown))
  68 +
  69 +/**
  70 +* 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
  71 +* @type boolean
  72 +* @PB20
  73 +* @RIPPLE
  74 +*/
  75 +WebGLContextAttributes.prototype.depth = { };
  76 +
  77 +/**
  78 +* 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
  79 +* @type boolean
  80 +* @PB20
  81 +* @RIPPLE
  82 +*/
  83 +WebGLContextAttributes.prototype.stencil = { };
2

Document the default value with an @default tag

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((78 lines not shown))
  78 +* 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
  79 +* @type boolean
  80 +* @PB20
  81 +* @RIPPLE
  82 +*/
  83 +WebGLContextAttributes.prototype.stencil = { };
  84 +
  85 +/**
  86 +* Default: true. If the value is true and the implementation supports antialiasing the drawing buffer will perform antialiasing using its choice of
  87 +* technique (multisample/supersample) and quality. If the value is false or the implementation does not support antialiasing, no antialiasing is
  88 +* performed
  89 +* @type boolean
  90 +* @PB20
  91 +* @RIPPLE
  92 +*/
  93 +WebGLContextAttributes.prototype.antialias = { };
2

Document the default value with an @default tag

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((87 lines not shown))
  87 +* technique (multisample/supersample) and quality. If the value is false or the implementation does not support antialiasing, no antialiasing is
  88 +* performed
  89 +* @type boolean
  90 +* @PB20
  91 +* @RIPPLE
  92 +*/
  93 +WebGLContextAttributes.prototype.antialias = { };
  94 +
  95 +/**
  96 +* 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
  97 +* the page compositor will assume that colors in the drawing buffer are not premultiplied
  98 +* @type boolean
  99 +* @PB20
  100 +* @RIPPLE
  101 +*/
  102 +WebGLContextAttributes.prototype.premultipliedAlpha = { };
2

Document the default value with an @default tag

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_media.js
@@ -116,7 +124,8 @@ TimeRanges.prototype.length = { };
116 124 * Returns the time for the start of the range with the given index.
117 125 * @param {Number} index
2

The parameter has no description
Also missing an @returns tag

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_media.js
@@ -124,7 +133,8 @@ TimeRanges.prototype.start = function(index) { };
124 133 * Returns the time for the end of the range with the given ind
125 134 * @param {Number} index
2

The parameter has no description
Also missing an @returns tag

Tim Neil
tneil added a note

fixed

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

Has no @returns tag and is incorrectly documented as void

Tim Neil
tneil added a note

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_media.js
@@ -691,7 +748,8 @@ TextTrackCueList.prototype.length = { };
691 748 * @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.
692 749 * @returns TextTrackCue
2

function is incorrectly documented as void

Tim Neil
tneil added a note

fixed

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

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)

api/html5_canvas_context3d.js
((196 lines not shown))
  196 +* @PB20
  197 +* @RIPPLE
  198 +*/
  199 +WebGLActiveInfo.prototype.size = { };
  200 +
  201 +/**
  202 +* The data type of the requested variable.
  203 +* @type GLenum
  204 +* @readOnly
  205 +* @PB20
  206 +* @RIPPLE
  207 +*/
  208 +WebGLActiveInfo.prototype.type = { };
  209 +
  210 +/**
  211 +* The data type of the requested variable.
1

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
api/html5_canvas_context3d.js
((211 lines not shown))
  211 +* The data type of the requested variable.
  212 +* @type String
  213 +* @readOnly
  214 +* @PB20
  215 +* @RIPPLE
  216 +*/
  217 +WebGLActiveInfo.prototype.name = { };
  218 +
  219 +
  220 +/**
  221 +* @type GLenum
  222 +* @constant
  223 +* @PB20
  224 +* @RIPPLE
  225 +*/
  226 +WebGLRenderingContext.STENCIL_BUFFER_BIT = 0x00000400;
1

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
api/html5_canvas_context3d.js
((2,643 lines not shown))
  2643 +WebGLRenderingContext.prototype.getSupportedExtensions = function() { };
  2644 +
  2645 +/**
  2646 +* Returns an object if the passed extension is supported. The object returned from getExtension contains any constants or functions used by the
  2647 +* 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
  2648 +* returned. That object is used to indicate that the extension has been enabled
  2649 +* @param {String} name name of extension
  2650 +* @return {object} an object if the passed extension is supported, or null if not
  2651 +* @PB20
  2652 +* @RIPPLE
  2653 +*/
  2654 +WebGLRenderingContext.prototype.getExtension = function(name) { };
  2655 +
  2656 +/**
  2657 +* Select active texture unit
  2658 +* @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.
1

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
api/html5_canvas_context3d.js
((2,670 lines not shown))
  2670 +*/
  2671 +WebGLRenderingContext.prototype.attachShader = function(program, shader) { };
  2672 +
  2673 +/**
  2674 +* Associate a generic vertex attribute index with a named attribute variable
  2675 +* @param {WebGLProgram} program Specifies the handle of the program object in which the association is to be made.
  2676 +* @param {GLuint} index Specifies the index of the generic vertex attribute to be bound.
  2677 +* @param {String} name Specifies a null terminated string containing the name of the vertex shader attribute variable to which index is to be bound.
  2678 +* @PB20
  2679 +* @RIPPLE
  2680 +*/
  2681 +WebGLRenderingContext.prototype.bindAttribLocation = function(program, index, name) { };
  2682 +
  2683 +/**
  2684 +* Bind a named buffer object
  2685 +* @param {GLenum} target Specifies the target to which the buffer object is bound. The symbolic constant must be ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,679 lines not shown))
  2679 +* @RIPPLE
  2680 +*/
  2681 +WebGLRenderingContext.prototype.bindAttribLocation = function(program, index, name) { };
  2682 +
  2683 +/**
  2684 +* Bind a named buffer object
  2685 +* @param {GLenum} target Specifies the target to which the buffer object is bound. The symbolic constant must be ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.
  2686 +* @param {WebGLBuffer} buffer Specifies the name of a buffer object.
  2687 +* @PB20
  2688 +* @RIPPLE
  2689 +*/
  2690 +WebGLRenderingContext.prototype.bindBuffer = function(target, buffer) { };
  2691 +
  2692 +/**
  2693 +* Bind a named framebuffer object
  2694 +* @param {GLenum} target Specifies the target to which the framebuffer object is bound. The symbolic constant must be FRAMEBUFFER.
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,688 lines not shown))
  2688 +* @RIPPLE
  2689 +*/
  2690 +WebGLRenderingContext.prototype.bindBuffer = function(target, buffer) { };
  2691 +
  2692 +/**
  2693 +* Bind a named framebuffer object
  2694 +* @param {GLenum} target Specifies the target to which the framebuffer object is bound. The symbolic constant must be FRAMEBUFFER.
  2695 +* @param {WebGLFramebuffer} framebuffer Specifies the name of a framebuffer object.
  2696 +* @PB20
  2697 +* @RIPPLE
  2698 +*/
  2699 +WebGLRenderingContext.prototype.bindFramebuffer = function(target, framebuffer) { };
  2700 +
  2701 +/**
  2702 +* Bind a named renderbuffer object
  2703 +* @param {GLenum} target Specifies the target to which the renderbuffer object is bound. The symbolic constant must be RENDERBUFFER.
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,697 lines not shown))
  2697 +* @RIPPLE
  2698 +*/
  2699 +WebGLRenderingContext.prototype.bindFramebuffer = function(target, framebuffer) { };
  2700 +
  2701 +/**
  2702 +* Bind a named renderbuffer object
  2703 +* @param {GLenum} target Specifies the target to which the renderbuffer object is bound. The symbolic constant must be RENDERBUFFER.
  2704 +* @param {WebGLRenderbuffer} renderbuffer Specifies the name of a renderbuffer object.
  2705 +* @PB20
  2706 +* @RIPPLE
  2707 +*/
  2708 +WebGLRenderingContext.prototype.bindRenderbuffer = function(target, renderbuffer) { };
  2709 +
  2710 +/**
  2711 +* Bind a named texture to a texturing target
  2712 +* @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.
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,709 lines not shown))
  2709 +
  2710 +/**
  2711 +* Bind a named texture to a texturing target
  2712 +* @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.
  2713 +* @param {WebGLTexture} texture Specifies the name of a texture.
  2714 +* @PB20
  2715 +* @RIPPLE
  2716 +*/
  2717 +WebGLRenderingContext.prototype.bindTexture = function(target, texture) { };
  2718 +
  2719 +/**
  2720 +* Set the blend color
  2721 +* @param {GLclampf} red specify the red component of BLEND_COLOR
  2722 +* @param {GLclampf} green specify the green component of BLEND_COLOR
  2723 +* @param {GLclampf} blue specify the blue component of BLEND_COLOR
  2724 +* @param {GLclampf} alpha specify the alpha component of BLEND_COLOR
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,717 lines not shown))
  2717 +WebGLRenderingContext.prototype.bindTexture = function(target, texture) { };
  2718 +
  2719 +/**
  2720 +* Set the blend color
  2721 +* @param {GLclampf} red specify the red component of BLEND_COLOR
  2722 +* @param {GLclampf} green specify the green component of BLEND_COLOR
  2723 +* @param {GLclampf} blue specify the blue component of BLEND_COLOR
  2724 +* @param {GLclampf} alpha specify the alpha component of BLEND_COLOR
  2725 +* @PB20
  2726 +* @RIPPLE
  2727 +*/
  2728 +WebGLRenderingContext.prototype.blendColor = function(red, green, blue, alpha) { };
  2729 +
  2730 +/**
  2731 +* Specify the equation used for both the RGB blend equation and the Alpha blend equation
  2732 +* @param {GLenum} mode specifies how source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,726 lines not shown))
  2726 +* @RIPPLE
  2727 +*/
  2728 +WebGLRenderingContext.prototype.blendColor = function(red, green, blue, alpha) { };
  2729 +
  2730 +/**
  2731 +* Specify the equation used for both the RGB blend equation and the Alpha blend equation
  2732 +* @param {GLenum} mode specifies how source and destination colors are combined. It must be FUNC_ADD, FUNC_SUBTRACT, or FUNC_REVERSE_SUBTRACT.
  2733 +* @PB20
  2734 +* @RIPPLE
  2735 +*/
  2736 +WebGLRenderingContext.prototype.blendEquation = function(mode) { };
  2737 +
  2738 +/**
  2739 +* Set the RGB blend equation and the alpha blend equation separately
  2740 +* @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.
  2741 +* @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.
1

constants should use @link tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
api/html5_canvas_context3d.js
((2,735 lines not shown))
  2735 +*/
  2736 +WebGLRenderingContext.prototype.blendEquation = function(mode) { };
  2737 +
  2738 +/**
  2739 +* Set the RGB blend equation and the alpha blend equation separately
  2740 +* @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.
  2741 +* @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.
  2742 +* @PB20
  2743 +* @RIPPLE
  2744 +*/
  2745 +WebGLRenderingContext.prototype.blendEquationSeparate = function(modeRGB, modeAlpha) { };
  2746 +
  2747 +/**
  2748 +* Specify pixel arithmetic
  2749 +* @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.
  2750 +* @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.
1

constants should use @link tags

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

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

Jeffrey Heifetz

Looks great, merging

Jeffrey Heifetz jeffheifetz merged commit 4989af9 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.