MediaSource
Constructor Summary
| Public Constructor | ||
| public |
constructor(properties: Object, gl: WebGLContext) Parent class of all MediaSources
|
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
duration: * |
|
| public |
element: * |
|
| public |
gl: * |
|
| public |
height: * |
|
| public |
id: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
src: * |
|
| public |
start: * |
|
| public |
texture: * |
|
| public |
width: * |
|
Method Summary
| Public Methods | ||
| public |
destroy() Clean up the MediaSource for detruction.
|
|
| public |
Check if the MediaSource is ready to start playing.
|
|
| public |
Set the MediaSource loading, when it's ready isReady() will return true.
|
|
| public |
onready(mediaSource: *) |
|
| public |
pause() Pause the MediaSource if it is playing.
|
|
| public |
play() Set the MediaSource playing.
|
|
| public |
render(program: *, renderParameters: *, textures: *) Render the MediaSource to the WebGL context passed into the constructor.
|
|
| public |
Seek the MediaSource to an appropriate point for the passed time.
|
|
Public Constructors
public constructor(properties: Object, gl: WebGLContext) source
Parent class of all MediaSources
A MediaSource is the manifestation of a mediaSourceReference from a playlist object. It typically contains the original DOM element to be composited along with a number of functions to load, play, pause, seek and render that element to the webgl context.
A MediaSource exists for a period slightly before a MediaSource is to play in order to give it time to preload and is destroyed as soon as the MediaSource has finished playing.
Params:
| Name | Type | Attribute | Description |
| properties | Object | An object with the following attributes: id, duration, start, and src or element. Where src is the URL of something that can be used to create a DOM element that can be rendered to canvas, or element is a DOM element that can be rendered to a canvas. |
|
| gl | WebGLContext | a webGl context to render too. |
Public Members
public duration: * source
public element: * source
public gl: * source
public height: * source
public id: * source
public mediaSourceListeners: * source
public src: * source
public start: * source
public texture: * source
public width: * source
Public Methods
public load(): boolean source
Set the MediaSource loading, when it's ready isReady() will return true.
public onready(mediaSource: *) source
Params:
| Name | Type | Attribute | Description |
| mediaSource | * |
public render(program: *, renderParameters: *, textures: *) source
Render the MediaSource to the WebGL context passed into the constructor.
Params:
| Name | Type | Attribute | Description |
| program | * | ||
| renderParameters | * | ||
| textures | * |