video

namespace video

Summary


Public Properties


renderer video.js:34
renderer: CanvasRenderer | WebGLRenderer = undefined

CanvasRenderer | WebGLRenderer

A reference to the active Canvas or WebGL active renderer renderer

Public Methods


createCanvas video.js:120
createCanvas(width: number, height: number, returnOffscreenCanvas: boolean) → {HTMLCanvasElement | OffscreenCanvas}

Create and return a new Canvas element

Parameters:
Name Type Attributes Default Description
width number

width

height number

height

returnOffscreenCanvas boolean

<optional>

false

will return an OffscreenCanvas if supported

Returns:
Type Description
HTMLCanvasElement | OffscreenCanvas

a new Canvas element of the given size

getParent video.js:152
getParent() → {HTMLElement}

return a reference to the parent DOM element holding the main canvas

Returns:
Type Description
HTMLElement

the HTML parent element

init video.js:41
init(width: number, height: number, options: Application.Settings) → {boolean}

Initialize the "video" system (create a canvas based on the given arguments, and the related renderer).

// init the video with a 640x480 canvas
me.video.init(640, 480, {
    parent : "screen",
    renderer : me.video.AUTO,
    scale : "auto",
    scaleMethod : "fit"
});
Parameters:
Name Type Attributes Description
width number

The width of the canvas viewport

height number

The height of the canvas viewport

options Application.Settings

<optional>

optional parameters for the renderer

Returns:
Type Description
boolean

false if initialization failed (canvas not supported)


Powered by webdoc!