Home Identifier Source
public class | source

CanvasSource

You can directly use instance of this class. canvasSource

Extends:

src/sources/mediasource~MediaSource → CanvasSource

Constructor Summary

Public Constructor
public

constructor(properties: Object, gl: WebGLContext)

Canvas playback source.

Member Summary

Public Members
public

element: *

public

height: *

public
public

width: *

Method Summary

Public Methods
public

load()

Set the CanvasSource loading, when it's ready isReady() will return true.
public

pause()

Pause the CanvasSource if it is playing.
public

play()

Set the CanvasSource playing.
public

render(program: *, renderParameters: *, textures: *)

public

seek(seekTime: number)

Seek to playlist time and do something appropriate with this CavnasSource.

Public Constructors

public constructor(properties: Object, gl: WebGLContext) source

Canvas playback source. Inherits from MediaSource

A CanvasSource is the manifestation of a mediaSourceReference from a playlist object which has type "canvas".

A CanvasSource exists for a period slightly before a CanvasSource is to play in order to give it time to preload and is destroyed as soon as the CanvasSource has finished playing.

Params:

NameTypeAttributeDescription
properties Object

An object with the following attributes: id, duration, start, and element. Where src is the URL of a video, or element is a DOM Video element.

gl WebGLContext

a webGl context to render too.

Public Members

public element: * source

public height: * source

public ready: boolean source

public width: * source

Public Methods

public load() source

Set the CanvasSource loading, when it's ready isReady() will return true.

public pause() source

Pause the CanvasSource if it is playing.

public play() source

Set the CanvasSource playing.

public render(program: *, renderParameters: *, textures: *) source

Params:

NameTypeAttributeDescription
program *
renderParameters *
textures *

public seek(seekTime: number) source

Seek to playlist time and do something appropriate with this CavnasSource. This can effect shaders applied to this canvas and any MediaSourceListeners listening to the Id of this source.

Params:

NameTypeAttributeDescription
seekTime number

The time to seek too, this is the overall time for the whole playlist.